A digital inspection method, system, and medium for capsule-shaped fiber cross-sections based on image fitting.

Image fitting technology has solved the problem of identification and measurement in the detection of capsule-shaped fiber cross sections, realizing the automated identification and efficient measurement of irregular cross sections, generating detailed inspection reports, and improving detection efficiency and accuracy.

CN122820715BActive Publication Date: 2026-11-17TAISHAN FIBERGLASS ZOUCHENG
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202611298315.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-17
Estimated Expiration
2046-08-26

AI Technical Summary

Technical Problem

Existing technologies cannot effectively identify and measure the geometric parameters of capsule-shaped fibers, especially the major axis, minor axis, and aspect ratio of irregular cross-sections. They also cannot automatically repair the concave contours caused by imaging defects and cannot identify irregular cross-sections with insufficient filling rate, resulting in low detection efficiency and poor accuracy.

Method used

An image fitting-based method is adopted, which uses CLAHE local contrast enhancement and OTSU-adaptive dual threshold fusion binarization to process the image, combines the Suzuki-Abe algorithm to extract the contour and the convex hull algorithm to repair defects, the rotating caliper algorithm to fit the minimum bounding rectangle, calculates the fill rate to identify irregular cross sections, and generates an inspection report.

Benefits of technology

It enables efficient and automated identification and measurement of capsule-shaped fiber cross-sections, improving the identification rate and accuracy, reducing human intervention, enhancing the robustness and environmental adaptability of the test, and generating detailed inspection reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122820715B_ABST
    Figure CN122820715B_ABST
Patent Text Reader

Abstract

This invention discloses a digital inspection method, system, and medium for capsule-shaped fiber cross-sections based on image fitting, relating to the field of glass fiber quality inspection technology. The method includes: acquiring original images containing multiple capsule-shaped fiber cross-sections and preprocessing them to obtain binarized images; extracting contours from the binarized images and repairing defects in the extracted contours; fitting a minimum bounding rectangle to the repaired contours and performing size threshold filtering to obtain an effective fitted rectangle; calculating the length, width, and aspect ratio of each fiber cross-section based on the effective fitted rectangle, and identifying and marking irregular cross-sections according to the fill rate; statistically analyzing the length, width, and aspect ratio of all fiber cross-sections, comparing them with product control standards to determine the compliance level, and generating an inspection report. This invention achieves fully automated digital inspection of capsule-shaped fiber cross-sections, significantly improving inspection efficiency, accuracy, and repeatability, and reducing reliance on human resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a digital inspection method, system, and medium for capsule-shaped fiber cross-sections based on image fitting, belonging to the field of glass fiber quality inspection technology. Background Technology

[0002] Capsule-type fibers are a type of profiled glass fiber. In actual production, it is necessary to control and test the length, width, and aspect ratio of multiple fibers to ensure the stability of product performance.

[0003] In the field of computer vision image processing, relevant technologies have been applied to fiber detection. For example, Chinese patent application CN115311503A discloses a fiber classification method. This method uses the Solov2 deep learning model to extract fiber images, uses the OpenCV findContours algorithm to extract contours, and uses the Sklansky algorithm to obtain the convex hull of the contours. However, this technical solution has the following shortcomings: First, this solution belongs to the field of textile fiber classification, and its processing object is the longitudinal texture image of animal fibers and chemical fibers. It uses the convex hull and minimum bounding rectangle to perform morphological screening of fibers for subsequent texture classification, rather than measuring the geometric parameters of glass fiber cross-sections; Second, in this solution, the convex hull is only used to calculate the minimum bounding rectangle and does not repair the concave contour caused by imaging defects. When the imaging quality is poor, the integrity of the contour extraction cannot be guaranteed; Third, this solution only performs simple morphological screening based on aspect ratio, which cannot identify irregular cross-sections with insufficient fill rate, nor can it perform product grade determination and quality inspection.

