T-type glass fiber cloth cover horizontal stripe detection method and equipment and storage medium

By grayscale, filtering and segmenting the fiberglass cloth surface image, screening and fitting the rectangular shape, and judging the difference in width and brightness, the problem of thin or thin light-transmitting areas of yarn being misjudged as horizontal strips is solved, and the problem is improved. ensure the accuracy and objectivity of the test.

CN118587194AInactive Publication Date: 2024-09-03CHANGZHOU HONGFA ZONGHENG ADVANCED MATERIAL TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410783389.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When the glass fiber high-speed warp knitting machine determines the horizontal stripes, the thin or thin light-transmitting areas of the yarn may be misjudged as horizontal strips, resulting in false alarms.

Method used

A T-type glass fiber cloth surface horizontal strip detection method is adopted, which includes grayscale conversion of the images obtained by the camera, longitudinal mean filtering and median filtering, threshold segmentation, closing operation and opening operation, separation of non-connected areas, and filtering out For the area with the largest area, fit the rectangular shape, and determine the width and brightness differences to determine the horizontal bar area.

Benefits of technology

It effectively reduces false alarms, improves the accuracy and objectivity of horizontal stripe detection, and ensures horizontal stripe detection on T-type glass fiber cloth surfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587194A
    Figure CN118587194A
Patent Text Reader

Abstract

The invention relates to the technical field of digital image processing, in particular to a T-type glass fiber cloth cover horizontal stripe detection method and device and a storage medium, and the method comprises the following steps: graying an image obtained by a camera; performing longitudinal mean filtering on the grey-scale map to obtain an image A, performing median filtering on the grey-scale map to obtain an image B, and subtracting the image A from the image B to obtain an image C; carrying out threshold segmentation on the image C, carrying out closing operation and opening operation on an extracted region, and separating a non-connected region; length screening is carried out on the areas, and the area with the largest area in the screening result is selected to obtain a suspected horizontal stripe area; extracting an XLD contour from the suspected horizontal stripe region, fitting the contour into a rectangle, judging whether the width of the rectangle exceeds a detection standard or not, and if so, carrying out next judgment region brightness comparison; and calculating an average gray value in the suspected horizontal stripe region and an average gray value outside the region, comparing the average gray values, and if a difference value exceeds a set value, alarming and parking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of digital image processing, and in particular to a method, a device and a storage medium for detecting horizontal stripes on a T-type glass fiber cloth. Background Art

[0002] When the glass fiber high-speed warp knitting machine production line uses machine vision to judge horizontal stripes, some yarns are relatively thin or fine during weaving, and transmit more light, appearing as brighter areas in the image. They may be misjudged as horizontal stripes. It is necessary to increase the algorithm for judging horizontal stripes by brightness to reduce false alarms. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method, device and storage medium for detecting horizontal stripes on a T-type glass fiber cloth surface, which effectively solve the problems in the background technology.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is: a method for detecting horizontal stripes on a T-type glass fiber fabric, comprising the following steps: Grayscale the image acquired by the camera; Perform longitudinal mean filtering on the grayscale image to obtain image A, perform median filtering on the grayscale image to obtain image B, and subtract image A from image B to obtain image C; Perform threshold segmentation on image C, perform closing and opening operations on the extracted areas, and separate non-connected areas; The length of the region is screened, and the region with the largest area in the screening results is selected to obtain the suspected horizontal stripe region; Extract the XLD contour of the suspected horizontal stripe area, fit the contour into a rectangle, and determine whether the width of the rectangle exceeds the detection standard. If so, proceed to the next step of determining the brightness comparison of the area; Calculate the average grayscale value in the suspected horizontal stripe area and the average grayscale value outside the area, compare the two, and if the difference exceeds the set value, an alarm will be issued to stop the vehicle.

