Endoscopic Robot Stent Defect Detection Method Based on Machine Vision

By segmenting and screening the connection domain of the endoscopic robot stent image, and splicing according to the direction similarity and endpoint connectivity, the degree of cracking is calculated to determine the number of seed points, the detection accuracy problem caused by improper selection of seed point positions in the prior art is solved, and higher defect detection accuracy is achieved.

CN119850603BActive Publication Date: 2025-06-13THE SIXTH AFFILIATED HOSPITAL OF SUN YAT SEN UNIV +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510316247.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-06-13
Estimated Expiration
2045-03-18

AI Technical Summary

Technical Problem

When existing machine vision technology detects crack defects in endoscopic robot brackets, improper selection of seed point positions leads to the growth results containing noise, which reduces the accuracy of detection.

Method used

By taking the foreground bracket image of the endoscopic robot and dividing it into multiple areas, the possible cracking domains are selected, and splicing is performed according to the direction similarity and endpoint connectivity of adjacent areas, the degree of cracking in the crack splicing area is calculated to determine the number of seed points delivered.

Benefits of technology

Improve the accuracy of defect detection, ensure the position of the seed point placement and fit the crack, and enhance the ability to identify the defects on the surface of the bracket.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850603B_ABST
    Figure CN119850603B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image processing, and particularly to an endoscopic robot stent defect detection method based on machine vision, comprising: acquiring a foreground stent image of an endoscopic robot and segmenting the foreground stent image into a plurality of regions; screening out crack connected regions from the connected regions in the regions according to the possibility of the connected regions in the regions being crack connected regions; obtaining a plurality of crack splicing regions according to the direction similarity and endpoint connectivity between adjacent crack connected regions; obtaining the number of seed points placed in the crack splicing regions according to the distribution of the skeleton pixel points and the upper edge pixel points of the contour of the crack splicing regions in the crack splicing regions; obtaining the final crack region according to the number of seed points placed in the crack splicing regions; and determining the quality of the endoscopic stent according to the final crack region. By analyzing the foreground stent image of the endoscopic robot, the present invention improves the accuracy of defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a method for detecting defects of an endoscopic robot stent based on machine vision. Background Art

[0002] An endoscopic robot stent is a structure or device used to support and position an endoscopic robot. The design of the stent aims to ensure that the robot can accurately and stably perform tasks and provide doctors with a clear visualization of the patient's internal structure. However, due to material fatigue, excessive stress or other damages, crack defects may appear on the surface of the stent, which may affect the strength and durability of the stent.

[0003] Currently, when detecting crack defects of an endoscopic robot stent through machine vision, the region growing technique is generally used to extract the crack region. However, improper selection of the position of the seed points may lead to the growth result containing other surface impurities and noise points, reducing the accuracy of detection. Summary of the Invention

[0004] The present invention provides a method for detecting defects of an endoscopic robot stent based on machine vision to solve the existing problems.

[0005] The method for detecting defects of an endoscopic robot stent based on machine vision of the present invention adopts the following technical solutions:

[0006] An embodiment of the present invention provides a method for detecting defects of an endoscopic robot stent based on machine vision, and the method includes the following steps:

[0007] Obtain the foreground stent image of the endoscopic robot and segment the foreground stent image into several regions;

[0008] Screen out the crack connected domains from all the connected domains of the regions according to the possibility of the connected domain of the region being the crack connected domain;

[0009] Obtain the splicing evaluation between adjacent crack connected domains according to the direction similarity and endpoint connectivity between adjacent crack connected domains; merge the crack connected domains according to the splicing evaluation between adjacent crack connected domains to obtain several crack splicing regions;

[0010] Obtain the cracking degree of the crack splicing region according to the distribution of the skeleton pixel points and the upper edge pixel points of the contour of the crack splicing region;

[0011] Obtain the number of seed points to be placed in the crack splicing region according to the cracking degree of the crack splicing region;

[0012] Obtain the final crack region according to the number of seed points to be placed in the crack splicing region; determine the quality of the endoscopic stent according to the final crack region.