[0004] Chinese patent application CN120598850A discloses a high-throughput quantitative testing system and method for fiber cross-sectional features, which extracts the fiber cross-sectional diameter and roundness after grayscale, noise reduction, and binarization processing of the fiber cross-sectional image. However, this technical solution has the following shortcomings: First, this solution is designed for measuring the diameter of circular cross-section fibers and cannot be applied to measuring the major axis, minor axis, and aspect ratio of capsule-shaped irregular fiber cross-sections; second, this solution does not involve automatic repair of concave defects in the contour, and the accuracy of the cross-sectional contour is difficult to guarantee when the imaging illumination is uneven; third, this solution does not involve automatic identification of irregular cross-sections based on the filling rate and cannot detect unsaturated or irregular irregular fibers.

[0005] Therefore, there is an urgent need for a method and system that can automate and digitize the inspection of capsule-shaped fiber cross-sections to improve inspection efficiency, accuracy and stability. Summary of the Invention

[0006] The purpose of this invention is to address the shortcomings of the prior art by providing a digital inspection method, system, and medium for capsule-shaped fiber cross-sections based on image fitting, thereby solving the problems of low efficiency, small sampling, and poor repeatability of existing manual inspection methods.

[0007] To achieve the above objectives, the present invention provides the following technical solution: The image-fitting-based digital inspection method for capsule-shaped fiber cross-sections described in this invention includes the following steps: S1: Obtain an original image containing multiple capsule-shaped fiber cross-sections, and preprocess the original image to obtain a binarized image; S2: Extract contours from the binarized image and repair defects in the extracted contours to obtain repaired contours; S3: Fit the minimum bounding rectangle to the repaired contour, and filter the fitted rectangle by size threshold to obtain the effective fitted rectangle; S4: Calculate the length, width, and aspect ratio of each fiber cross-section based on the effective fitted rectangle, and identify and mark irregular cross-sections according to the fill rate; S5: Perform statistical analysis on the length, width, and aspect ratio of all fiber cross sections, compare them with product control standards to determine the compliance level, and generate an inspection report.

[0008] Further, the preprocessing in step S1 includes: converting the original image into a grayscale image, performing local contrast enhancement on the grayscale image using a contrast-limited adaptive histogram equalization method, performing binarization processing on the enhanced image using a fusion method of OTSU global threshold binarization and adaptive local threshold binarization, taking the intersection of the two binarization results to obtain the final binarized image, and then performing morphological opening and / or closing operations on the binarized image.

[0009] Furthermore, the contour extraction in step S2 employs the Suzuki-Abe algorithm, performing raster scanning on the binarized image and extracting all contours through boundary detection and boundary tracking. During the tracking process, the contour area is calculated using the shoelace formula. ; in, The total number of contour points. For the first The coordinates of the contour points, and The extracted contours are then filtered by area, shape, and complexity to exclude non-fiber cross-section contours.

[0010] Furthermore, the logic of the convex hull algorithm in step S2 for repairing concave defects in the contour is as follows: ; in, The foreground region as actually observed. for convex hull, Foreground region after repair; point set convex hull It includes The minimum convex set is defined as: ; in, For point set The point in the middle, These are the weighting coefficients. The number of points participating in the convex combination.

[0011] Furthermore, the minimum bounding rectangle fitting in step S3 employs a rotating caliper algorithm, including: calculating the convex hull of the contour; initializing four calipers and determining the extreme points in four directions on the convex hull; and traversing each edge of the convex hull. Rotation makes The base of the rectangle is used as the base, and the width of the rectangle is calculated in the rotated coordinate system. and height ,in and In the rotated coordinate system The maximum and minimum values ​​of the coordinates. and In the rotated coordinate system The maximum and minimum values ​​of the coordinates; record the rectangle with the smallest area, convert its parameters back to the original coordinate system, and obtain the smallest bounding rectangle; the size threshold filtering includes at least one of the following filtering methods: filtering based on the physical threshold range of the rectangle's length, width, and aspect ratio set according to the pre-detection results; filtering incomplete sections near the image edge; filtering contours with contour integrity lower than the set threshold.