[0005] Furthermore, the grayscale image is subjected to longitudinal mean filtering to obtain image A, and the filter kernel is a rectangle with a width of 5 and a height of 50. The grayscale image is subjected to median filtering to obtain image B, and the median filter kernel is a circle with a radius of 3. Image A is subtracted from image B to obtain image C.

[0006] Furthermore, image C is subjected to threshold segmentation, and the threshold value is set to 25. The extracted suspected areas are subjected to closing and opening operations, and then the non-connected areas are separated, wherein the closing operation kernel is a 100*1 rectangle, and the opening operation kernel is a 20*1 rectangle.

[0007] Furthermore, the region is screened by length to select regions with a length of more than 800 pixels, and the region with the largest area in the screening result is selected to obtain the suspected horizontal stripe region.

[0008] Furthermore, the XLD contour is extracted from the suspected horizontal stripe area, and the contour is fitted into a rectangle to determine whether the width of the rectangle exceeds the detection standard. The width is set to 3 mm. If the width exceeds 3 mm, the next step is to determine the regional brightness contrast.

[0009] Furthermore, the entire image area is recorded as R1, and the suspected horizontal stripe area is recorded as R2. The average grayscale value in the suspected horizontal stripe area R2 and the average grayscale value of the complement of R2 in R1 are calculated. The two are compared. If the difference exceeds the set value of 30, an alarm is issued to stop the vehicle.

[0010] The present invention also includes a computer device, including a camera, a memory, a processor, and a computer program stored in the memory and executable on the processor. The camera is communicatively connected to the processor, and when the processor executes the computer program, the method described above is implemented.

[0011] The present invention also includes a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.

[0012] The beneficial effects of the present invention are as follows: the present invention first grays the picture acquired by the camera; performs longitudinal mean filtering on the grayscale image to obtain image A, performs median filtering on the grayscale image to obtain image B, and subtracts image A from image B to obtain image C; performs threshold segmentation on image C, performs closing and opening operations on the extracted regions, and separates non-connected regions; performs length screening on the regions, and selects the region with the largest area in the screening results to obtain the suspected horizontal stripe region; extracts the XLD contour from the suspected horizontal stripe region, fits the contour into a rectangle, and determines whether the width of the rectangle exceeds the detection standard. If so, the next step is to determine the brightness comparison of the region; calculates the average grayscale value in the suspected horizontal stripe region and the average grayscale value outside the region, compares the two, and if the difference exceeds the set value, an alarm is issued to stop the vehicle, thereby realizing the horizontal stripe detection of the T-type glass fiber cloth surface. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 Flow chart of a method for detecting horizontal stripes on a T-type glass fiber fabric surface in an embodiment of the present invention; Figure 2 Schematic diagram of the structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0016] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only implementation method.

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0018] like Figure 1 As shown, a method for detecting horizontal stripes on a T-type glass fiber fabric surface comprises the following steps: Grayscale the image acquired by the camera; Perform longitudinal mean filtering on the grayscale image to obtain image A, perform median filtering on the grayscale image to obtain image B, and subtract image A from image B to obtain image C; Perform threshold segmentation on image C, perform closing and opening operations on the extracted areas, and separate non-connected areas; The length of the region is screened, and the region with the largest area in the screening results is selected to obtain the suspected horizontal stripe region; Extract the XLD contour of the suspected horizontal stripe area, fit the contour into a rectangle, and determine whether the width of the rectangle exceeds the detection standard. If so, proceed to the next step of determining the brightness comparison of the area. Calculate the average grayscale value in the suspected horizontal stripe area and the average grayscale value outside the area, compare the two, and if the difference exceeds the set value, an alarm will be issued to stop the vehicle.