[0013] Further, the steps of acquiring the foreground stent image of the endoscopic robot and segmenting the foreground stent image into several regions are as follows:

[0014] The camera captures an image of the surface of the stent of the endoscopic robot, and performs semantic segmentation on the image to obtain several regions.

[0015] Further, the steps of screening out crack connected domains from the connected domains in the region according to the possibility that the connected domain in the region is a crack connected domain are as follows:

[0016] ;

[0017] where represents the possibility that the connected domain of any region is a crack connected domain, represents the maximum gray value of the connected domain, represents the average gray value of the connected domain, represents the gray value of the th pixel point in the connected domain, represents the number of pixel points included in the connected domain, represents the skeleton length corresponding to the connected domain, represents the maximum skeleton length of all connected domains, represents the minimum skeleton length of all connected domains, represents the major axis length of the minimum circumscribed ellipse of the connected domain, represents the minor axis length of the minimum circumscribed ellipse of this connected domain, represents function;

[0018] According to the possibility that the connected domain is a crack connected domain, the crack connected domains are screened out.

[0019] Further, the steps of screening out crack connected domains according to the possibility that the connected domain is a crack connected domain are as follows:

[0020] Mark the connected domains with the possibility greater than as crack connected domains, is a preset target threshold.

[0021] Further, the specific formula for obtaining the splicing evaluation between adjacent crack connected domains according to the direction similarity and endpoint connectivity between adjacent crack connected domains is as follows:

[0022] ;

[0023] where Indicates the crack-connected domain And the crack-connected domain Of the splicing evaluation Indicates the crack-connected domain Of The maximum principal component vector Indicates the crack-connected domain Of The maximum principal component vector Indicates the crack-connected domain The grayscale mean value Indicates the crack-connected domain The grayscale mean value Indicates the endpoint connectivity Indicates the linear normalization function Indicates the direction similarity

[0024] Furthermore, the specific calculation formula of the endpoint connectivity is as follows

[0025] ;

[0026] Wherein Indicates the crack-connected domain The width of the left endpoint Indicates the crack-connected domain The width of the right endpoint Indicates the crack-connected domain The width of the left endpoint Indicates the crack-connected domain The width of the right endpoint

[0027] Furthermore, the steps of merging the crack-connected domains according to the splicing evaluation between adjacent crack-connected domains to obtain several crack splicing regions are as follows

[0028] Image splicing is performed on the crack-connected domains with a splicing evaluation greater than To obtain a crack splicing region, the Is a preset judgment threshold

[0029] Furthermore, the cracking degree of the crack splicing region is obtained according to the distribution of the skeleton pixel points and the upper edge pixel points of the contour of the crack splicing region. The specific formula is as follows

[0030] ;

[0031] Wherein Is the cracking degree of the crack splicing region Of Is the upper edge of the contour of the crack splicing region at the The Euclidean distance between an edge pixel and its nearest skeleton pixel is the crack splicing area The number of edge pixels is the crack splicing area is the skeleton length represents the maximum skeleton length of all crack areas in the foreground stent image represents the minimum skeleton length of all crack splicing areas in the foreground stent image

[0032] Further, obtaining the number of seed points to be placed in the crack splicing area according to the cracking degree of the crack splicing area includes the following specific formula:

[0033] ;

[0034] wherein is the number of seed points to be placed in the th crack splicing area is the minimum value of the cracking degrees of all crack splicing areas is the cracking degree of the th crack splicing area represents rounding down

[0035] Further, obtaining the final crack area according to the number of seed points to be placed in the crack splicing area; determining the quality of the endoscopic stent according to the final crack area includes the following specific steps:

[0036] Place seed points according to the number of seed points to be placed in each crack splicing area, and perform region growing to obtain several candidate regions. Denote the candidate region with the minimum gray mean value as the final crack area is the preset detection threshold;

[0037] When the number of final crack areas is greater than , the quality of the endoscopic stent is unqualified;

[0038] When the number of final crack areas is less than or equal to , the quality of the endoscopic stent is qualified

