A workpiece surface defect area measurement method and device based on a binocular hole exploration camera
By combining a binocular borescope camera with deep learning networks and three-dimensional coordinate system calculations, the problem of traditional monocular cameras being unable to accurately measure the defect area has been solved. This enables comprehensive and accurate measurement of the defect area of complex curved workpieces, and is suitable for internal inspection of engines and pipelines.
Patent Information
- Application Number
- CN202410769630.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Traditional monocular borehole cameras cannot accurately obtain area information of internal defects in workpieces, especially in complex curved structures where it is difficult to fully observe and assess structural integrity, and there is also a risk of collision.
A binocular aperture camera combined with a deep learning network is used to acquire depth maps and RGB images. Defects are identified and segmented using U-Net or A-Net networks. The area of the triangle in the defect region is calculated using a three-dimensional coordinate system. Median filtering and other filtering methods are used to process the depth map to prevent collisions and achieve omnidirectional detection.
It enables precise measurement of defect area on the surface of complex curved workpieces, and is suitable for internal inspection of engines, pipelines, etc. It improves the comprehensiveness and accuracy of inspection and avoids camera damage and blind spots.
Smart Images

Figure CN118781058B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of defect detection technology, and in particular relates to a method and device for measuring the area of surface defects on a workpiece based on a binocular aperture camera. Background Technology
[0002] In the field of engine overhaul, the inspection of its internal condition is of great significance, as its internal structure and condition are crucial for safety, maintenance, and operational management. However, traditional monocular borescope cameras, due to their inherent hardware limitations, can only obtain information on the presence of defects, not the size of the defects. Furthermore, the curved surface structure of the blades makes it impossible to calculate the actual area of the defects from the pixel area of the defect mask alone.
[0003] Traditional inspection methods primarily rely on a single camera or sensor for imaging and data acquisition. This single-view imaging approach cannot determine the distance between the camera and the surface of the object being inspected, potentially leading to collisions that could damage the camera lens or the object's surface. Furthermore, it fails to obtain information such as the area and length of defects. Since the surface of the object being inspected is typically a three-dimensional curved surface, images obtained solely from a monocular camera cannot accurately reflect defect information, limiting comprehensive observation of the internal condition of components and hindering accurate assessment of their structural integrity and operational status. Moreover, due to the unique geometry of the object's interior, surface defects or problems may be difficult to detect using traditional imaging methods. For example, some defects may only be visible under specific angles or lighting conditions, which traditional methods cannot provide from multiple angles or light sources. Therefore, an innovative inspection method is needed to overcome the limitations of existing technologies and provide comprehensive and accurate internal information. Summary of the Invention
[0004] The purpose of this invention is to provide a method and apparatus for measuring the surface defect area of a workpiece based on a binocular aperture camera. By obtaining distance information and defect size information through the binocular aperture camera, more accurate defect area information can be obtained.
[0005] To achieve the above objectives, the present invention provides a method for measuring the surface defect area of a workpiece based on a binocular borescope camera, comprising the following steps:
[0006] S1, acquire images of the workpiece to be inspected using a binocular aperture camera to obtain depth maps and RGB images;
[0007] S2, perform defect identification on the RGB image to obtain a defect mask image; filter the depth map to obtain a preprocessed depth map;
[0008] S3, the defect region of the defect mask image is divided into several triangles, and the area of each triangle is obtained by combining the depth value of the preprocessed depth image. Then, the total area of the defect region is obtained by summing them up.
[0009] Furthermore, in step S2, the deep learning image segmentation network adopts a U-Net or A-Net network.
[0010] Furthermore, in step S2, the filtering adopts median filtering, bilateral filtering, or weighted least squares filtering.
[0011] Furthermore, in step S3, a three-dimensional coordinate system is constructed based on the defect mask image and the preprocessed depth map to obtain the three-dimensional coordinates of each triangle, and the area of the triangle can be obtained based on the three-dimensional coordinates.
[0012] Furthermore, the method for segmenting the defect region includes: dividing the edges of the defect mask image to obtain r1 points P1, P2, ..., P on the edges. r1 The interior of the defect mask image is divided into r2 points P. r1+1 P r1+2 ... P r1+r2 Connecting three adjacent points in sequence yields r1+r2-2 triangles, denoted as P. t1 P t2 P t3 Two adjacent triangles share a side and do not overlap; where P t1 Let P represent the first vertex of the t-th triangle. t2 Let P represent the second vertex of the t-th triangle. t3 Let t represent the third vertex of the t-th triangle.
[0013] Furthermore, the triangle P t1 P t2 P t3 Area calculation methods include:
[0014] Triangle P t1 P t2 P t3 The coordinates of the three vertices are denoted as P. t1 (x t1 ,y t1 ,y t1 ), P t2 (x t2 ,y t2 ,y t2 ), P t3 (x t3 ,y t3 ,y t3 ), which was calculated to obtain:
[0015] P t1 P t2 =P t2 -P t1 =(x t2 -x t1 ,y t2 -y t1 ,z t2 -z t1 )
[0016] P t1 P t3 =P t3 -P t1 =(x t3 -x t1 ,y t3 -y t1 ,z t3 -z t1 )
[0017] Through vector cross product operation;
[0018]
[0019] Then, by substitution, we obtain:
[0020] m=(y t2 -y t1 (z) t3 -z t1 )-(z t2 -z r1 )(y t3 -y t1 )
[0021] n=(z t2 -z t1 (x) t3 -x t1 )-(x t2 -x r1 (z) t3 -z t1 )
[0022] k=(x t2 -x t1 )(y t3 -y t1 )-(y t2 -y r1 (x) t3 -x t1 )
[0023] Next, calculate the modulus of the cross product operation:
[0024]
[0025] The area of the triangle can be obtained using the following formula:
[0026]
[0027] Furthermore, the total area of the defective region is obtained using the following formula:
[0028]
[0029] Among them, S t Let represent the area of the t-th triangle, where t is a positive integer from 1 to r1+r2-2.
[0030] The present invention also provides a workpiece surface defect area measurement device based on a binocular borescope camera, comprising:
[0031] The image acquisition module is used to acquire images of the workpiece to be inspected through a binocular aperture camera, and obtain depth maps and RGB images.
[0032] The image processing module is used to filter the depth map to obtain a preprocessed depth map;
[0033] Defect recognition module; used to perform defect recognition on the RGB image through a deep learning image segmentation network to obtain a defect mask image;
[0034] The area calculation module is used to divide the defect region of the defect mask image into several triangles, combine them with the depth value of the preprocessed depth map to obtain the area of each triangle, and then sum them up to obtain the total area of the defect region.
[0035] Furthermore, the image acquisition module includes a displacement control device and a binocular aperture camera; the binocular aperture camera is fixed on the displacement control device, and the displacement of the binocular aperture camera is controlled by the displacement control device to acquire images of the workpiece to be inspected from various angles.
[0036] Furthermore, the displacement control device determines the distance between the binocular aperture camera and the workpiece to be inspected based on the depth map acquired by the binocular aperture camera, and then controls the displacement of the binocular aperture camera based on this distance.
[0037] In summary, compared with the prior art, the above-described technical solutions conceived by this invention mainly possess the following technical advantages:
[0038] 1) This invention uses a binocular aperture camera for imaging and data acquisition, which can comprehensively and accurately detect the internal condition of the object to be detected. The depth map and RGB image obtained by the binocular aperture camera are used to obtain a mask image of the defect location information by using a deep learning neural network. Based on the mask information and depth information of the defect, the defect area can be calculated more accurately by using the finite element analysis method.
[0039] 2) This invention divides the defect area into triangles. Based on three-dimensional coordinate data, the actual area of the defect can be obtained through vector cross product operation. It is especially suitable for measuring the defect area of irregular curved surface workpieces. For example, it can be used for the detection of the inside of engines, pipes, and cavity-type workpieces. Attached Figure Description
[0040] Figure 1 A flowchart of the workpiece surface defect area measurement method based on a binocular borescope camera provided by the present invention;
[0041] Figure 2 RGB image of the defect area acquired by a binocular borescope camera;
[0042] Figure 3 A depth map of the defect area acquired by a binocular borehole camera;
[0043] Figure 4 The mask image obtained from the deep learning neural network;
[0044] Figure 5 This is a schematic diagram of a structure for calculating area using a local mask image;
[0045] Figure 6 This is a schematic diagram of the image acquisition module. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0047] Please see Figure 1 This invention provides a method for measuring the surface defect area of a workpiece based on a binocular borescope camera, comprising the following steps:
[0048] S1, acquire images of the workpiece to be inspected using a binocular aperture camera to obtain depth maps and RGB images;
[0049] S2, perform defect identification on the RGB image to obtain a defect mask image; filter the depth map to obtain a preprocessed depth map;
[0050] S3 divides the defect region of the defect mask into several triangles, combines the depth value of the preprocessed depth map to obtain the area of each triangle, and then sums them up to obtain the total area of the defect region.
[0051] Specifically, in step S2, defect identification can employ Fast-RCNN, YOLO series algorithms, or image segmentation algorithms based on deep neural networks. Existing technologies for target recognition in images are relatively mature; this invention focuses on detecting the area of the identified defect region, therefore the specific defect identification method will not be elaborated further. In step S2, filtering employs median filtering, bilateral filtering, or weighted least squares filtering.
[0052] In step S3, a three-dimensional coordinate system is constructed based on the defect mask image and the preprocessed depth map to obtain the real-world three-dimensional coordinates of each triangle (i.e., the size is consistent with the actual size of the defect). The area of the triangle can be obtained based on the three-dimensional coordinates.
[0053] Specifically, please refer to Figure 5 The defect region segmentation method includes: dividing the edges of the defect mask image to obtain r1 points P1, P2, ..., P on the edges. r1 The interior of the defect mask image is divided into r2 points P. r1+1 P r1+2 ... P r1+r2 Connecting three adjacent points in sequence yields r1+r2-2 triangles, denoted as P. t1 P t2 P t3 Two adjacent triangles share a side and do not overlap; where P t1 Let P represent the first vertex of the t-th triangle. t2 Let P represent the second vertex of the t-th triangle. t3 Let t represent the third vertex of the t-th triangle.
[0054] The positions and number of vertices of the triangles can be adjusted according to specific circumstances to accommodate regions of different shapes and densities. To reduce workload while ensuring accuracy in area calculation, and to guarantee accuracy, the x and y coordinates of each vertex of each triangle do not exceed two pixels.
[0055] Specifically, the defect region segmentation method includes: firstly, performing preliminary region segmentation on the defect mask image based on the depth information of the preprocessed depth map to obtain region Q. ss is a positive integer representing the s-th region. The initial region segmentation criterion is: using the difference in depth value between a point in the defect mask image and a reference point in the normal region outside the defect region as the metric, continuous regions with the same depth value difference are defined as region Q. s1 (That is, the difference between the maximum and minimum depth values is 0, and this region lies on the same plane). When calculating the area of this region, the area of the segmented triangles within the image region can be expanded. For example, each triangle can cover 8 to 20 pixels, and the segmentation granularity at the boundary points can be finer. When the depth value differences are different, it indicates that the plane at that location has a curved structure. The greater the difference in depth value between each point and the reference point, the greater the curvature of the surface. A continuous region where the depth value difference between each point is greater than 0 and less than or equal to 1 mm is defined as region Q. s2 (That is, the difference between the maximum and minimum depth values is greater than 0 and less than or equal to 1 mm). When calculating the area of this region, the area of each triangle can be appropriately reduced, for example, each triangle can cover 5 to 10 pixels; the continuous region with a depth value difference greater than 1 and less than or equal to 2 mm is taken as region Q. s3 The area of each triangle is further reduced; for example, each triangle can cover 2 to 5 pixels. When the depth difference is greater than 2 mm, the area of each triangle is adjusted to the minimum; for example, each triangle can cover 1 to 2 pixels. This can appropriately reduce the amount of computation and obtain more information about the defect area, such as knowing the defect area of a specific region.
[0056] Furthermore, the triangular segmentation method can be determined based on actual needs. For example, if only the approximate area of the defect needs to be known, the Q value of each region can be appropriately increased. s The area of each triangle.
[0057] Triangle P t1 P t2 P t3 Area calculation methods include:
[0058] Triangle P t1 P t2 P t3 The coordinates of the three vertices are denoted as P. t1 (x t1 ,y t1 ,y t1 ), P t2 (x t2 ,y t2 ,y t2 ), P t3 (x t3 ,y t3 ,y t3 ), which was calculated to obtain:
[0059] P t1 Pt2 =P t2 -P t1 =(x t2 -x t1 ,y t2 -y t1 ,z t2 -z t1 )
[0060] P t1 P t3 =P t3 -P t1 =(x t3 -x t1 ,y t3 -y t1 ,z t3 -z t1 )
[0061] Through vector cross product operation;
[0062]
[0063] Then, by substitution, we obtain:
[0064] m=(y t2 -y t1 (z) t3 -z t1 )-(z t2 -z r1 )(y t3 -y t1 )
[0065] n=(z t2 -z t1 (x) t3 -x t1 )-(x t2 -x r1 (z) t3 -z t1 )
[0066] k=(x t2 -x t1 )(y t3 -y t1 )-(y t2 -y r1 (x) t3 -x t1 )
[0067] Next, calculate the modulus of the cross product operation:
[0068]
[0069] The area of the triangle can be obtained using the following formula:
[0070]
[0071] The total area of the defective region is obtained by the following formula:
[0072]
[0073] Among them, S t Let represent the area of the t-th triangle, where t is a positive integer from 1 to r1+r2-2.
[0074] Specifically, taking triangle P1P2P3 as an example, the method for calculating the area of each triangle includes the following steps:
[0075] Let the coordinates of the three vertices of triangle P1P2P3 be denoted as P1(x1,y1,z1), P2(x2,y2,z2), and P3(x3,y3,z3), respectively. The results are obtained through calculation.
[0076] P1P3=P3-P1=(x3-x1,y3-y1,z3-z1)
[0077] P1P2=P2-P1=(x2-x1,y2-y1,z2-z1)
[0078] Through vector cross product operation;
[0079]
[0080] Then, by substitution, we obtain:
[0081] m=(y2-y1)(z3-z1)-(z2-z1)(y3-y1)
[0082] n = (z2 - z1)(x3 - x1) - (x2 - x1)(z3 - z1)
[0083] k=(x2-x1)(y3-y1)-(y2-y1)(x3-x1)
[0084] Next, calculate the modulus of the cross product operation:
[0085]
[0086] The area of the triangle can be obtained using the following formula:
[0087]
[0088] The total area of the defective region is obtained by the following formula:
[0089]
[0090] Among them, S t Let represent the area of the t-th triangle, where t is a positive integer from 1 to r1+r2-2.
[0091] The present invention also provides a workpiece surface defect area measurement device based on a binocular borescope camera, comprising:
[0092] The image acquisition module is used to acquire images of the workpiece to be inspected through a binocular aperture camera, and obtain depth maps and RGB images.
[0093] The image processing module is used to filter the depth map to obtain a preprocessed depth map;
[0094] A defect identification module is used to identify defects in the RGB image and obtain a defect mask image.
[0095] The area calculation module is used to divide the defect region of the defect mask image into several triangles, combine them with the depth value of the preprocessed depth map to obtain the area of each triangle, and then sum them up to obtain the total area of the defect region.
[0096] Specifically, the image acquisition module includes a displacement control device and a binocular aperture camera; the binocular aperture camera is fixed on the displacement control device, and the displacement of the binocular aperture camera is controlled by the displacement control device to acquire images of the workpiece to be inspected from various angles.
[0097] Specifically, the displacement control device determines the distance between the binocular aperture camera and the workpiece to be inspected based on the depth map acquired by the binocular aperture camera, and then controls the displacement of the binocular aperture camera according to the distance, which can effectively prevent the binocular aperture camera from colliding with the workpiece.
[0098] Please see Figure 6 In some specific embodiments, the displacement control device includes a feeding mechanism and a connecting rod for connecting the feeding mechanism and the binocular aperture camera. Figure 6 The feed mechanism (straight section) mainly consists of a motor, gears, and bearings. The feed mechanism is fixed to the outer surface of the workpiece to be inspected. A rack is distributed on the connecting rod housing the binocular aperture camera, installed in the fixed slot of the feed mechanism, and meshes with the gears to achieve transmission. Inside the feed mechanism, the motor and sensors drive the gears to rotate, thus realizing the feed movement of the binocular aperture camera. An adapter head is installed at the front end of the feed mechanism to facilitate the stable fixing of the workpiece to be inspected at the inspection point. The bearings in the feed mechanism reduce friction and prevent pressure on the connecting rod. The motor and gears are connected by a coupling, driving the gears to rotate.
[0099] Specifically, multiple displacement control devices and binocular aperture cameras can be distributed at different positions and angles on the workpiece to be inspected, enabling omnidirectional and rapid inspection. Alternatively, a single displacement control device and binocular aperture camera can be used to perform omnidirectional inspection of the workpiece. The detection point and path of the binocular aperture camera can be freely adjusted according to the inspection scenario. In the internal inspection scenario of complex parts, the camera's detection angle can be flexibly controlled to ensure that the inspection target ultimately achieves clear, high-quality, and good imaging results, laying a solid foundation for future defect detection.
[0100] The connecting rod head equipped with a binocular borehole camera is preferably made of a flexible material, which facilitates thorough inspection of the workpiece's interior without blind spots; the binocular borehole camera is dustproof and waterproof.
[0101] This invention uses depth information acquired by a binocular aperture camera to prevent collisions; multi-path, multi-directional detection enables more comprehensive and accurate acquisition of the internal condition of the workpiece; automated detection is achieved through a feeding mechanism; and multi-threading technology enables parallel processing of multiple image data streams, improving detection efficiency.
[0102] Based on the aforementioned defect area measuring device, this invention provides a method for measuring the surface defect area of a workpiece using a binocular borescope camera, which specifically includes the following steps:
[0103] S1, images of the workpiece to be inspected are acquired using a binocular aperture camera, resulting in depth maps and RGB images; details are as follows:
[0104] 1) The workpiece is comprehensively observed using a displacement control device and a binocular borescope camera to identify key areas where defects may exist. Based on these observations, appropriate locations are selected for detailed inspection.
[0105] 2) Connect the data transmission interface (USB interface) of the binocular borescope camera to the computer and turn on the detection system to ensure that the data can be successfully transmitted to the analysis platform. This ensures real-time acquisition and processing of image data.
[0106] 3) Fix the displacement control device to the corresponding position on the workpiece using the adapter head. Select an appropriate size adapter head according to the actual situation to ensure that the camera can be stably aligned with the detection area.
[0107] 4) The feed mechanism is activated. The motor rotates forward via a rack and pinion transmission mechanism, allowing the binocular borescope camera to penetrate deep into the workpiece for inspection. Sensors monitor the position and status of the binocular borescope camera in real time, automatically adjusting the feed speed and force to ensure a smooth and accurate inspection process. Simultaneously, an emergency stop mechanism can be set; if a potential collision or other abnormal situation is detected, the feed is immediately stopped to protect the workpiece and equipment. This step enables the system to perform in-depth analysis of the workpiece's internal structure, thereby identifying potential defects.
[0108] S2, the host-side detection system processes the collected RGB images (such as...) Figure 2 The image (as shown) is processed to determine if the workpiece has defects. This step utilizes advanced image processing algorithms or deep learning algorithms. For example, defect recognition can employ Fast-RCNN, YOLO series algorithms, and deep neural network-based image segmentation algorithms such as U-Net and A-Net to quickly and accurately identify defects and obtain defect-related mask information. Figure 4 As shown.
[0109] The depth map obtained from the binocular aperture camera is filtered using median filtering, bilateral filtering, or weighted least squares filtering. After filtering, it is displayed in pseudo-color, such as... Figure 3 As shown.
[0110] S3, combining the depth map and the defect mask map, calculates the actual area of the defect by summing the results of dividing the defect region into numerous triangles. Since the real-world coordinates of each pixel in the defect mask are already obtained, the mask image can be divided into multiple spatial triangles for calculation. For every four adjacent points, these four points are connected in a clockwise or counterclockwise order to form two non-intersecting triangles. The method of dividing the triangles can be adjusted according to specific circumstances to adapt to regions of different shapes and densities. With the actual coordinates of three points already obtained, the area of each triangle can be easily calculated separately. Finally, the areas of the triangles are summed to approximate the actual area of the defect. The obtained defect area information is then stored.
[0111] After the current position detection is completed, the motor rotates in the opposite direction to raise the binocular camera. The workpiece can be rotated by a certain angle before the next position detection is performed. After all angles at the current position are detected, the adapter head can be released and the process can proceed to the next detection position to repeat the relevant steps from S1 to S4.
[0112] Those skilled in the art will readily understand that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for measuring the area of a surface defect of a workpiece based on a binocular hole probe camera, characterized by, The method comprises the following steps: S1, acquiring an image of a workpiece to be detected by a binocular hole detection camera to obtain a depth map and an RGB image; S2, identifying defects in the RGB image by using a deep learning image segmentation network to obtain a defect mask image; filtering the depth map to obtain a preprocessed depth map; S3, dividing a defect area of the defect mask image into a plurality of triangles, combining depth values of the preprocessed depth map to obtain an area of each triangle, and then accumulating to obtain a total area of the defect area; The segmentation method of the defect area comprises: firstly, according to the depth information of the preprocessed depth map, performing preliminary area segmentation on the defect mask image to obtain areas Q1, Q2,..., Qs s , s is a positive integer, representing the s-th area; the standard of the preliminary area segmentation is: taking the difference between the depth value of a defect mask image point and that of a reference point in a normal area outside the defect area as the measurement standard, the continuous area with the same depth value difference of each point is taken as the area Q1, when the area of the area Q1 is calculated, each triangle covers 8-20 pixel points; the continuous area with the depth value difference greater than 0 and less than or equal to 1 mm is taken as the area Q2, when the area of the area Q2 is calculated, each triangle covers 5-10 pixel points; the continuous area with the depth value difference greater than 1 and less than or equal to 2 mm is taken as the area Q3, and each triangle covers 2-5 pixel points; and the continuous area with the depth value difference greater than 2 mm is taken as the area Q4, and each triangle covers 1-2 pixel points.
2. The binocular borescope camera based workpiece surface defect area measurement method of claim 1, wherein, In step S2, the deep learning image segmentation network uses a U-Net or A-Net network.
3. The binocular borescope camera based workpiece surface defect area measurement method of claim 1, wherein, In step S2, the filtering uses median filtering, bilateral filtering, or weighted least squares filtering.
4. The binocular borescope camera based workpiece surface defect area measurement method of claim 1, wherein, In step S3, a three-dimensional coordinate system is constructed according to the defect mask image and the preprocessed depth map to obtain three-dimensional coordinates of each triangle, and the area of the triangle can be obtained according to the three-dimensional coordinates.
5. The binocular borescope camera based workpiece surface defect area measurement method of claim 4, wherein, The method for segmenting the defect region includes: dividing the edges of the defect mask image to obtain r1 points P1, P2, ..., P on the edges. r1 The interior of the defect mask image is divided into r2 points P. r1+1 P r1+2 ... P r1+r2 Connecting three adjacent points in sequence yields r1+r2-2 triangles, denoted as P. t1 P t2 P t3 Two adjacent triangles share a side and do not overlap; where P t1 Let P represent the first vertex of the t-th triangle. t2 Let P represent the second vertex of the t-th triangle. t3 Let t represent the third vertex of the t-th triangle.
6. The binocular borescope camera based workpiece surface defect area measurement method of claim 5, wherein, The triangle P t1 P t2 P t3 The area calculation method comprises: Triangle P t1 P t2 P t3 The coordinates of the three vertices are denoted as P. t1 (x) t1 ,y t1 ,y t1 ), P t2 (x) t2 ,y t2 ,y t2 ), P t3 (x) t3 ,y t3 ,y t3 ), obtained through calculation: P t1 P t2 = P t2 - P t1 =(x t2 - x t1 , y t2 - y t1 , z t2 - z t1 ) P t1 P t3 = P t3 - P t1 =(x t3 - x t1 , y t3 - y t1 , z t3 - z t1 ) Through vector cross product operation; Then, by substitution, we get: Then calculate the length of the cross product operation: Then the area of the triangle is obtained by the following formula: S t 。 7. The binocular borescope camera based workpiece surface defect area measurement method of claim 6, wherein, The total area of the defect area is obtained by the following formula: where S t denotes the area of the t-th triangle, t being a positive integer from 1 to r1+r2-2.
8. A device for measuring the area of a surface defect of a workpiece based on a binocular hole-probe camera, characterized by, It comprises: An image acquisition module for acquiring an image of a workpiece to be detected by a binocular hole detection camera to obtain a depth map and an RGB image; An image processing module for filtering the depth map to obtain a preprocessed depth map; A defect identification module; for identifying defects in the RGB image by using a deep learning image segmentation network to obtain a defect mask image; An area calculation module for dividing a defect area of the defect mask image into a plurality of triangles, combining depth values of the preprocessed depth map to obtain an area of each triangle, and then accumulating to obtain a total area of the defect area; The segmentation method of the defect area comprises: firstly, according to the depth information of the preprocessed depth map, performing preliminary area segmentation on the defect mask image to obtain areas Q1, Q2,..., Q s s is a positive integer, representing the s-th area; the standard of the preliminary area segmentation is: taking the difference between the depth value of a defect mask image point and that of a reference point in a normal area outside the defect area as the measurement standard, the continuous area with the same depth value difference of each point is taken as the area Q1, when the area of the area Q1 is calculated, each triangle covers 8-20 pixel points; the continuous area with the depth value difference greater than 0 and less than or equal to 1 mm is taken as the area Q2, when the area of the area Q2 is calculated, each triangle covers 5-10 pixel points; the continuous area with the depth value difference greater than 1 and less than or equal to 2 mm is taken as the area Q3, and each triangle covers 2-5 pixel points; and the continuous area with the depth value difference greater than 2 mm is taken as the area Q4, and each triangle covers 1-2 pixel points.
9. The binocular borescope camera based workpiece surface defect area measurement device of claim 8, wherein, The image acquisition module comprises a displacement control device and a binocular hole detection camera; the binocular hole detection camera is fixed on the displacement control device, and the displacement of the binocular hole detection camera is controlled by the displacement control device to acquire images of the workpiece to be detected from different directions.
10. The binocular borescope camera based workpiece surface defect area measurement device of claim 9, wherein, The displacement control device judges the distance between the binocular hole detection camera and the workpiece to be detected according to the depth map acquired by the binocular hole detection camera, and then controls the displacement of the binocular hole detection camera according to the distance.
Citation Information
Patent Citations
Method for determining size and area of surface defect of bar
CN113804696A
Non-contact fish weight measuring method and device, electronic equipment and medium
CN117876456A