[0019] The specific implementation process of the present invention is as follows: first, the image acquired by the camera is grayed; the grayscale image is subjected to longitudinal mean filtering to obtain image A, the grayscale image is subjected to median filtering to obtain image B, and image C is obtained by subtracting image A from image B; image C is subjected to threshold segmentation, the extracted area is subjected to closing and opening operations, and then the non-connected area is separated; the area is subjected to length screening, and the area with the largest area in the screening result is selected to obtain the suspected horizontal stripe area; the XLD contour is extracted from the suspected horizontal stripe area, and the contour is fitted into a rectangle to determine whether the width of the rectangle exceeds the detection standard, and if so, the next step is to determine the brightness comparison of the area; the average grayscale value in the suspected horizontal stripe area and the average grayscale value outside the area are calculated, and the two are compared. If the difference exceeds the set value, an alarm is issued to stop the vehicle, thereby realizing the horizontal stripe detection of the T-type glass fiber cloth surface.

[0020] In the present invention, the grayscale image is subjected to longitudinal mean filtering to obtain image A, and the filter kernel is a rectangle with a width of 5 and a height of 50, which can effectively remove the longitudinal noise in the image while retaining the overall structure of the image. Since the height of the kernel is much greater than the width, this filtering has a stronger smoothing effect in the longitudinal direction, but has less effect in the transverse direction. The grayscale image is subjected to median filtering to obtain image B, and the median filter kernel is a circle with a radius of 3. Image C is obtained by subtracting image A from image B. By subtracting image A (longitudinal mean filter result) from image B (median filter result), a difference image C can be obtained, which highlights the difference between the two filtering methods. Image C may contain more edge information and details, because this information is better preserved in median filtering, but may be smoothed out in mean filtering. If there are specific noise patterns or structural features in the original grayscale image, this method may help enhance these features and make them easier to be recognized or processed by subsequent image processing steps.

[0021] In the present invention, the image C is subjected to threshold segmentation, the threshold value is set to 25, and the extracted suspected area is subjected to closing operation and opening operation. The closing operation first dilates and then corrodes, which helps to close the small holes on the foreground object, or the small black dots, thereby filling the small holes in the object. The opening operation first corrodes and then dilates, which can eliminate the small foreground color noise in the background, smooth the shape boundary, and disconnect the small connections between objects, thereby removing the burr area in the image, and then separating the non-connected area, wherein the closing operation kernel is a 100*1 rectangle, and the 100*1 rectangular kernel is suitable for processing image areas with longitudinal features or where longitudinal connections need to be emphasized, and the opening operation kernel is a 20*1 rectangle, and the 20*1 rectangular kernel can effectively remove burrs and noise without excessively affecting the overall structure of the image, in order to remove the burr area, make the suspected area smoother.

[0022] In the present invention, the length of the region is screened. Through the length screening, the horizontal bar-shaped region can be clearly identified and extracted. The region with a length of more than 800 pixels is screened out, which can effectively reduce misidentification. Shorter regions are likely to be noise, text, graphics or other non-target elements, while regions with a length of more than 800 pixels are more likely to be target horizontal bars. Selecting the region with the largest area in the screening results to obtain the suspected horizontal bar region can further improve the accuracy of recognition. The region with the largest area often best conforms to the horizontal bar characteristics and is more likely to be the target region.

[0023] In the present invention, the XLD contour, i.e., the sub-pixel contour data, is extracted from the suspected horizontal bar area, which can provide higher precision and accuracy, and is helpful for more detailed processing and analysis of the contour. The contour is fitted into a rectangle, which can further simplify the target shape and make it more in line with the needs of subsequent processing and analysis. Fitting into a rectangle also facilitates the calculation of parameters such as width and height, and determines whether the width of the rectangle exceeds the detection standard. The width is set to 3mm, so that the detection process has a clear quantitative standard, which improves the objectivity and accuracy of the detection. If the width exceeds 3mm, the next step of judging the regional brightness contrast is carried out. This step can further verify the characteristics of the target area and improve the accuracy of the detection.