[0039] The beneficial effect of the technical solution of the present invention is that this solution optimizes the problem that the growth result is inaccurate due to the irregular placement of seed points when extracting the crack area of the robot stent through region growing. Dividing the surface image of the robot stent into multiple regions can better capture the details in the image, and then in the region, determine the possible crack areas by analyzing the gray scale and morphological features of the cracks, splice them, calculate the corresponding cracking degree, and finally determine the placement position and number of seed points, so that the placement of seed points fits the position where the cracks are located, improving the accuracy of defect detection Brief Description of the Drawings

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0041] Figure 1 It is a flowchart of the steps of the endoscopic robot stent defect detection method based on machine vision of the present invention. Detailed Embodiments

[0042] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in conjunction with the drawings and preferred embodiments, will describe in detail the specific embodiments, structures, features and effects of the endoscopic robot stent defect detection method based on machine vision proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0044] The following will specifically describe the specific solution of the endoscopic robot stent defect detection method based on machine vision provided by the present invention in conjunction with the drawings.

[0045] Please refer to Figure 1 , which shows a flowchart of the steps of the endoscopic robot stent defect detection method based on machine vision provided by an embodiment of the present invention. The method includes the following steps:

[0046] Step S001: Obtain the foreground stent image of the endoscopic robot and divide the foreground stent image into several regions.

[0047] The image of the surface of the endoscopic robot stent is collected by shooting with a high-resolution camera, ensuring that all surface areas of the robot stent can be collected by the camera. Then, the collected image is grayscaled and denoised by Gaussian filtering to obtain a grayscale image. In order to improve the accuracy of crack defect recognition, in this embodiment, a semantic segmentation neural network is used to segment the grayscale image to obtain the semantic regions of the endoscopic robot stent. All pixel points within the semantic regions on the grayscale image constitute the foreground stent image. Irrelevant regions such as the background in the grayscale image are not considered. The semantic segmentation network used in this embodiment is DeepLabV3.

[0048] Step S002: Screen out the crack connected domains from the connected domains in the region according to the possibility that the connected domain in the region is a crack connected domain.

[0049] It should be noted that for the foreground stent image, there may be some relatively fine cracks in the stent, resulting in inaccurate extraction of fine cracks based on the analysis of the entire foreground stent image. Therefore, in this embodiment, the foreground stent image is divided into multiple regions by using the SLIC algorithm, and each region is a connected domain. Then, each region is analyzed, and the connected domains that may belong to cracks are screened out according to the morphology and gray-scale characteristics of the connected domains in each region. Then, the discontinuous cracks generated by region segmentation are spliced to obtain a complete crack region.

[0050] Specifically, the endoscopic robot stent foreground area image is divided into multiple regions by using the SLIC algorithm. Among them, the SLIC algorithm is a well-known technology and will not be elaborated in this embodiment. Since the light receiving area in the crack region on the surface of the endoscopic robot stent is small, its gray scale is darker and smoother than that of the stent surface. At the same time, most cracks are caused by excessive stress, so the morphology of the cracks generally presents as slender and extends in a certain direction. Other stains or texture regions on the stent surface do not necessarily have this morphology. Therefore, based on the above analysis, the calculation formula for the possibility that any region is a crack connected domain is as follows:

[0051] ;

[0052] Among them, represents the possibility that the connected domain of any region is a crack connected domain, represents the maximum gray value of this connected domain, represents the average gray value of this connected domain, represents the gray value of the th pixel point in this connected domain, represents the number of pixel points included in the connected domain, represents the skeleton length corresponding to this connected domain, where the skeleton corresponding to the connected domain is obtained by using the K3M algorithm, represents the maximum skeleton length of all connected domains, represents the minimum skeleton length of all connected domains, represents the major axis length of the minimum circumscribed ellipse of this connected domain, represents the minor axis length of the minimum circumscribed ellipse of this connected domain, represents function.