[0012] Furthermore, the formula for calculating the fill rate in step S4 is as follows: ; in, For the outline area, The capsule-shaped area; the capsule-shaped area The calculation formula is: ; in, To fit the length of the rectangle, To fit the width of the rectangle; by setting a fill rate threshold, sections with a fill rate below the threshold are identified as irregular sections.

[0013] Furthermore, the contrast-limited adaptive histogram equalization method includes: dividing the image into... Each tile, for each tile Calculate histogram Using clipping thresholds Cutting is performed, among which... This represents the total number of pixels in the tile. The cropping factor is used; the excess pixel values ​​are evenly distributed across the gray levels, and the cumulative distribution function is calculated based on the cropped histogram. Generate mapping function ,in, The number of gray levels; for each pixel The output pixel value is obtained by weighting the mapping function of the patch and its adjacent patches using bilinear interpolation. .

[0014] Furthermore, the OTSU global threshold binarization determines the globally optimal threshold by maximizing the inter-class variance, and the formula for calculating the inter-class variance is: ; in, and These represent the pixel percentages for background and foreground elements, respectively. and The average gray levels for the background and foreground classes are respectively; the adaptive local threshold binarization applies to each pixel. Take its surroundings The statistical value within the neighborhood window is used as a local threshold, where w is the side length of the neighborhood window.

[0015] The image-fitting-based digital inspection system for capsule-shaped fiber cross-sections of the present invention, based on the image-fitting-based digital inspection method for capsule-shaped fiber cross-sections, includes: Image acquisition module, used to acquire raw images of the cross-section of the capsule-shaped fiber; An image preprocessing module is used to preprocess the original image to obtain a binarized image; The contour processing module is used to extract contours and repair defects in the binarized image; The graphics fitting module is used to fit the minimum bounding rectangle to the repaired contour and perform size threshold filtering. The analysis and calculation module is used to calculate the length, width, aspect ratio, and fill rate of each fiber cross section, and to identify irregular cross sections based on the fill rate; The report generation module is used to perform statistical analysis on measurement data, determine compliance based on product control standards, and generate inspection reports.

[0016] The computer-readable storage medium of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the image fitting-based digital inspection method for capsule-shaped fiber cross-sections.

[0017] Compared with existing technologies, the image-fitting-based digital inspection system, method, system, and medium of the present invention for capsule-shaped fiber cross-sections exhibit the following beneficial effects in terms of technical performance and practical application: First, by employing an image preprocessing method that combines CLAHE local contrast enhancement with OTSU-adaptive dual-threshold fusion binarization, uneven illumination and noise interference can be effectively suppressed, increasing the cross-section recognition success rate to over 90%, which significantly improves the recognition rate of fiber cross-sections compared to manual visual recognition. At the same time, by combining morphological opening and closing operations to remove noise and fill holes, the integrity and accuracy of the binarized image are further improved, providing a high-quality input image for subsequent contour processing.

[0018] Second, by employing the Suzuki-Abe algorithm for contour extraction and combining it with a triple filtering mechanism of area, shape, and complexity, non-fiber cross-sectional contours can be efficiently excluded. On this basis, the convex hull algorithm is used to automatically repair concave regions of the contour caused by imaging defects or uneven illumination, restoring the complete fiber cross-sectional contour without manual intervention. This effectively overcomes the problem of incomplete contours caused by changes in illumination conditions and significantly improves the robustness and environmental adaptability of the inspection method.

[0019] Third, by using the rotating caliper algorithm to fit the minimum area bounding rectangle to the repaired contour, and combining the length, width, aspect ratio physical thresholds obtained from pre-detection, as well as multiple filtering conditions such as image edge and contour integrity, invalid contours can be eliminated. This enables high-precision, batch-based automatic measurement of the geometric parameters of capsule-shaped fiber cross-sections. Compared to manually selecting only about 10% of fiber cross-sections for measurement, the sample size is greatly increased, and the statistical representativeness and accuracy of the test results are significantly improved.