[0024] In the present invention, the entire image area is recorded as R1, the suspected horizontal stripe area is recorded as R2, and the average grayscale value in the suspected horizontal stripe area R2 and the average grayscale value of the complement of R2 in R1 are calculated. By comparing the two, the abnormal area in the image can be detected quickly and accurately. This grayscale value-based difference detection method is particularly effective for identifying horizontal stripe obstacles or abnormal areas. If the difference exceeds the set value of 30, an alarm is issued to stop the vehicle.

[0025] See also Figure 2 A computer device 400 provided in an embodiment of the present application includes: a camera, a processor 410 and a memory 420, wherein the memory 420 stores a computer program executable by the processor 410, and when the computer program is executed by the processor 410, the above method is executed.

[0026] The embodiment of the present application further provides a storage medium 430 on which a computer program is stored. When the computer program is run by the processor 410, the above method is executed.

[0027] Among them, the storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

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

[0029] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0030] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0031] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0032] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0033] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0034] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0035] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

[0036] Those skilled in the art should understand that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A method for detecting horizontal stripes on a T-type glass fiber fabric, characterized in that: The steps include: Grayscale the image acquired by the camera; Perform longitudinal mean filtering on the grayscale image to obtain image A, perform median filtering on the grayscale image to obtain image B, and subtract image A from image B to obtain image C; Perform threshold segmentation on image C, perform closing and opening operations on the extracted areas, and separate non-connected areas; The length of the region is screened, and the region with the largest area in the screening results is selected to obtain the suspected horizontal stripe region; Extract the XLD contour of the suspected horizontal stripe area, fit the contour into a rectangle, and determine whether the width of the rectangle exceeds the detection standard. If so, proceed to the next step of determining the brightness comparison of the area. Calculate the average grayscale value in the suspected horizontal stripe area and the average grayscale value outside the area, compare the two, and if the difference exceeds the set value, an alarm will be issued to stop the vehicle.

2. The method for detecting horizontal stripes on T-type glass fiber fabric according to claim 1, characterized in that: Image A is obtained by performing a vertical mean filter on the grayscale image. The filter kernel is a rectangle with a width of 5 and a height of 50. Image B is obtained by performing a median filter on the grayscale image. The median filter kernel is a circle with a radius of 3. Image C is obtained by subtracting image A from image B.

3. The method for detecting horizontal stripes on T-type glass fiber fabric according to claim 1, characterized in that: Image C is segmented by threshold, and the threshold value is set to 25. The extracted suspected areas are closed and opened, and then the non-connected areas are separated. The closing kernel is a 100*1 rectangle, and the opening kernel is a 20*1 rectangle.

4. The method for detecting horizontal stripes on a T-type glass fiber fabric according to claim 1, characterized in that: The length of the region is screened to select the region with a length of more than 800 pixels, and the region with the largest area in the screening result is selected to obtain the suspected horizontal stripe region.

5. The method for detecting horizontal stripes on T-type glass fiber fabric according to claim 1, characterized in that: The XLD contour is extracted from the suspected horizontal stripe area, and the contour is fitted into a rectangle to determine whether the width of the rectangle exceeds the detection standard. The width is set to 3mm. If the width exceeds 3mm, the next step is to determine the brightness contrast of the area.

6. The method for detecting horizontal stripes on T-type glass fiber fabric according to claim 1, characterized in that: The entire image area is recorded as R1, and the suspected horizontal stripe area is recorded as R2. The average grayscale value in the suspected horizontal stripe area R2 and the average grayscale value of the complement of R2 in R1 are calculated. The two are compared. If the difference exceeds the set value of 30, an alarm is issued to stop the vehicle.

7. A computer device, characterized in that: The method comprises a camera, a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the camera is communicatively connected to the processor, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

8. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Surface flaw detecting method and device

    CN101419176A

  • Cloth cover horizontal stripe detection method, device and equipment and storage medium

    CN117670842A

  • Carbon fiber cloth cover horizontal stripe detection method, device and equipment and storage medium

    CN117745702A

  • Cloth cover horizontal stripe detection system and method based on convolutional neural network

    CN118134903A