[0053] is the average difference between the maximum gray value of the pixels in the connected domain and the gray values of all pixels in the connected domain, which is used to represent the degree of gray distribution uniformity in this connected domain. If the smaller the value is, it indicates that the gray levels of the pixels in the connected domain are more concentrated, that is, the gray is more uniform and smooth, and the connected domain is more likely to be a crack connected domain. At the same time represents the gray level of the overall connected domain. Since the gray of the crack area is generally darker than the gray of the bracket surface, so the smaller the value is, it indicates that the overall gray of this connected domain is darker, and it is more likely to be a crack connected domain. represents the relative skeleton length of this connected domain. Since the crack connected domain shows an extended shape, then the corresponding morphological skeleton is obtained for the connected domain, and the length of the skeleton pixels represents the extension degree of this connected domain. Therefore, if the larger the value is, it represents that the extension length of this connected domain is larger, and then it is more likely to be a crack connected domain. represents the slender feature of the connected domain shape. Since the crack connected domain is generally slender, and can reflect the degree of this slender shape. If the larger the value is, it represents that this connected domain is more likely to have a slender morphological feature, and then it is more likely to be a crack connected domain. In summary, the screening index of the crack connected domain is obtained. After calculating for any connected domain in all regions, use function to normalize it to range.

[0054] According to the above method, obtain the possibility of all connected domains being crack connected domains, and preset the target threshold . Mark the connected domains where is greater than as crack connected domains.

[0055] Thus, the crack connected domains are obtained.

[0056] Step S003: Obtain the splicing evaluation between adjacent crack connected domains according to the direction similarity and endpoint connectivity between adjacent crack connected domains, and merge the crack connected domains according to the splicing evaluation between adjacent crack connected domains to obtain several crack splicing regions.

[0057] It should be noted that when screening for possible crack connection regions within the segmented areas, there are some relatively long cracks that are divided into multiple regions to form discontinuous cracks. To improve the integrity of crack extraction, in this embodiment, multiple regions are combined into a complete foreground image. However, due to possible errors in combining multiple regions, there is a problem that some discontinuous cracks are misaligned and cannot be accurately spliced. Therefore, in this embodiment, based on the crack connection regions within the regions, an analysis is performed, a splicing index is established to accurately splice the discontinuous cracks to obtain all complete crack regions, and then the corresponding cracking degree is calculated according to the morphology of the complete crack regions.

[0058] Specifically, first, the discontinuous cracks are spliced. The multiple cracks to be spliced were originally a natural crack, which was disconnected due to image segmentation but the relative positions remained unchanged. Therefore, the values of the multiple cracks to be spliced will only exist in any adjacent regions. For cracks, the multiple cracks to be spliced will have similar extension directions, and at the same time, the gray-scale distribution inside them is similar. Also, because the two cracks to be spliced adopt the head-to-tail splicing method, that is, for any discontinuous crack in a certain region, its left end is spliced with the right end of the corresponding crack in the left adjacent region, and its right end is spliced with the left end of the corresponding crack in the right adjacent region. The more similar the widths of the corresponding endpoints of the two cracks are, the higher the possibility of splicing the two cracks. Therefore, based on the above characteristics, for the crack connection regions within a certain region and the crack connection regions within any adjacent region the calculation formula for the splicing evaluation is:

[0059] ;

[0060] Among them, represents the splicing evaluation of the crack connection region and the crack connection region , represents the maximum principal component vector of the crack connection region , represents the maximum principal component vector of the crack connection region , represents the gray-scale mean value of the crack connection region , and represents the gray-scale mean value of the crack connection region , represents the left-endpoint width of the crack connection region , represents the right-endpoint width of the crack connection region , represents the left-endpoint width of the crack connection region , represents the right-endpoint width of the crack connection region The width of the right endpoint, represents a linear normalization function.

[0061] It should be noted that in this embodiment, on the direction of the maximum principal component vector of the fracture connection domain, the first pixel point passed through clockwise on the fracture connection domain is the left endpoint, and the last pixel point passed through clockwise is the right endpoint.

[0062] The calculation method of the width of the endpoint in this embodiment is as follows: on the contour edge of the fracture connection domain, obtain Nq edge pixel points (including the left endpoint) closest to the left endpoint, and the length of the left side of the minimum circumscribed rectangle of these Nq edge pixel points is used as the width of the left endpoint. On the contour edge of the fracture connection domain, obtain Nq edge pixel points (including the right endpoint) closest to the right endpoint, and the length of the right side of the minimum circumscribed rectangle of these Nq edge pixel points is used as the width of the right endpoint. In this embodiment, Nq = 20 is taken as an example for description, and other values can be set in other embodiments, which are not limited in this embodiment.