[0020] Fourth, by defining the quantitative indicator of fill rate (the ratio of outline area to capsule area) and establishing a capsule area calculation formula based on the geometric characteristics of capsule fiber, it can automatically identify irregular cross sections with fill rate below a set threshold. This achieves a leap from manual visual judgment to automated quantitative identification of irregular fibers, eliminating the subjectivity and instability of human judgment and greatly improving the accuracy and consistency of irregular cross section identification.

[0021] Fifth, by automatically calculating the mean and coefficient of variation of the length, width, and aspect ratio of all fiber cross sections, and comparing them with product control standards to determine the compliance level, a complete inspection report containing measurement data tables, histograms, statistics of irregular cross sections, and product grading results is automatically generated. This achieves full automation from image acquisition to report output, reduces the time spent on a single measurement, avoids human transcription errors, and significantly reduces the requirements for inspectors' professional skills and visual impairment. Attached Figure Description

[0022] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is the original image from Embodiment 1 of the present invention; Figure 3 This is the binarized image in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of contour repair in Embodiment 1 of the present invention; wherein, (a) is the imaging defect map of the original image, (b) is the concave map of the binarized image, (c) is the concave map after contour extraction, and (d) is the map after automatic contour repair. Figure 5 The image used in Embodiment 1 of this invention is a contour extraction image. Figure 6 The fitted image is shown in Embodiment 1 of the present invention; Figure 7 This is the measurement data table in Embodiment 1 of the present invention; Figure 8 Here are histograms showing the length and width distribution of capsule-shaped fibers in Embodiment 1 of the present invention; wherein, (a) is a histogram showing the length distribution of capsule-shaped fibers; and (b) is a histogram showing the width distribution of capsule-shaped fibers. Detailed Implementation

[0023] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0024] Example 1: like Figure 1 As shown in the figure, this embodiment provides a digital inspection system method for capsule-shaped fiber cross-sections based on image fitting. First, original images containing multiple capsule-shaped fiber cross-sections are acquired. Then, image preprocessing, contour processing, image fitting, measurement analysis and other steps are performed in sequence, and finally an inspection report is output.

[0025] The steps of this embodiment are described in detail below: Step 1: Image Preprocessing Loading Figure 2After obtaining the original image of the capsule-shaped fiber cross-section shown, the following preprocessing is performed.

[0026] 1.1 Grayscale Conversion: Convert the initial image to grayscale.

[0027] 1.2 Local contrast enhancement: The Limiting Contrast Adaptive Histogram Equalization (CLAHE) method is used to locally enhance the brightness of grayscale images. The specific steps are as follows: (1) Divide the image into A tile.

[0028] (2) For each tile Perform the following processing: Calculate histogram ; Calculate the clipping threshold ,in The clipping factor; Perform histogram clipping: ; ; ; Calculate the cumulative distribution function ; Generate mapping function ,in, The grayscale level is denoted by .

[0029] (3) For each pixel Perform the following process: Locate the cell containing the tile. And the relative position within; obtain the mapping function of four adjacent tiles; calculate the bilinear interpolation weights. , ; Calculate the mapping value A weighted average is calculated for each gray level to obtain the output pixel value. .

[0030] 1.3 Image Denoising: If necessary, noise reduction algorithms such as Gaussian blur and median filtering can be continued.

[0031] 1.4 OTSU and Adaptive Dual Threshold Fusion Binarization Processing: OTSU threshold binarization and adaptive threshold binarization are performed separately, and the intersection of the two results is taken to maximize the anti-noise and anti-uniformity processing capabilities.

[0032] 1.4.1 OTSU binarization: OTSU binarization is a global threshold binarization method whose core idea is to maximize the inter-class variance. The specific calculation steps are as follows: Statistical histogram of the image's grayscale (0-255 levels). Iterate through each possible grayscale value as a threshold. Pixels are divided into two categories: (Grayscale ≤ T, background) and (Grayscale > T, foreground). Calculation , ( , (pixel percentage) and , ( , (average gray level), and global average gray level Calculate the between-class variance: ; Take The largest As the optimal threshold, pixels with grayscale ≤ T in the image are converted to the background color (black), and pixels with grayscale > T are converted to the foreground color (white).

[0033] 1.4.2 Adaptive Binarization: Adaptive thresholding binarization is a local thresholding method that dynamically calculates the threshold based on the grayscale characteristics of each pixel's neighborhood. The specific calculation steps are as follows: For each pixel in the image Take one pixel from the surrounding area. For a neighborhood window, calculate the statistical value of the pixels within the window as the threshold: Mean method: ; Gaussian weighted average method: ; Apply a threshold to the pixel to convert pixels with grayscale ≤ T to the background color (black) and pixels with grayscale > T to the foreground color (white).

[0034] 1.4.3 Taking the intersection of two binarized images: OTSU binarization uses a global single threshold, is sensitive to uneven illumination, and is only suitable for histograms with obvious bimodalities; adaptive binarization can handle uneven illumination and shadows, and is suitable for images with large local contrast differences. Based on the characteristics of these two methods, the intersection of the two binarized images is taken to obtain the final binarized image: Final binarized image = OTSU binarized image ∩ adaptive binarized image; 1.5 Morphological opening / closing operations: Binarized images are processed using image morphology opening and closing operations: Opening operation (erosion followed by expansion): It is used to remove noise.

[0035] Closing operation (dilation followed by erosion): Used to fill holes.

[0036] The final result is as follows Figure 3 The binarized image shown.

[0037] Step 2: Contour processing: The fiber cross-sectional contours in the binary image are extracted and processed to prepare for subsequent contour fitting.

[0038] 2.1 Section contour extraction: The Suzuki-Abe algorithm is used to extract contours from binarized images. The specific steps are as follows.

[0039] 2.1.1 For binary images Perform raster scanning, scanning line by line from top to bottom and left to right. Indicates prospects, Represent the background and maintain a boundary start marker. and current (Boundary number).

[0040] 2.1.2 Boundary Detection Criteria: Outer boundary initial conditions: and That is, the current pixel is the foreground and the pixel to the left is the background, and the starting point of the outer boundary is detected.

[0041] Hole boundary initial conditions: and Then, combine the results with subsequent tracking rules to determine whether it is a hole boundary.

[0042] 2.1.3 Boundary Tracking Algorithm: From the starting point Begin by walking along the current boundary until returning to the starting point. Define 8 search directions (0-7, arranged counter-clockwise from right to left):

[0043] The core steps are: initialization, setting the starting point as... The first search direction Enter the search loop. Starting from the current direction, search for foreground pixels in the neighborhood clockwise. Once the first foreground pixel is found, record its position. Update the search direction to rotate 90 degrees counterclockwise (i.e., ), move to The termination condition is that the starting point of the second visit is consistent with the initial direction.

[0044] 2.1.4 Calculation of perimeter and area: During tracking, the perimeter (tracking steps, i.e., chain length) and area can be accumulated and calculated. The area calculation uses the shoelace formula: ; in, .

[0045] 2.1.5 Contour Filtering: The extracted contours are filtered by area, shape, and complexity to exclude non-fiber cross-section contours.

[0046] 2.2 Automatic Repair of Imaging Defect Contours: For a fiber cross-section, its physical contour should not be concave. Any concavity in a binarized image is caused by imaging defects, uneven illumination, etc. Figure 4 (a) Figure 4 As shown in (b), the concave defects in the foreground region of the binarized image are automatically filled using the convex hull algorithm to obtain a complete fiber cross-section.