[0063] represents the angular difference situation of the corresponding vectors of two fractures, indicating the direction similarity. The maximum principal direction vector is used to represent the extension direction of the fracture, the angle is mapped to a positive value to reduce the calculation error caused by negative values. If the value is larger, it means that the angle between the two fractures is smaller, then the extension directions of these two fractures are more consistent. Therefore, the possibility of being a discontinuous fracture is greater, and the possibility of splicing the two fractures is also greater. represents the average gray level difference between the two fracture regions. If the two fractures are discontinuous fractures, the corresponding gray level difference will be smaller. The smaller the value, the greater the possibility of splicing the two fractures. represents the degree of width difference between the endpoints of the two fracture regions, indicating the endpoint connectivity. Since the splicing is carried out in a head-to-tail connection manner, for the fracture connection domain in this embodiment, the extension direction is taken as the horizontal direction. Then, if the fracture connection domain is in the left region of the fracture connection domain , then compare the width of the left endpoint of with the width of the left endpoint of . If the widths of the two are similar, that is, is smaller, it indicates that the two originally belong to the same fracture. Therefore, the possibility of splicing is greater. If the fracture connection domain is in the right region of the fracture connection domain , then The smaller it is, the greater the possibility of splicing the two crack regions. Therefore, if the splicing condition is met, then and there will be any value extremely small in The smaller the value of indicates that the possibility of splicing the corresponding two crack regions is greater. Finally, for any crack connected region calculate the corresponding value and linearly normalize it to the range of [0, 1]. Adding 1 to the denominator is to avoid the denominator being 0.

[0064] It should be noted that all the mathematical models in this embodiment are preferred implementation methods. In other embodiments, when there is a situation where the denominator is 0, 1 can be added to the denominator based on the mathematical models provided in this embodiment to avoid the problem of non - implementation caused by the denominator being 0.

[0065] According to the above method, obtain the splicing evaluation of any two connected regions, and preset the judgment threshold , and for the splicing evaluation greater than of all connected regions, mark them, and perform image splicing on the marked crack connected regions to obtain a complete crack region, denoted as the crack splicing region.

[0066] So far, the crack splicing region is obtained.

[0067] Step S004: Obtain the cracking degree of the crack splicing region according to the distribution of the skeleton pixel points and the upper - edge pixel points of the contour of the crack splicing region.

[0068] It should be noted that determine the placement position of the region - growing seed points according to the position of the obtained crack splicing region. However, due to the different sizes and lengths of the cracks, if an equal number of seed points are placed in all crack splicing regions and region growing is performed, if the number of seed points is small, it may lead to incomplete growth for large cracks, and if the number of seed points is large, it may lead to over - growth for small cracks. To solve this problem, in this embodiment, calculate the cracking degree of each crack splicing region, and then determine the number of different seed points to be placed according to the size of the cracking degree, so as to make the growth result more accurate.

[0069] Furthermore, for the crack splicing area, the wider the width of its crack opening and the longer the extension length of the crack, the greater the degree of cracking of this crack. To measure the extension length of a certain crack, the skeleton length in the morphological skeleton can be used. The skeleton length represents the overall trunk feature of this area. Of course, the skeleton pixels can also show the width feature. Since the skeleton pixels are inside or on the boundary of the connected domain, and the cracking widths at different positions of the crack are different, the Euclidean distance between the edge pixels of the crack splicing area and the nearest skeleton pixel is calculated to measure the width of the crack.

[0070] Specifically, the calculation formula for the degree of cracking of the crack splicing area is:

[0071] ;

[0072] Where, is the degree of cracking of the crack splicing area , is the Euclidean distance between the th edge pixel point on the contour of the crack splicing area and its nearest skeleton pixel, is the number of edge pixel points of the crack splicing area , is the skeleton length of the crack splicing area , represents the maximum skeleton length of all crack areas in the entire image, represents the maximum and minimum skeleton lengths of all crack splicing areas in the entire image.