[0047] Let the foreground region of the binarized image be a set. Ideally, S should be a convex set, but due to the influence of illumination, what we actually get is: S observed =S ideal \D,S observed S represents the binarized cross-sectional image. ideal This represents the actual cross-section of the fiber, where D is the missing concave region (inner part); that is, the binarized cross-sectional image = actual fiber cross-section - concavity caused by uneven illumination. Its outline is as follows... Figure 4 As shown in (c).

[0048] The convex hull of a point set P is a minimal convex set containing P: ; The repair logic for this method is: S repaired =Conv(S observed ) because Therefore, the convex hull can naturally fill the concave area, resulting in... Figure 4 The outline shown in (d) is shown in the middle.

[0049] After the above repairs, the final result is as follows: Figure 5The image shown is an extracted contour image. Further threshold filtering of the contours, such as area, aspect ratio, and compactness, can be applied to remove poor-quality contours and improve the accuracy of subsequent inspections.

[0050] Step 3: Graphical fitting: Fit the contour to the minimum bounding rectangle to facilitate the measurement of length and width.

[0051] 3.1 Minimum bounding rectangle fitting: The rotating caliper algorithm is used to find the minimum area bounding rectangle of the contour. The specific steps are as follows: (1) Calculate the convex hull of the contour.

[0052] (2) Initialize four calipers, find the extreme points in four directions on the convex hull, and determine a rectangle: the leftmost point ( (Minimum coordinates), rightmost point ( (maximum coordinates), topmost point ( Minimum coordinates), lowest point ( (Maximum coordinates).

[0053] (3) Traverse edges and rotate: When the rectangle rotates, the four contact points of the clasp move sequentially along the boundary of the convex hull. For each edge of the convex hull... Rotation makes The base of the rectangle is used to calculate the rectangle's parameters in the rotated coordinate system.

[0054] Width: The difference in x-coordinates between the leftmost and rightmost points; Height: The difference in y-coordinates between the highest and lowest points; Calculate area = width × height; The chuck position is updated in O(1) time using a rotating chuck technique.

[0055] When traversing edges, the vertices of the convex hull need to be rotated to the new coordinate system. Let the current edge be... The included angle of the axis is The rotation matrix is: ; The formula for coordinate transformation after rotation is:

[0056] In the rotated coordinate system, the rectangle parameters are calculated as follows: width ; high ; area ; center point ; (4) Return the optimal result: After traversing all edges, record the rectangle with the smallest area, transform the rectangle parameters back to the original coordinate system, and obtain the smallest bounding rectangle, finally obtaining the result as shown below. Figure 6 The rectangular fitted image is shown.

[0057] 3.2 Size threshold filtering: Based on actual production conditions and combined with pre-detection results, physical threshold filtering ranges for the rectangle's length, width, and aspect ratio are set. Incomplete sections near the image edges are filtered out, and invalid fitted graphics are also filtered out, resulting in the following: Figure 6 The fitted image shown.

[0058] 3.3 Filling ratio calculation and irregular cross-section identification: Calculate the fill rate for each fiber cross-section: ; The outline area is calculated using the aforementioned steps, and the capsule-shaped area... The calculation formula is: ; in, To fit the length of the rectangle, To fit the width of the rectangle.

[0059] By setting a fill rate threshold, unsaturated irregular cross-sections can be identified, such as... Figure 6 Section 56 in the diagram is distinguished using different colored graphics.

[0060] Step 4: Measure and output report: 4.1 Length / width detection and aspect ratio calculation: Measure each effectively fitted rectangle to obtain the length and width pixel values ​​of each shape. Convert the pixel values ​​to length values ​​according to the scale obtained from the original image resolution and magnification, calculate the aspect ratio, and count the number of irregular cross-sections to form a shape like... Figure 7 The measurement data table shown.

[0061] 4.2 Data Analysis and Histogram Drawing: Generate as Figure 8 (a) and Figure 8 The length and width histogram shown in (b) is shown in the figure.

[0062] 4.3 Compliance judgment of mean and coefficient of variation: Calculate the average length, width, aspect ratio, and coefficient of variation of all fitted rectangles, and compare them with the product control standards to determine compliance. Taking the inspection results of a certain product model as an example, the product grading results are shown in Table 1 below: Table 1 Product Rating Results

[0063] Based on the above test data, the final overall grade is determined to be A+. The above content and the final fitted image are exported to form an inspection report.

[0064] Example 2: This embodiment provides a digital inspection system for capsule-shaped fiber cross-sections based on image fitting, used to implement the method described in Embodiment 1. The system includes the following modules.

[0065] Image acquisition module: The image acquisition module is used to acquire raw images of the capsule-shaped fiber cross-section. Specifically, by using a CCD to capture high-resolution images of the fiber cross-section under a microscope at a fixed magnification, a raw digital image containing multiple capsule-shaped fiber cross-sections is obtained.

[0066] Image preprocessing module: The image preprocessing module is connected to the image acquisition module and is used to preprocess the original image to obtain a binarized image.

[0067] Contour processing module: The contour processing module is connected to the image preprocessing module and is used to extract contours and repair defects in the binarized image.

[0068] Graphics fitting module: The graphic fitting module is connected to the contour processing module and is used to fit the minimum bounding rectangle to the repaired contour and perform size threshold filtering.

[0069] Analysis and Calculation Module: The analysis and calculation module is connected to the graphics fitting module and is used to calculate the length, width, aspect ratio and fill rate of each fiber cross section, and to identify irregular cross sections based on the fill rate.

[0070] Report generation module: The report generation module is connected to the analysis and calculation module and is used to perform statistical analysis on all measurement data, determine compliance according to product control standards, and generate an inspection report.

[0071] Example 3: This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the image fitting-based digital inspection system method for capsule-shaped fiber cross-sections described in Embodiment 1.

[0072] The computer-readable storage media include, but are not limited to, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0073] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A digital inspection method for capsule-shaped fiber cross-sections based on image fitting, characterized in that, Includes the following steps: S1: Obtain an original image containing multiple capsule-shaped fiber cross-sections, and preprocess the original image to obtain a binarized image; S2: Extract contours from the binarized image and repair defects in the extracted contours to obtain repaired contours; S3: Fit the minimum bounding rectangle to the repaired contour, and filter the fitted rectangle by size threshold to obtain the effective fitted rectangle; S4: Calculate the length, width, and aspect ratio of each fiber cross-section based on the effective fitted rectangle, and identify and mark irregular cross-sections according to the fill rate; S5: Perform statistical analysis on the length, width, and aspect ratio of all fiber cross sections, compare them with product control standards to determine the compliance level, and generate an inspection report; In step S2, the convex hull algorithm is used to repair the concave defects in the contour. Let the foreground region of the binarized image be a set. Ideally, S should be a convex set, but due to the influence of illumination, what we actually get is: S observed =S ideal \D,S observed S represents the binarized cross-sectional image. ideal This represents the actual cross-section of the fiber, where D is the missing recessed area, the concave portion; That is, the binarized cross-sectional image = the actual cross-section of the fiber - the depression caused by uneven illumination; The convex hull of a point set P is the smallest convex set containing P: ; The repair logic for this method is: S repaired =Conv(S observed ); The formula for calculating the filling rate in step S4 is as follows: ; in, The area of ​​the repaired contour. The capsule-shaped area; the capsule-shaped area The calculation formula is: ; in, To fit the length of the rectangle, To fit the width of the rectangle; by setting a fill rate threshold, sections with a fill rate below the threshold are identified as irregular sections.

2. The method for digital inspection of capsule-shaped fiber cross-sections based on image fitting according to claim 1, characterized in that, The preprocessing in step S1 includes: converting the original image into a grayscale image; applying a contrast-limited adaptive histogram equalization method to the grayscale image for local contrast enhancement; performing binarization on the enhanced image using a fusion method of OTSU global threshold binarization and adaptive local threshold binarization; taking the intersection of the two binarization results to obtain the final binarized image; and then performing morphological opening and / or closing operations on the binarized image.

3. The digital inspection method for capsule-shaped fiber cross-sections based on image fitting according to claim 1, characterized in that, In step S2, contour extraction employs the Suzuki-Abe algorithm, which performs raster scanning on the binarized image and extracts all contours through boundary detection and boundary tracking. During the tracking process, the contour area is calculated using the shoelace formula. ; in, The total number of contour points. For the first The coordinates of the contour points, and The extracted contours are then filtered by area, shape, and complexity to exclude non-fiber cross-section contours.

4. The digital inspection method for capsule-shaped fiber cross-sections based on image fitting according to claim 1, characterized in that, The minimum bounding rectangle fitting in step S3 employs a rotating caliper algorithm, which includes: calculating the convex hull of the contour; initializing four calipers and determining the extreme points in four directions on the convex hull; and traversing each edge of the convex hull. Rotation makes The base of the rectangle is used as the base, and the width of the rectangle is calculated in the rotated coordinate system. and height ,in, and In the rotated coordinate system The maximum and minimum values ​​of the coordinates. and In the rotated coordinate system The maximum and minimum values ​​of the coordinates; record the rectangle with the smallest area, convert its parameters back to the original coordinate system, and obtain the smallest bounding rectangle; the size threshold filtering includes at least one of the following filtering methods: filtering based on the physical threshold range of the rectangle's length, width, and aspect ratio set according to the pre-detection results; filtering incomplete sections near the image edge; filtering contours with contour integrity lower than the set threshold.

5. The digital inspection method for capsule-shaped fiber cross-sections based on image fitting according to claim 2, characterized in that, The contrast-limited adaptive histogram equalization method includes: dividing the image into... Each tile, for each tile Calculate histogram Using clipping thresholds Cutting is performed, among which... This represents the total number of pixels in the image. The cropping factor is used; the excess pixel values ​​are evenly distributed across the gray levels, and the cumulative distribution function is calculated based on the cropped histogram. Generate mapping function ,in, The number of gray levels; for each pixel The output pixel value is obtained by weighting the mapping function of the patch and its adjacent patches using bilinear interpolation. .

6. The digital inspection method for capsule-shaped fiber cross-sections based on image fitting according to claim 2, characterized in that, The OTSU global threshold binarization determines the globally optimal threshold by maximizing the inter-class variance. The formula for calculating the inter-class variance is as follows: ; in, and These represent the pixel percentages for background and foreground elements, respectively. and The average gray levels for the background and foreground classes are respectively; the adaptive local threshold binarization applies to each pixel. Take its surroundings The statistical value within the neighborhood window is used as a local threshold, where w is the side length of the neighborhood window.

7. A digital inspection system for capsule-shaped fiber cross-sections based on image fitting, based on the digital inspection method for capsule-shaped fiber cross-sections based on image fitting according to any one of claims 1-6, characterized in that, include: Image acquisition module, used to acquire raw images of the cross-section of the capsule-shaped fiber; An image preprocessing module is used to preprocess the original image to obtain a binarized image; The contour processing module is used to extract contours and repair defects in the binarized image; The graphics fitting module is used to fit the minimum bounding rectangle to the repaired contour and perform size threshold filtering. The analysis and calculation module is used to calculate the length, width, aspect ratio, and fill rate of each fiber cross section, and to identify irregular cross sections based on the fill rate; The report generation module is used to perform statistical analysis on measurement data, determine compliance based on product control standards, and generate inspection reports.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the image fitting-based digital inspection method for capsule-shaped fiber cross-sections as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fiber classification method and system, computer device and medium

    CN115311503A

  • High-flux quantitative testing system and method for fiber section characteristics

    CN120598850A

  • Image processing device, image processing method, and program

    JP2017078989A

  • KR20240106220A