[0073] represents the cracking width of the crack, which is measured by the average statistical value of the nearest distance between the edge pixel points and the skeleton pixel points of the crack splicing area. If this average statistical value is larger, it means the overall cracking width of the crack is larger, and then the degree of cracking of the crack splicing area is greater; represents the relative skeleton length of the crack splicing area . If the skeleton length of the crack splicing area is longer among the skeleton lengths of all crack areas, that is, the extension length of the crack is relatively longer, then it means its degree of cracking is greater. Combining the crack opening width and the extension length, the degree of cracking of any crack splicing area is obtained.

[0074] According to the above method, the degrees of cracking of all crack splicing areas are obtained.

[0075] So far, the degrees of cracking of all crack splicing areas are obtained.

[0076] Step S005: Obtain the number of seed points to be placed within the crack splicing region according to the degree of cracking of the crack splicing region.

[0077] It should be noted that, in order to make the edge of the crack splicing region more accurate, in this embodiment, the region growing technique is used to determine the seed point placement rule based on the position of the crack splicing region and the corresponding degree of cracking for region growing, so as to grow an accurate and complete image of the crack splicing region.

[0078] Specifically, for the placement of seed points, seed points can be evenly placed according to the position of each crack splicing region, and the number of seed points placed is determined by the degree of cracking of the crack splicing region. If the degree of cracking of a certain crack splicing region is greater, it indicates that the crack is more serious, and the number of seed points placed is more. The calculation formula for the number of seed points placed is as follows:

[0079] ;

[0080] Wherein, is the number of seed points to be placed within the th crack splicing region, is the minimum value of the degrees of cracking of all crack splicing regions, is the degree of cracking of the th crack splicing region, represents rounding down.

[0081] According to the above method, obtain the number of seed points to be placed within each crack splicing region.

[0082] Thus far, obtain the number of seed points to be placed within each crack splicing region.

[0083] Step S006: Obtain the final crack region according to the number of seed points to be placed within the crack splicing region; determine the quality of the endoscopic stent according to the final crack region.

[0084] According to the number of seed points to be placed within each crack splicing region, place the seed points and perform region growing to obtain a number of candidate regions, that is, each crack splicing region is divided into a number of candidate regions. In each crack splicing region, the candidate region with the minimum gray mean value is recorded as the final crack region. Among them, the region growing algorithm is a prior art and will not be elaborated here. After obtaining the final crack region, mark the crack position and the corresponding degree of cracking on the surface image of the corresponding endoscopic robot stent. The preset detection threshold of this embodiment , which can be set to other values in other embodiments, is not limited in this embodiment;

[0085] When the number of final crack regions is greater than , the quality of the endoscopic stent is unqualified;

[0086] When the number of the final crack regions is less than or equal to , the quality of the endoscopic stent is qualified.

[0087] So far, this embodiment is completed.

[0088] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An endoscopic robot stent defect detection method based on machine vision, characterized in that: The method comprises the following steps: Acquire a foreground stent image of the endoscopic robot and segment the foreground stent image into a plurality of regions; According to the possibility that the connected domain of the region is the connected domain of the fracture, the fracture connected domain is selected from the connected domains of all regions; According to the direction similarity and endpoint connectivity between adjacent fracture connection domains, a splicing evaluation between adjacent fracture connection domains is obtained; according to the splicing evaluation between adjacent fracture connection domains, the fracture connection domains are merged to obtain a number of fracture splicing regions; The cracking degree of the crack splicing area is obtained according to the distribution of the skeleton pixel points of the crack splicing area and the edge pixel points on the outline of the crack splicing area; According to the cracking degree of the crack splicing area, the number of seed points placed in the crack splicing area is obtained; According to the number of seed points placed in the crack splicing area, the final crack area is obtained; and the quality of the endoscope bracket is determined according to the final crack area; The possibility of the connected domain of the region being the connected domain of the fracture is selected from the connected domains of all regions, and the specific formula included is as follows: ; in, It indicates the possibility that the connected domain of any region is a fracture connected domain. represents the maximum gray value of the connected domain, represents the average gray value of the connected domain, Indicates the first The gray value of a pixel, Indicates the number of pixels contained in the connected domain. represents the skeleton length corresponding to the connected domain, represents the maximum skeleton length of all connected domains, represents the minimum skeleton length of all connected domains, represents the length of the major axis of the minimum circumscribed ellipse of the connected domain, represents the length of the minor axis of the minimum circumscribed ellipse of this connected domain, express function; According to the possibility that the connected domain is a fracture connected domain, the fracture connected domain is screened out.

2. The method for detecting defects in an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The specific steps of obtaining the foreground stent image of the endoscopic robot and dividing the foreground stent image into a plurality of regions are as follows: The camera captures an image of the surface of the endoscopic robot support, and performs semantic segmentation on the image to obtain a number of regions.

3. The method for detecting defects of an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The method of screening out the fracture connected domains according to the possibility that the connected domains are fracture connected domains comprises the following specific steps: The possibility of treating the connected domain as the fracture connected domain Greater than The connected domain of is marked and recorded as the crack connected domain. is the preset target threshold.

4. The method for detecting defects in an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The splicing evaluation between adjacent fracture connected domains is obtained according to the direction similarity and endpoint connectivity between adjacent fracture connected domains, and the specific formula included is as follows: ; in, Represents the fracture connectivity domain Connected to the crack Evaluation of splicing, Represents the fracture connectivity domain of The largest principal component vector, Represents the fracture connectivity domain of The largest principal component vector, Represents the fracture connectivity domain The grayscale mean, Represents the fracture connectivity domain The grayscale mean, Indicates endpoint connectivity, represents the linear normalization function, Indicates directional similarity.

5. The method for detecting defects of an endoscopic robot stent based on machine vision according to claim 4, characterized in that: The specific calculation formula of the endpoint connectivity is as follows: ; in, Represents the fracture connectivity domain The left endpoint width, Represents the fracture connectivity domain The right endpoint width, Represents the fracture connectivity domain The left endpoint width, Represents the fracture connectivity domain The right endpoint width.

6. The method for detecting defects of an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The method of merging the fracture connection domains according to the splicing evaluation between adjacent fracture connection domains to obtain a plurality of fracture splicing regions includes the following specific steps: The splicing evaluation of the connected domain is greater than The crack connected domains are image stitched to obtain the crack stitching area. is the preset judgment threshold.

7. The method for detecting defects in an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The cracking degree of the crack splicing area is obtained according to the distribution of the skeleton pixel points of the crack splicing area and the edge pixel points on the outline of the crack splicing area, and the specific formula included is as follows: ; in, Crack joint area The degree of cracking, The first The Euclidean distance between an edge pixel and its nearest skeleton pixel, Crack joint area The number of edge pixels, Crack joint area The skeleton length, represents the maximum skeleton length of all crack regions in the foreground scaffold image, Represents the minimum skeleton length of all crack splicing regions in the foreground scaffold image.

8. The method for detecting defects in an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The specific formula for obtaining the number of seed points in the crack splicing area according to the cracking degree of the crack splicing area is as follows: ; in, For the The number of seed points placed in the crack splicing area, is the minimum value of the cracking degree of all crack joint areas, For the The degree of cracking in the joint area of ​​each crack is Indicates rounding down.

9. The method for detecting defects of an endoscopic robot stent based on machine vision according to claim 1, characterized in that: The method of obtaining a final crack area according to the number of seed points placed in the crack splicing area and determining the quality of the endoscope stent according to the final crack area includes the following specific steps: According to the number of seed points in each crack splicing area, seed points are placed and regional growth is performed to obtain several candidate areas. The candidate area with the smallest grayscale mean is recorded as the final crack area. is the preset detection threshold; When the number of final crack areas is greater than , the quality of the endoscope stent is unqualified; When the number of final crack areas is less than or equal to , the quality of the endoscope stent is qualified.

Citation Information

Patent Citations

  • Centrifugal fan blade crack visual detection method based on image feature analysis

    CN117593294A