Program and detection device
By analyzing images of textiles to determine attribute patterns at multiple intersections, the program effectively detects abnormalities in textiles, addressing the limitations of existing techniques and enhancing inspection efficiency.
Patent Information
- Application Number
- PCT/JP2024/035913
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-27
- Filing Date
- 2024-10-08
- Publication Date
- 2025-05-01
AI Technical Summary
Existing techniques for detecting abnormalities in textiles, such as thread loss, lack the ability to effectively differentiate between the attributes of fabrics and standard criteria, leading to inefficiencies in inspection processes.
A program is developed that analyzes images of textiles to determine attribute patterns at multiple intersections of warp and weft threads, allowing for the detection of differences between these patterns and established criteria, and performing specific processes when abnormalities are detected.
This approach enables accurate detection of abnormalities in textiles by analyzing attribute patterns, improving the efficiency and effectiveness of fabric inspection processes.
Smart Images

Figure JP2024035913_01052025_PF_FP_ABST
Abstract
Description
Program and detection device
[0001] The present specification relates to a technique for detecting abnormalities in textiles.
[0002] Woven fabrics may have defects such as loose threads. Inspection devices for inspecting woven fabrics for defects have been proposed. For example, Patent Document 1 proposes a technique for calculating the texture period of the woven fabric, setting a comparison region of image data based on the texture period, extracting statistics from the image data within the comparison region, and extracting defects based on the statistics.
[0003] Japanese Patent Application Publication No. 10-121368
[0004] There is room for improvement in detecting differences between the attributes of the fabric and the attributes of the reference.
[0005] This specification discloses a technique for detecting differences between attributes of a fabric and attributes of a reference.
[0006] The techniques disclosed in this specification can be implemented in the following application examples.
[0007] [Application Example 1] A program that causes a computer to realize the following functions: a function of determining an attribute pattern representing the attributes of threads at each of multiple intersection positions of warp and weft threads by analyzing an image of a woven fabric having multiple warp threads and multiple weft threads that has been optically read, the attributes including one or more of visible threads of the warp threads and the weft threads, color, and width; a function of detecting differences between the attribute pattern and information representing the criteria for the attributes; and a function of executing specific processing when the differences are detected.
[0008] According to this configuration, by determining the attribute pattern by analyzing an optically read image representing the textile, differences between the attribute pattern and the information representing the attribute criteria can be appropriately detected.
[0009] The techniques disclosed in this specification can be realized in various forms, such as a detection method and a detection device, a computer program for realizing the functions of the method or device, a recording medium (e.g., a non-transitory recording medium) on which the computer program is recorded, and the like.
[0010] 1 is an explanatory diagram showing a data processing device as an embodiment; FIG. 2 is a perspective view showing an example of a scanner 100; FIG. 3 is a flowchart showing an example of an inspection process; (A)-(C) are diagrams showing examples of images processed in the inspection process; (A)-(C) are a flowchart showing an example of a process for acquiring information on warp regions, weft regions, and gap regions; (A) is a diagram showing an example of a center; (B) is a diagram showing an example of a crossing position; (C) is a flowchart showing an example of a process for determining a crossing position; (A) and (B) are diagrams showing an example of a comparison process; (A) is a diagram showing an example of a width calculation method; (B) is a diagram showing multiple warp regions Ap associated with one warp thread Wp; (C) is a diagram showing a scanned image I20; (A) is a diagram showing an example of a spacing; (B) is a histogram showing the distribution of spacing dp of warp threads Wp. (C) is a histogram showing the distribution of the spacing df of the weft thread Wf. A flowchart showing a second embodiment of the process for acquiring information on the warp region Ap and the weft region Af. (A) is a diagram showing an example of a portion of the scanned image I20. (B) is a diagram showing an example of the detection result. (A)-(G) are diagrams showing an example of a method for determining the type of candidate region. A flowchart showing another embodiment of the process for determining the intersection position. (A) is a diagram showing an example of a method for determining the extension direction DAp of the warp region Ap. (B) is a diagram showing another method for determining the extension direction DAp of the warp region Ap. (C) is a diagram showing an example of the connection of the warp regions Ap. (D) is a diagram showing centers Apc11-Apc15. (E) is a diagram showing an example of multiple warp curves WpLc and multiple weft curves WfLc.
[0011] A. First Example: A1. Device Configuration: Fig. 1 is an explanatory diagram showing a data processing device as one example. Data processing device 200 is, for example, a personal computer. Data processing device 200 performs various data processing for inspecting the appearance of an object (in this example, a textile). Hereinafter, it is assumed that the appearance of a textile 700 is to be inspected.
[0012] The data processing device 200 includes a processor 210, a storage device 215, a display unit 240, an operation unit 250, a graphics processing unit 260 (referred to as GPU 260), and a communication interface 270. These elements are connected to each other via a bus. The storage device 215 includes a volatile storage device 220 and a non-volatile storage device 230.
[0013] The processor 210 is a device configured to process data, and is, for example, a central processing unit (CPU) or a system on a chip (SoC). The volatile storage device 220 is, for example, a dynamic random access memory (DRAM), and the non-volatile storage device 230 is, for example, a flash memory. The non-volatile storage device 230 stores data for a program 231 and an object detection model 300. In this embodiment, the object detection model 300 is a program module that forms a machine learning model. Details of the program 231 and the object detection model 300 will be described later.
[0014] The display unit 240 is a device configured to display images, such as a liquid crystal display or an organic EL display. The operation unit 250 is a device configured to receive operations by a user, such as a button, a lever, or a touch panel overlaid on the display unit 240. The display unit 240 and the operation unit 250 may form a so-called touch screen. The user can input various requests and instructions to the data processing device 200 by operating the operation unit 250.
[0015] The GPU 260 is a computing device configured to perform various numerical calculations such as image processing and machine learning. The GPU 260 performs various calculations in accordance with instructions from the processor 210. A driver program (not shown) for controlling the GPU 260 may be provided by the manufacturer of the GPU 260.
[0016] The communication interface 270 is an interface for communicating with other devices (for example, it includes one or more of a USB interface, a wired LAN interface, an IEEE802.11 wireless interface, and an industrial camera interface (for example, CameraLink, CoaXPress, etc.)). In this embodiment, the communication interface 270 is connected to the scanner 100. The scanner 100 optically reads the textile 700 and generates data of the read image.
[0017] 2 is a perspective view showing an example of the scanner 100. In the figure, the first direction D1 and the second direction D2 indicate horizontal directions, and the third direction D3 indicates a vertically upward direction. The first direction D1 and the second direction D2 are perpendicular to each other.
[0018] In this embodiment, the scanner 100 is a so-called flatbed scanner. The scanner 100 includes a housing 190 and a cover 192 attached to the upper side of the housing 190 in an openable and closable manner. The upper surface of the housing 190 includes a frame 193 and a support base 194 arranged inside the frame 193. The support base 194 is a substantially rectangular transparent plate (e.g., a glass plate). The upper surface of the support base 194 is a support surface Us that supports an object to be read (e.g., a textile 700).
[0019] The scanner 100 includes a sensor unit 120, a conveying device 130, and a control device 140. These devices 120, 130, and 140 are arranged inside a housing 190. The sensor unit 120 is arranged below a support stand 194. In this embodiment, the sensor unit 120 is a one-dimensional image sensor that optically reads an object (here, a textile 700) on a support surface Us. The sensor unit 120 is a rod-shaped device that includes a light source 121 extending in a first direction D1 and a plurality of reading sensors 122 arranged side by side in the first direction D1. The reading sensors 122 are photoelectric conversion elements such as charge coupled devices (CCDs) and complementary metal oxide semiconductors (CMOSs). The sensor unit 120 illuminates the fabric 700 on the support table 194 with light from the light source 121, and optically reads the light reflected from the fabric 700 using the reading sensor 122, thereby outputting data representing the read fabric 700.
[0020] The conveying device 130 is a device that conveys the sensor unit 120 parallel to the second direction D2. The conveying device 130 may have various configurations. Although not shown, in this embodiment, the conveying device 130 includes a rail that supports the sensor unit 120 slidably in a direction parallel to the second direction D2, multiple pulleys, a belt that is wound around the multiple pulleys and is partially fixed to the sensor unit 120, and an electric motor that rotates the pulleys. The electric motor rotates the pulleys, causing the sensor unit 120 to move in a direction parallel to the second direction D2. When reading the textile 700, the conveying device 130 conveys the sensor unit 120 in the second direction D2. The sensor unit 120 repeatedly reads the textile 700 during transportation. This allows the sensor unit 120 to read the textile 700 from approximately the entire support surface Us of the support stand 194.
[0021] The control device 140 is an electric circuit configured to control the sensor unit 120 and the transport device 130. The control device 140 is configured using, for example, a computer or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC)). The control device 140 generates data of the read image by controlling the sensor unit 120 and the transport device 130. In this embodiment, the data of the read image is bitmap data representing the color values of each of a plurality of pixels (here, the gradation values of each of the three color components of red R, green G, and blue B).
[0022] A2. Inspection Process: FIG. 3 is a flowchart showing an example of the inspection process. As described in FIG. 2, the textile 700 is placed on the support surface Us of the scanner 100 for inspection. In this embodiment, an operator places the textile 700 on the support surface Us. Alternatively, a machine (e.g., a robot arm) may place the textile 700 on the support surface Us. After the textile 700 is placed, an instruction to start the inspection process is input to the data processing device 200 ( FIG. 1 ). In this embodiment, the operator inputs the instruction to start the inspection by operating the operation unit 250. The processor 210 starts the inspection process in response to the start instruction. Note that the start instruction may be input to the data processing device 200 via the communication interface 270 by a device other than the data processing device 200.
[0023] The processor 210 of the data processing device 200 executes the inspection process in accordance with the program 231. In S110, the processor 210 supplies a reading instruction to the scanner 100. The control device 140 of the scanner 100 reads the fabric 700 by controlling the sensor unit 120 and the conveying device 130 in response to the reading instruction. The control device 140 generates data of the read image and supplies the generated data to the data processing device 200.
[0024] 4A to 4C are diagrams showing examples of images processed in the inspection process. Image I10 in Fig. 4A shows an example of a scanned image of the textile 700. In this embodiment, scanned image I10 is a rectangular image having two sides parallel to a first direction Dx and two sides parallel to a second direction Dy perpendicular to the first direction Dx.
[0025] In this embodiment, the woven fabric 700 is configured such that multiple warp threads Wp and multiple weft threads Wf intersect with each other. The warp threads Wp are threads extending in the vertical direction. Multiple thread portions extending in the vertical direction at multiple positions in the horizontal direction of the woven fabric 700 correspond to the multiple warp threads Wp. The weft threads Wf are threads extending in the horizontal direction. Multiple thread portions extending in the horizontal direction at multiple positions in the vertical direction of the woven fabric 700 correspond to the multiple weft threads Wf. The multiple weft threads Wf may be formed by folding back a single long thread multiple times. In this way, a single long thread may form multiple thread portions extending in the horizontal direction at multiple positions in the vertical direction (i.e., multiple weft threads Wf). The same applies to the multiple warp threads Wp.
[0026] Various deformations can occur in a woven fabric. Two line segments Df and Dp are shown on the scanned image I10. The first line segment Df is a line segment parallel to the weft yarn Wf, and the second line segment Dp is a line segment parallel to the warp yarn Wp. As shown in the figure, the first line segment Df is not perpendicular to the second line segment Dp but is inclined. In this way, a skew occurs in the woven fabric 700.
[0027] In S115 (FIG. 3), the processor 210 performs skew correction on the scanned image I10. The skew correction may be any of various processes (e.g., affine transformation) that correct the scanned image I10 so that it represents the textile 700 without skew. FIG. 4B shows an example of a scanned image I20 after skew correction. As shown in the figure, in the image I20, the first line segment Df is approximately parallel to the first direction Dx, and the second line segment Dp is approximately parallel to the second direction Dy.
[0028] Various methods may be used to determine the skew correction parameters. For example, the processor 210 may analyze the scanned image I10 to detect skew in the fabric 700 and correct the detected skew. Various methods may be used to detect skew. For example, the processor 210 may use a Hough transform to detect the direction parallel to the weft yarn Wf and the direction parallel to the warp yarn Wp. Alternatively, the processor 210 may determine the skew correction parameters according to information input by an operator. For example, the processor 210 may display the scanned image I10 on the display unit 240 ( FIG. 1 ). The operator may specify the positions of both ends of the line segments Df and Dp on the scanned image I10 by operating the operation unit 250. The processor 210 may perform skew correction according to the line segments Df and Dp specified by the operator.
[0029] FIG. 4C is a diagram showing an example of an enlarged view of a portion I20p of the scanned image I20 (FIG. 4B) after skew correction. The scanned image I20 shows multiple weft threads Wf, multiple warp threads Wp, and the gaps Wg between these multiple threads Wf and Wp. The multiple weft threads Wf are each approximately parallel to the first direction Dx. The multiple warp threads Wp are each approximately parallel to the second direction Dy. The weave of the fabric 700 can be various, such as a "plain weave," a "twill weave," or a "satin weave."
[0030] In S120 (FIG. 3), the processor 210 analyzes the skew-corrected scanned image I20 to obtain information on the warp region, weft region, and gap region. FIG. 5 is a flowchart showing an example of a process for obtaining information on these regions. In S210, the processor 210 detects the warp region, weft region, and gap region from the scanned image I20. FIGS. 6(A) to 6(C) show examples of the detected warp region, weft region, and gap region, respectively. Each figure shows a portion I20p of the scanned image I20.
[0031] 6A, each of the multiple warp regions Ap (including multiple warp regions Ap1-Ap5) is hatched. Each of the multiple warp regions Ap represents a visible portion of the multiple warp threads Wp that is not hidden by the weft threads Wf. In this embodiment, a continuous region representing a portion of the warp threads Wp that overlaps with one or more weft threads Wf is used as the warp region Ap.
[0032] In Figure 6(B), each of the multiple weft regions Af (including multiple weft regions Af1-Af4) is hatched. Each of the multiple weft regions Af represents a visible portion of the multiple wefts Wf that is not hidden by the warp threads Wp. In this embodiment, a continuous region representing a portion of the wefts Wf that overlaps with one or more warp threads Wp is used as the weft region Af.
[0033] In Fig. 6(C), each of the gap regions Ag (including the gap regions Ag1 to Ag6) is hatched. Each of the gap regions Ag represents a gap between the warp yarns Wp and the weft yarns Wf.
[0034] Various methods may be used to detect these regions Ap, Af, and Ag. In this embodiment, the processor 210 detects the regions Ap, Af, and Ag using a trained object detection model 300. The object detection model 300 may be various models capable of detecting the regions Ap, Af, and Ag. In this embodiment, the object detection model 300 is a model called "Mask R-CNN" disclosed in the following paper: Kaiming He, Georgia Gkioxari, Piotr Dollar (the "a" has an acute accent) and Ross Girshick, "Mask R-CNN", arXiv:1703.06870, 24 Jan. 2018, http: / / arxiv.org / abs / 1703.06870
[0035] Mask R-CNN is a model that performs region segmentation known as instance segmentation. This region segmentation detects the object region and object type (class) for each object. This region segmentation determines, for each pixel, which object region the pixel belongs to. The object detection model 300 is pre-trained to appropriately segment multiple types of regions, including warp regions Ap, weft regions Af, gap regions Ag, and other regions. The training method may be, for example, the training method for Mask R-CNN described in the above-mentioned paper.
[0036] In S215 (FIG. 5), the processor 210 stores position data (described below) and type data of each of the regions Ap and Af representing the yarns in the storage device 215 (e.g., the non-volatile storage device 230). The type data indicates the type of region (here, warp region Ap or weft region Af). In S220, the processor 210 stores position data of each gap region Ag in the storage device 215 (e.g., the non-volatile storage device 230). Then, the processor 210 ends the processing in FIG. 5, i.e., the processing at S120 in FIG. 3.
[0037] The position data may be various data representing the position of an area within the scanned image. For example, the shape of each area Ap, Af, Ag may be approximated by a rectangle having two sides parallel to the first direction Dx and two sides parallel to the second direction Dy (e.g., the smallest rectangle circumscribing the area). The position data may represent the coordinates of the four vertices of the rectangle approximating the corresponding area. Note that the warp threads Wp and the weft threads Wf are flexible and easily deformed. Although not shown, within the scanned image I20, the warp threads Wp may be curved rather than straight. Similarly, the weft threads Wf may be curved rather than straight. The shape of each area Ap, Af, Ag may differ from a rectangle. The position data may represent various information representing the position of such an area. In this embodiment, in S210 ( FIG. 5 ), the processor 210 assigns area identifiers to each of the detected areas Ap, Af, Ag, distinguishing each area from the others. Then, in S215 and S220, the processor 210 generates data representing the correspondence between the pixels of the scanned image I20 and the area identifier for each pixel as position data.
[0038] In S125 (FIG. 3), the processor 210 analyzes the scanned image I20 to determine color values for each of the multiple warp regions Ap and each of the multiple weft regions Af. The color values of the regions may be various values that represent the color of the region represented by the scanned image I20. For example, the color value of the region may be determined as a statistical quantity (e.g., the average or mode of multiple color values of multiple pixels) that indicates the magnitude of the gradation value of each color component within the region. Here, a portion of the multiple pixels within the region may be used. Alternatively, the color value of the region may be determined as the color value of a specific pixel within the region (e.g., the pixel at the center of the region). The processor 210 stores data representing the color values of each region in the storage device 215 (e.g., the non-volatile storage device 230).
[0039] In S135, the processor 210 determines the center of each of the multiple warp regions Ap and the center of each of the multiple weft regions Af. FIG. 7A is a diagram showing an example of the centers. The figure shows a portion I20p of the scanned image I20, the same as that shown in FIG. 4C. The center Apc of the warp region Ap (referred to as the warp center Apc) and the center Afc of the weft region Af (referred to as the weft center Afc) are indicated by black dots. The processor 210 uses, for example, the positions of the centers of gravity of the regions Ap and Af as the positions of the centers Apc and Afc of the regions Ap and Af in the scanned image I20. Alternatively, the regions Ap and Af may be approximated by a rectangle (e.g., the smallest rectangle circumscribing the region). The processor 210 may use the average position of the four corners of the rectangle as the center position. The processor 210 stores data representing the positions of the centers Apc and Afc of the regions Ap and Af in the storage device 215 (for example, the non-volatile storage device 230).
[0040] In S160 (FIG. 3), the processor 210 determines multiple intersection positions between multiple warp threads Wp and multiple weft threads Wf. FIG. 8 is a flowchart showing an example of the process for determining the intersection positions. In S450, the processor 210 determines the position Wpx of each of the multiple warp threads Wp in the first direction Dx. In this embodiment, the processor 210 determines the position Wpx of each of the multiple warp threads Wp using multiple warp centers Apc.
[0041] The graph GP1 below the scanned image I20 in FIG. 7A is an example of a histogram showing the distribution of the positions Pcx of the warp centers Apc in the first direction Dx. As described above, the warp threads Wp are approximately parallel to the second direction Dy. Therefore, the positions Pcx of multiple warp centers Apc associated with the same warp thread Wp in the first direction Dx are approximately the same. One peak in the distribution of the positions Pcx corresponds to one warp thread Wp. In this embodiment, the processor 210 generates a histogram of the positions Pcx of the warp centers Apc in the first direction Dx and uses the positions Pcx of the multiple peaks as the multiple positions Wpx of the multiple warp threads Wp.
[0042] Furthermore, the processor 210 may classify the positions Pcx of the warp centers Apc into multiple clusters by clustering. One cluster corresponds to one warp thread Wp. The processor 210 may adopt a representative position Pcx of the cluster as the position Wpx of the warp thread Wp. The representative position may be, for example, the center position of the distribution range of the positions Pcx included in the cluster, or the average position of the positions Pcx included in the cluster. Various methods can be used as the clustering method. For example, the k-means method may be used (the total number of clusters k may be set to the total number of warp threads Wp).
[0043] In S455 (FIG. 8), the processor 210 determines the position Wfy of each of the plurality of weft yarns Wf in the second direction Dy. In this embodiment, the processor 210 determines the position Wfy of each of the plurality of weft yarns Wf using the plurality of weft yarn centers Afc.
[0044] The graph GP2 on the right of the scanned image I20 in FIG. 7A is an example of a histogram showing the distribution of the positions Pcy of the weft centers Afc in the second direction Dy. As described above, the weft thread Wf is approximately parallel to the first direction Dx. Therefore, the positions Pcy of multiple weft centers Afc associated with the same weft thread Wf in the second direction Dy are approximately the same. One peak in the distribution of the positions Pcy corresponds to one weft thread Wf. The processor 210 determines the position Wfy of the weft thread Wf using a method similar to the method for determining the position Wpx of the warp thread Wp. For example, the processor 210 uses the peak position Pcy or a representative position Pcy of the cluster as the position Wfy of the weft thread Wf.
[0045] In S460 (FIG. 8), the processor 210 determines multiple crossing positions as multiple combinations of the position Wpx of the warp thread Wp and the position Wfy of the weft thread Wf. FIG. 7(B) is a diagram showing examples of crossing positions. The figure shows a portion I20p of the same scanned image I20 as in FIG. 7(A). Multiple straight lines WpL extend in the second direction Dy at multiple positions Wpx in the first direction Dx and correspond to multiple warp threads Wp. Multiple straight lines WfL extend in the first direction Dx at multiple positions Wfy in the second direction Dy and correspond to multiple weft threads Wf. Multiple crossing positions Cp correspond to the intersections of the multiple straight lines WpL and WfL.
[0046] In S465 (FIG. 8), the processor 210 stores data representing the multiple intersection positions Cp in the storage device 215 (e.g., the non-volatile storage device 230). Then, the processor 210 ends the processing in FIG. 8, i.e., the processing of S160 in FIG. 3.
[0047] In S165, the processor 210 compares the attribute pattern with reference attributes. FIG. 9 is a flowchart showing an example of the comparison process. In S510, the processor 210 determines an interlacing pattern. FIG. 10A is a diagram showing an example of the comparison process between the interlacing pattern and a reference interlacing pattern. A portion of the interlacing pattern PI1 is shown in the figure. The interlacing pattern PI1 represents the threads visible at each of the multiple intersection positions of multiple warp threads Wp and multiple weft threads Wf (i.e., the positions where the warp threads Wp and the weft threads Wf overlap). Such an interlacing pattern PI1 is also called a texture diagram. Although not shown, the interlacing pattern PI1 represents the entire pattern of the woven fabric 700 represented by the scanned image I20 ( FIG. 4B ).
[0048] In this embodiment, the processor 210 references the position data acquired in S120 (FIG. 3) to detect the area including the crossing position Cp (FIG. 7B) determined in S160 (FIG. 3). The processor 210 acquires the type of area for each of the multiple crossing positions Cp (here, warp area Ap or weft area Af). The processor 210 generates data for the crossing pattern PI1 according to the matrix arrangement of the multiple crossing positions Cp (FIG. 7B). The crossing pattern PI1 indicates the type of yarn (referred to as a yarn flag) visible at each of the multiple crossing positions. The yarn flag is set to a warp flag BLp or a weft flag BLf. In FIG. 10A, the warp flag BLp is indicated by a hatched square, and the weft flag BLf is indicated by an unhatched square. One column represents one warp yarn Wp, and one row represents one weft yarn Wf.
[0049] In S515 (FIG. 9), the processor 210 detects abnormal interlacing portions by comparing the interlacing pattern with a reference interlacing pattern. The reference interlacing pattern PI2 represents the reference yarn flag pattern (i.e., the reference weave diagram) for the entire woven fabric 700 represented by the scanned image I20 (FIG. 4B). The abnormal interlacing portions are crossing positions that show yarn flags that differ from the reference yarn flags. In this embodiment, the abnormal interlacing portions indicate errors in the weaving of the woven fabric 700. FIG. 10(A) shows a portion of the reference interlacing pattern PI2 that corresponds to the illustrated portion of the interlacing pattern PI1.
[0050] In this embodiment, the reference interlacing pattern PI2 is obtained by repeating unit patterns (not shown) in the first direction Dx and the second direction Dy. Of the patterns represented by the repetition of the unit patterns, predetermined portions corresponding to the rows and columns of the interlacing pattern PI1 (i.e., the weft yarns Wf and the warp yarns Wp of the textile 700) are used as the reference interlacing pattern PI2. For example, the end columns in the first direction Dx of the reference interlacing pattern PI2 represent appropriate yarn flag patterns for the end columns in the first direction Dx of the interlacing pattern PI1 (i.e., the warp yarns Wp at the ends of the textile 700 in the first direction Dx of the textile 700 in the scanned image I20).
[0051] The processor 210 detects crossing positions where the yarn flags differ between the crossing pattern PI1 and the reference crossing pattern PI2 (i.e., abnormal crossing portions). FIG. 10(A) shows a portion of the crossing result pattern PI3 representing the detection results that corresponds to the illustrated portion of the crossing pattern PI1. The yarn flags at the crossing position Pa do not match between the crossing pattern PI1 and the reference crossing pattern PI2. In the crossing result pattern PI3, information indicating the abnormal crossing portion BLIe is associated with the crossing position Pa. In the crossing result pattern PI3, various information may be associated with crossing positions where the yarn flags match (e.g., yarn flags). Although not shown, the crossing result pattern PI3 represents the pattern of the detection results for the entire woven fabric 700 represented by the scanned image I20 ( FIG. 4(B) ).
[0052] At S520 (FIG. 9), the processor 210 stores data representing the interlace result pattern PI3 in the storage device 215 (eg, the non-volatile storage device 230).
[0053] In S525, the processor 210 determines a color pattern. The color pattern represents the color values of the yarns visible at each of the multiple intersection positions. FIG. 10B is a diagram showing an example of a comparison process between a color pattern and a reference color pattern. A portion of a color pattern PC1 is shown in the diagram. The color pattern PC1 is represented by the intersection pattern PI1 (FIG. 10A) and the color values of each region determined in S125 (FIG. 3). In the diagram, a symbol indicating the color (here, white Cw or blue Cb) is assigned to each intersection position of the color pattern PC1.
[0054] In S530, the processor 210 detects color abnormalities by comparing the color pattern with a reference color pattern. The reference color pattern PC2 represents the reference color values of each of the multiple warp threads Wp and the multiple weft threads Wf. FIG. 10(B) shows a portion of the reference color pattern PC2 that corresponds to the illustrated portion of the color pattern PC1. In the example of FIG. 10(B), the colors of the multiple warp threads Wp are configured so that white Cw and red Cr are alternately arranged in the first direction Dx. The colors of the multiple weft threads Wf are configured so that blue Cb and red Cr are alternately arranged in the second direction Dy. In this embodiment, the appropriate colors of each of the multiple warp threads Wp and the multiple weft threads Wf (i.e., the reference color pattern PC2) are predetermined according to the configuration of the fabric 700. The color abnormalities indicate threads associated with intersection positions that exhibit a color different from the reference color.
[0055] The processor 210 uses the color pattern PC1 and the reference color pattern PC2 to detect intersection positions that show colors different from the reference color, and detects threads (i.e., color abnormality portions) that correspond to the detected intersection positions. In FIG. 10(B), two warp threads Wp are detected as color abnormality portions WpCe. The color of these two warp threads Wp is white Cw, which is different from the reference color (red Cr). Furthermore, two weft threads Wf are detected as color abnormality portions WfCe. The color of these two weft threads Wf is blue Cb, which is different from the reference color (red Cr).
[0056] Even if the thread color is appropriate, the color values determined in S125 (FIG. 3) may deviate from the color values represented by the reference color pattern PC2. The reference color pattern PC2 may represent a reference range of color values for each thread. The processor 210 may determine that the colors are the same if the color value of the color pattern PC1 is within the corresponding reference range of the reference color pattern PC2. The reference range of the color values is determined in advance through experimentation so that the color value is within the reference range when the thread color is appropriate and is outside the reference range when the thread color is inappropriate.
[0057] In S535, the processor 210 stores data representing the color abnormality portion in the storage device 215 (for example, the non-volatile storage device 230).
[0058] In S540, the processor 210 calculates the width of each of the multiple warp regions Ap and the width of each of the multiple weft regions Af. FIG. 11(A) is a diagram showing an example of a method for calculating the width of a warp region Ap. As shown in the figure, the outline OL of the warp region Ap can curve in various directions. The width of the warp region Ap in the first direction Dx can vary depending on its position in the second direction Dy. The diagram shows widths ApW1-ApW7 in the first direction Dx at seven pixel positions Py1-Py4 in the second direction Dy. The widths ApW1-ApW7 can be different from one another.
[0059] In this embodiment, a statistical quantity indicating the width of the warp area Ap in the first direction Dx is used as the width ApW of the warp area Ap. For example, the average or maximum value of multiple widths at multiple pixel positions in the second direction Dy may be used as the width ApW. Here, a portion of the multiple pixel positions in the second direction Dy within the warp area Ap may be used. Furthermore, the contour OL of the warp area Ap may form a recess CVy that is recessed in a direction parallel to the second direction Dy. It is preferable that pixel positions in the second direction Dy that show such a recess CVy are excluded from the calculation of the width ApW. In other words, it is preferable that the length of the continuous portion within the warp area Ap from the end of the warp area Ap on the second direction Dy side to the end on the opposite side (also referred to as the -Dy direction) be used to calculate the width ApW. In addition, instead of a statistical quantity, the width ApW may be the length of a specific portion of the warp area Ap (for example, the distance in the first direction Dx between the end of the warp area Ap on the first direction Dx side and the end on the opposite side (also called the -Dx direction)).
[0060] The processor 210 calculates the width ApW of each of the multiple warp regions Ap in the first direction Dx. The processor 210 also calculates the width ApW of each of the multiple weft regions Af in the second direction Dy. The method for calculating the width of the weft region Af is the same as the method for calculating the width ApW of the warp region Ap, except that the first direction Dx and the second direction Dy are interchanged. The widths of the regions Ap and Af are calculated by analyzing the position data of the regions Ap and Af (S210-S215 (FIG. 5)). The position data is data obtained by analyzing the scanned image I20 (S210-S215 (FIG. 5)). The processor 210 obtains the widths of the regions Ap and Af by analyzing the scanned image I20.
[0061] The width of the warp region Ap indicates the width of the thread (here, warp thread Wp) visible at the crossing position. Similarly, the width of the weft region Af indicates the width of the thread (here, weft thread Wf) visible at the crossing position. Hereinafter, the pattern of the multiple widths of the multiple warp regions Ap and the multiple widths of the multiple weft regions Af will also be referred to as the crossing width pattern.
[0062] The width ApW of the warp region Ap on the scanned image I20 indicates the thickness of the portion of the warp thread Wp represented by the warp region Ap. The width of the weft region Af on the scanned image I20 indicates the thickness of the portion of the weft thread Wf represented by the weft region Af.
[0063] In S545 (FIG. 9), the processor 210 calculates the width of each of the multiple warp threads Wp and the width of each of the multiple weft threads Wf using the crossing positions determined in S160 (FIG. 3). FIG. 11(B) is a diagram showing multiple warp areas Ap associated with one warp thread Wp. Multiple warp areas Ap, including warp areas Apa-Apc, are associated with the same warp thread Wp. The correspondence between the warp threads Wp and the warp areas Ap is obtained by referring to the crossing positions (FIG. 7(B)).
[0064] The width pW of the warp thread Wp can be any of various values indicating the size of the warp thread Wp in the first direction Dx. In this embodiment, a statistical quantity indicating the width of the warp thread Wp in the first direction Dx is used as the width pW. For example, the average or maximum value of the multiple widths of the multiple warp regions Ap associated with the warp thread Wp (including the widths ApaW-ApcW of the warp regions Apa-Apc) may be used as the width pW. In calculating the width pW of the warp thread Wp, a portion of the multiple warp regions Ap associated with the warp thread Wp may be used.
[0065] The processor 210 calculates the width pW of each of the multiple warp threads Wp in the first direction Dx. The processor 210 also calculates the width of each of the multiple weft threads Wf in the second direction Dy. The method for calculating the width of the weft thread Wf is the same as the method for calculating the width pW of the warp thread Wp. The processor 210 calculates the width of the weft thread Wf using the multiple widths of the multiple weft thread areas Af associated with the weft thread Wf. The calculated width pW of the warp thread Wp indicates the thickness of the warp thread Wp. The calculated width of the weft thread Wf indicates the thickness of the weft thread Wf.
[0066] In S550 (FIG. 9), the processor 210 detects width abnormalities by comparing the width pattern with a reference width pattern. FIG. 11C is a diagram showing a scanned image I20. Assume that the fabric 700 has u warp threads Wp and v weft threads Wf. As described in S545 (FIG. 9), the processor 210 generates a width pattern PW1 from the cross width pattern PWc1, which is a pattern of multiple widths of multiple warp regions Ap and multiple widths of multiple weft regions Af. The width pattern PW1 represents the respective widths pW1-pWu of the u warp threads Wp and the respective widths fW1-fWv of the v weft threads Wf. The reference width pattern PW2 represents the respective width reference ranges Rp1-Rpu of the u warp threads Wp and the respective width reference ranges Rf1-Rfv of the v weft threads Wf. In this embodiment, the appropriate thicknesses of the plurality of warp threads Wp and the plurality of weft threads Wf are determined in advance according to the configuration of the woven fabric 700. The reference width pattern PW2 is determined in advance based on the appropriate thickness of each thread.
[0067] An abnormal width portion is a portion of a yarn that exhibits a width different from the reference width. The processor 210 uses the width pattern PW1 and the reference width pattern PW2 to detect yarns having widths outside the reference range. The detected yarns are examples of abnormal width portions. In FIG. 11(C), the width pWi of the i-th warp yarn Wp is outside the corresponding reference range Rpi, and the width fWj of the j-th weft yarn Wf is outside the corresponding reference range Rfj. The i-th warp yarn Wp is detected as the abnormal width portion Wpe, and the j-th weft yarn Wf is detected as the abnormal width portion Wfe.
[0068] In S555 (FIG. 9), the processor 210 stores data representing the width abnormal portion in the storage device 215 (for example, the non-volatile storage device 230). Then, the processor 210 ends the processing in FIG. 9, i.e., the processing of S165 in FIG. 3.
[0069] In S170, the processor 210 compares the yarn spacing with a reference spacing. FIG. 12 is a flowchart showing an example of the comparison process. In S660, the processor 210 calculates the spacing between adjacent yarns. FIG. 13(A) is a diagram showing an example of the spacing. The figure shows a portion I20p of the scanned image I20 that is the same as that shown in FIG. 7(B). The areas Ap and Af are omitted, and the multiple straight lines WpL and WfL used to determine the crossing position Cp are shown. As described above, the multiple straight lines WpL correspond to the multiple warp yarns Wp, and the multiple straight lines WfL correspond to the multiple weft yarns Wf.
[0070] The processor 210 calculates the multiple intervals between the multiple straight lines WpL (here, the distance in the first direction Dx) as the multiple intervals between the multiple warp threads Wp. The intervals dp1-dp8 in the figure each indicate the calculated interval between two adjacent warp threads Wp. The interval between the warp threads Wp indicates the density of the warp threads Wp (the larger the interval, the lower the density). Similarly, the processor 210 calculates the multiple intervals between the multiple straight lines WfL (here, the distance in the second direction Dy) as the multiple intervals between the multiple weft threads Wf. The intervals df1-df8 in the figure each indicate the calculated interval between two adjacent weft threads Wf. The interval between the weft threads Wf indicates the density of the weft threads Wf.
[0071] In S665 (FIG. 12), the processor 210 detects an abnormal spacing portion by comparing the spacing with a reference spacing. An abnormal spacing portion is a spacing that differs from the reference spacing. FIG. 13(B) is a histogram showing the distribution of the spacing dp of the warp threads Wp. In this embodiment, the reference spacing is determined by a reference spacing range Rdp. The reference range Rdp indicates the range of appropriate spacing dp. The reference range Rdp is determined in advance depending on the configuration of the fabric 700.
[0072] The processor 210 detects the spacing dp outside the reference range Rdp as an abnormal spacing portion. In the example of FIG. 13(A), the position of the warp thread Wpd in the first direction Dx is shifted to the left from the appropriate position. As a result, the spacing dp6 on the left of the warp thread Wpd decreases, and the spacing dp7 on the right of the warp thread Wpd increases. As shown in FIG. 13(B), these spacings dp6 and dp7 are outside the reference range Rdp. The processor 210 detects the spacings dp6 and dp7 as an abnormal spacing portion dpe. In this embodiment, the processor 210 acquires information indicating the detected spacings and the warp threads Wp that form those spacings as the abnormal spacing portion. In the example of FIG. 13(A), information indicating the spacings dp6 and dp7 and the warp thread Wpd is acquired as the abnormal spacing portion dpe.
[0073] Abnormal spacing portions of the spacing df of the weft yarn Wf are also detected in a similar manner. FIG. 13(C) is a histogram showing the distribution of the spacing df of the weft yarn Wf. The reference range Rdf indicates the range of appropriate spacing df. The reference range Rdf is predetermined depending on the configuration of the woven fabric 700. The processor 210 detects spacing df outside the reference range Rdf as abnormal spacing portions. In the example of FIG. 13(A), the position of the weft yarn Wfd in the second direction Dy is shifted upward from the appropriate position. As a result, the spacing df2 above the weft yarn Wfd decreases, and the spacing df3 below the weft yarn Wfd increases. As shown in FIG. 13(C), these spacings df2 and df3 are outside the reference range Rdp. The processor 210 detects the spacings df2 and df3 as abnormal spacing portions dfe. The processor 210 acquires information representing the detected intervals df2 and df3 and the weft yarn Wfd that forms these intervals df2 and df3 as an abnormal interval portion dfe.
[0074] In S670 (FIG. 12), the processor 210 stores the data representing the abnormal interval portion in the storage device 215 (for example, the non-volatile storage device 230). Then, the processor 210 ends the processing in FIG. 12, that is, the processing of S170 in FIG.
[0075] In S190, the processor 210 notifies the operator of the comparison results. The comparison results include the detection results of abnormal weaving portions ( S515 in FIG. 9 ), abnormal color portions ( S530 in FIG. 9 ), abnormal width portions ( S550 in FIG. 9 ), and abnormal spacing portions ( S665 in FIG. 12 ). Any method of notification may be used. For example, the processor 210 may display information representing the comparison results (e.g., text, a table, etc.) on the display unit 240. The notified comparison results may also include various information, including information indicating whether or not an abnormal portion was detected. For example, if an abnormal portion is detected, the processor 210 may display an image of the fabric 700 on the display unit 240, including information indicating the location of each abnormal portion (e.g., arrows, etc.).
[0076] After S190, the processor 210 ends the inspection process of FIG.
[0077] As described above, in this embodiment, the processor 210 of the data processing device 200 executes the following process. In S165 of FIG. 3 (specifically, S510, S525, and S540 of FIG. 9), the processor 210 analyzes the scanned image I20 (FIGS. 4B and 4C) to determine an attribute pattern representing the attributes of the yarns at each of a plurality of intersection positions. The scanned image I20 is an image representing the optically scanned woven fabric 700 having a plurality of weft yarns Wp and a plurality of weft yarns Wf. The intersection positions are the intersection positions of the warp yarns Wp and the weft yarns Wf, as described in FIG. 7B. The attributes include the visible threads of the warp threads Wp and weft threads Wf (FIG. 9: S510, thread flags BLp, BLf (FIG. 10(A))), color (S525, white Cw, blue Cb, red Cr (FIG. 10(B))), and width (S540, width ApW (FIG. 11(A))).
[0078] As described in FIG. 10(A), in S515 (FIG. 9), the processor 210 detects the abnormal crossing portion BLIe using the crossing pattern PI1 and the reference crossing pattern PI2. The crossing pattern PI1 is a pattern of thread flags (in this embodiment, warp flags BLp or weft flags BLf) that indicate which of the warp threads Wp and weft threads Wf are visible. The reference crossing pattern PI2 is an example of information that represents the reference for the visible threads. The abnormal crossing portion BLIe is an example of a difference between the crossing pattern PI1 and the reference crossing pattern PI2. Such a difference indicates a difference between the weave indicated by the crossing pattern PI1 and the reference weave indicated by the reference crossing pattern PI2.
[0079] As described in FIG. 10B, in S530 (FIG. 9), the processor 210 detects color abnormality portions WpCe and WfCe using the color pattern PC1 and the reference color pattern PC2. The reference color pattern PC2 is an example of information representing a reference color (in this embodiment, white Cw, blue Cb, or red Cr). The color abnormality portions WpCe and WfCe are examples of differences between the color pattern PC1 and the reference color pattern PC2.
[0080] As described in FIG. 11(C), in S545-S550 (FIG. 9), the processor 210 detects the abnormal width portions Wpe and Wfe using the width pattern PW1 (and thus the cross width pattern PWc1) and the reference width pattern PW2. The cross width pattern PWc1 represents a pattern of multiple widths ApW of multiple warp regions Ap and multiple widths of multiple weft regions Af, i.e., the width of the yarn at each of the multiple crossing positions Cp (FIG. 7(B)). The width pattern PW1 represents the widths of the multiple warp regions Ap and the multiple weft regions Af. The reference width pattern PW2 is an example of information representing a width reference. The abnormal width portions Wpe and Wfe are examples of differences between the cross width pattern PWc1 and the reference width pattern PW2.
[0081] In S190 (FIG. 3), if a difference is detected, processor 210 displays information indicating the difference on display unit 240. This display process is an example of a determination process that is executed when a difference is detected.
[0082] According to this configuration, the processor 210 can appropriately detect differences between the attribute patterns and the information representing the attribute reference by determining the attribute patterns (here, the intersection pattern PI1, the color pattern PC1, and the intersection width pattern PWc1) by analyzing the scanned image I20 representing the optically scanned textile 700. The data processing device 200 is an example of a detection device that detects differences.
[0083] In this embodiment, the process for determining the attribute pattern includes steps S120, S135, S160, and S165 (FIG. 3). As shown in FIGS. 6A and 6B, in step S120, the processor 210 detects a plurality of regions including a plurality of warp regions Ap and a plurality of weft regions Af. Each of the plurality of warp regions Ap represents a portion of the plurality of warp threads Wp that is visible and not obscured by a plurality of weft threads Wf. Each of the plurality of weft regions Af represents a portion of the plurality of weft threads Wf that is visible and not obscured by a plurality of warp threads Wp. In steps S135, S160, and S165 (FIG. 3), the processor 210 determines the attribute pattern using the positional relationship between the plurality of warp regions Ap and the plurality of weft regions Af (e.g., as shown in FIGS. 7A and 7B). The processor 210 can determine an appropriate attribute pattern by using the positional relationship between the plurality of warp regions Ap and the plurality of weft regions Af.
[0084] In this embodiment, as shown in FIGS. 7A and 7B, in the scanned image I20, the multiple warp threads Wp are arranged such that their positions in the first direction Dx of the warp threads Wp are different from one another, and the multiple weft threads Wf are arranged such that their positions in the second direction Dy of the weft threads Wf are different from one another. As described in FIG. 8, the positional relationship between the multiple warp regions Ap and the multiple weft regions Af is determined by the positions of the warp regions Ap in the first direction Dx and the weft regions Af in the second direction Dy. The processor 210 can determine an appropriate attribute pattern by using this positional relationship. For example, the length of the warp regions Ap in the second direction Dy may vary depending on the weave. Meanwhile, the positions of the warp regions Ap in the first direction Dx of the warp regions Ap are approximately the same among the multiple warp regions Ap associated with the same warp thread Wp, regardless of the weave. By using the positions of the multiple warp regions Ap in the first direction Dx, the processor 210 can appropriately obtain the positions of the multiple warp threads Wp in the first direction Dx, regardless of the weaving method. Similarly, by using the positions of the multiple weft regions Af, the processor 210 can appropriately obtain the positions of the multiple weft threads Wf in the second direction Dy, regardless of the weaving method. The processor 210 can determine an appropriate attribute pattern using the obtained positions of the warp threads Wp and the weft threads Wf.
[0085] In this embodiment, the attributes include the visible yarns of the warp yarns Wp and weft yarns Wf (S510 (FIG. 9), yarn flags BLp and BLf (FIG. 10(A))). The processor 210 can detect differences between the visible yarns and the reference yarns (e.g., abnormalities in the weaving of the fabric 700).
[0086] In this embodiment, the attributes include both color (S525 (FIG. 9), white Cw, blue Cb, red Cr (FIG. 10(B))) and width (S540, width ApW (FIG. 11(A))). The processor 210 can detect differences between the color and the reference color (e.g., an incorrect thread color). The processor 210 can detect differences between the width and the reference width (e.g., an incorrect thread thickness).
[0087] In this embodiment, as described above, in S120 (FIG. 3), the processor 210 detects multiple regions including multiple warp regions Ap and multiple weft regions Af (FIGS. 6A and 6B). Each of the multiple warp regions Ap represents a portion of the multiple warp threads Wp that is visible and not obscured by multiple weft threads Wf. Each of the multiple weft regions Af represents a portion of the multiple weft threads Wf that is visible and not obscured by multiple warp threads Wp. The processor 210 further calculates both the multiple spacings dp between the multiple warp threads Wp and the multiple spacings df between the multiple weft threads Wf using the positional relationship between the multiple warp regions Ap and the multiple weft regions Af in S135, S160, and S170 (S660 (FIG. 12)) of FIG. 3 (FIGS. 12, 13A-13C). In S665 (FIG. 12), the processor 210 detects the abnormal spacing portions dpe, dfr using both the multiple spacings dp between the multiple warp yarns Wp and the multiple spacings df between the multiple weft yarns Wf, as well as the reference spacing ranges Rdp, Rdf. The reference spacing ranges Rdp, Rdf are an example of information representing the reference for the spacings dp, df. The abnormal spacing portions dpe, dfr are an example of a difference portion between the multiple spacings dp, df and the reference ranges Rdp, Rdf. The processor 210 can appropriately detect the difference portion in spacing by using the positional relationship between the multiple warp regions Ap and the multiple weft regions Af.
[0088] B. Second Example: Figure 14 is a flowchart showing a second example of the process for acquiring information on the warp area Ap and the weft area Af. The process in Figure 14 is executed in S120 (Figure 3) instead of the process in Figure 5. In S710, the processor 210 detects candidate areas for the warp area and the weft area.
[0089] FIG. 15A is a diagram showing an example of a portion of the scanned image I20. The figure shows the same portion as portion I20p in FIG. 4C. The processor 210 detects bright areas in the scanned image I20 as candidate areas. When scanning the woven fabric 700, a light source such as light source 121 (FIG. 2) irradiates light onto the woven fabric 700. A scanning device such as scanner 100 reads the light reflected from the woven fabric 700. The portions of the warp threads Wp and weft threads Wf that are visible at the intersections are more susceptible to light and are therefore displayed in bright colors in the scanned image I20. The other portions of the warp threads Wp and weft threads Wf are less susceptible to light and are therefore displayed in dark colors in the scanned image I20. Shadows are likely to form at the boundaries between threads (warp threads Wp or weft threads Wf) and other threads. The boundaries are displayed in dark colors in the scanned image I20. The gaps between the warp threads Wp and the weft threads Wf are also represented in dark colors in the scanned image I20. The gaps may be represented in a darker color than the threads. Thus, the lighter areas represent the warp or weft thread areas.
[0090] In the figure, a first line Lx parallel to the first direction Dx and a second line Ly parallel to the second direction Dy are shown on the scanned image I20. A first graph G1 below the scanned image I20 shows an example of the luminance value BV on the first line Lx. The horizontal axis indicates the pixel position Px in the first direction Dx, and the vertical axis indicates the luminance value BV. A second graph G2 to the right of the scanned image I20 shows an example of the luminance value BV on the second line Ly. The vertical axis indicates the pixel position Py in the second direction Dy, and the horizontal axis indicates the luminance value BV. As shown in the figure, the luminance value BV of the portions of the warp threads Wp and weft threads Wf that are not hidden at the intersection and are visible is large. The luminance value BV of the other portions of the warp threads Wp and weft threads Wf is small. The luminance value BV of the boundary portion between one thread and another thread is small. If the color components of the scanned image I20 do not include the brightness value BV, the processor 210 obtains the brightness value BV by a known color conversion.
[0091] The processor 210 detects, as a candidate area, an area where pixels having a luminance value BV equal to or greater than the threshold value BVth. Fig. 15(B) shows an example of the detection result. A plurality of candidate areas Ath are detected from the scanned image I20. Each candidate area Ath corresponds to a warp area Ap or a weft area Af in Figs. 6(A) and 6(B). The threshold value BVth is experimentally determined in advance so that an appropriate candidate area Ath can be detected.
[0092] In S715 (FIG. 14), the processor 210 determines the type of candidate area (here, warp area or weft area) by analyzing the image of the candidate area. FIGS. 16(A) to 16(G) are diagrams showing examples of methods for determining the type of candidate area. FIGS. 16(A) to 16(C) show a first determination method, FIGS. 16(D) and 16(E) show a second determination method, and FIGS. 16(F) and 16(G) show a third determination method. Hereinafter, it is assumed that the first determination method is adopted.
[0093] The first determination method uses the arrangement of light and dark regions within the candidate regions. FIG. 16(A) shows a first candidate region Ath1 representing the warp thread Wp and a second candidate region Ath2 representing the weft thread Wf. When scanning the fabric 700, a light source such as light source 121 (FIG. 2) illuminates the fabric 700. Relatively light and dark regions may occur in the three-dimensional warp threads Wp and weft threads Wf. The dark regions are formed, for example, in portions of the threads on the side opposite the light source direction. The first candidate region Ath1 has a light region AB1 and a dark region AD1, and the second candidate region Ath2 has a light region AB2 and a dark region AD2. The arrangement of the light and dark regions is determined according to the arrangement of the light source. In the example of FIG. 16(A), the dark regions AD1 and AD2 are formed in the portions of the candidate regions Ath1 and Ath2 on the −Dx direction side. The light areas AB1 and AB2 are formed in other parts of the first candidate areas Ath1 and Ath2. Furthermore, the threads may cast shadows on the surfaces of the other threads. Dark areas indicating shadows may be formed at the boundaries between multiple adjacent candidate areas Ath.
[0094] 16B shows an example of an analysis of the first candidate area Ath1. The processor 210 divides the first candidate area Ath1 into a first partial area AR1 on the first direction Dx side and a second partial area AL1 on the -Dx side along a line CL1 that passes through the center of gravity C1 of the first candidate area Ath1 and is parallel to the second direction Dy. The processor 210 calculates a first luminance value BR1 of the first partial area AR1 and a second luminance value BL1 of the second partial area AL1. The luminance values BR1 and BL1 may be various statistical quantities (e.g., the average value or the mode within the area).
[0095] If the first candidate area Ath1 represents the warp thread Wp, the first candidate area Ath1 extends in the second direction Dy. The size of the first candidate area Ath1 in the first direction Dx is smaller than the size of the first candidate area Ath1 in the second direction Dy. In this case, most of the dark area AD1 is included in the second partial area AL1, and most of the light area AB1 is included in the first partial area AR1. Therefore, the second luminance value BL1 is smaller than the first luminance value BR1. If the luminance ratio (BL1 / BR1) is less than the threshold value Bth, the processor 210 determines that the type of the first candidate area Ath1 is the warp thread area Ap.
[0096] FIG. 16(C) shows an example of analysis of second candidate area Ath2. Processor 210 divides second candidate area Ath2 into a first partial area AR2 on the first direction Dx side and a second partial area AL2 on the -Dx direction side along a line CL2 that passes through the center of gravity C2 of second candidate area Ath2 and is parallel to the second direction Dy. Processor 210 calculates a first luminance value BR2 of first partial area AR2 and a second luminance value BL2 of second partial area AL2. The method of calculating the luminance values BR2 and BL2 is the same as the method of calculating the luminance values BR1 and BL1 described in FIG. 16(B).
[0097] When the second candidate area Ath2 represents the weft thread Wf, the second candidate area Ath2 extends in the first direction Dx. The size in the first direction Dx is larger than the size in the second direction Dy. In this case, most of the dark area AD2 is included in the second partial area AL2. The light area AB2 extends from the first partial area AR2 to the second partial area AL2. Therefore, the brightness ratio (BL2 / BR2) is larger than the brightness ratio (BL1 / BR1) in FIG. 16(B). If the brightness ratio (BL2 / BR2) is equal to or greater than the threshold value Bth, the processor 210 determines that the type of the second candidate area Ath2 is the weft thread area Af.
[0098] The processor 210 determines the type of each of the multiple candidate areas Ath as either a warp area Ap or a weft area Af using the brightness ratio and the threshold value Bth. This completes the processing of S715 (FIG. 14). The threshold value Bth is determined experimentally in advance so that the type of each of the multiple candidate areas Ath can be appropriately determined.
[0099] After S715, in S720, the processor 210 stores the position data and type data of each of the areas Ap and Af in the storage device 215 (e.g., the non-volatile storage device 230). This process is the same as the process of S215 (FIG. 5). The processor 210 then ends the process of FIG. 14 (and thus the process of S120 (FIG. 3)).
[0100] The process in Figure 14 detects warp regions Ap and weft regions Af. In S120 (Figure 3), the processor 210 may further detect gap regions Ag. Various methods may be used to detect gap regions Ag. For example, the processor 210 may detect, as gap regions Ag, regions in which pixels having a luminance value BV equal to or less than a gap threshold are consecutive. The gap threshold is determined experimentally in advance so that an appropriate gap region Ag can be detected.
[0101] The conditions for determining the type of region in the first determination method are not limited to the conditions described in Figures 16(B) and 16(C), and may be various conditions suitable for the characteristics of the scanned image. For example, a dark region may be formed in a portion of the candidate region on the second direction Dy side. In this case, processor 210 may divide the candidate region into two partial regions by a line passing through the center of gravity and parallel to the first direction Dx. Then, processor 210 may determine the type of the candidate region using the ratio of the brightness of the two partial regions.
[0102] The method for determining the type of candidate area Ath may be other than the first determination method. The second determination method (FIGS. 16(D) and 16(E)) uses an image of the candidate area Ath. FIG. 16(D) shows a first candidate area Ath1 representing the warp yarn Wp, and FIG. 16(E) shows a second candidate area Ath2 representing the weft yarn Wf. In this example, the warp yarn Wp and the weft yarn Wf are twisted yarns produced by twisting multiple fibers. In this case, the images of the candidate areas Ath1 and Ath2 represent multiple twisted fibers. As shown in FIG. 16(D), the image of the first candidate area Ath1 representing the warp yarn Wp represents multiple twisted fibers extending in the second direction Dy. As shown in FIG. 16(E), the image of the second candidate area Ath2 representing the weft yarn Wf represents multiple twisted fibers extending in the first direction Dx. The processor 210 may use such image differences to determine the type of candidate region Ath. For example, the processor 210 may determine the type of candidate region Ath by template matching using a template image of the warp region Ap and a template image of the weft region Af. Alternatively, the processor 210 may use a trained machine learning model (e.g., a classification model) to determine the type of candidate region Ath.
[0103] The third determination method (FIGS. 16(F) and 16(G)) uses the aspect ratio of the candidate area Ath. In this embodiment, the candidate area Ath representing the warp yarn Wp is long in the second direction Dy, and the candidate area Ath representing the weft yarn Wf is long in the first direction Dx. As shown in FIG. 16(F), when the first candidate area Ath1 represents the warp yarn Wp, the height H1 (size in the second direction Dy) of the first candidate area Ath1 is greater than the width W1 (size in the first direction Dx) of the first candidate area Ath1. If the height H1 is greater than the width W1, the processor 210 determines that the type of the first candidate area Ath1 is a warp area Ap. As shown in FIG. 16(G), when the second candidate area Ath2 represents the weft yarn Wf, the height H2 of the second candidate area Ath2 is smaller than the width W2 of the second candidate area Ath2. If the height H2 is smaller than the width W2, the processor 210 determines that the type of the second candidate area Ath2 is the weft area Af. In this way, the processor 210 may determine the type of the candidate area Ath using the height and width of the candidate area Ath. The method for calculating the width of the candidate area Ath may be the same as the method for calculating the width ApW ( FIG. 11(A) ). The method for calculating the height of the candidate area Ath may be the same as the method for calculating the width, but with the first direction Dx and the second direction Dy interchanged.
[0104] C. Third Embodiment: Fig. 17 is a flowchart showing another embodiment of the process for determining the crossing position. The process in Fig. 17 is executed in S160 (Fig. 3) instead of the process in Fig. 8. In S810, the processor 210 determines the extending direction of each of the plurality of warp regions Ap.
[0105] FIG. 18(A) is a diagram showing an example of a method for determining the extension direction DAp of the warp region Ap. The processor 210 thins the warp region Ap by performing a contraction process in the first direction Dx. The processor 210 then calculates a straight line approximating the thinned warp region Apf and adopts a direction parallel to the calculated straight line as the extension direction DAp. The contraction process may, for example, be a process for setting the target pixel as a non-region pixel when multiple peripheral pixels defined by a filter placed at the position of the target pixel include a non-region pixel. The filter may, for example, be a pixel line of a predetermined length (e.g., three pixels) centered on the target pixel and extending in the first direction Dx. The processor 210 repeats the contraction process until the size in the first direction Dx becomes sufficiently small. As described in FIG. 11(A), the size of the warp region Ap in the first direction Dx may vary depending on its position in the second direction Dy. The processor 210 may repeat the contraction process, for example, until the maximum value of the magnitude in the first direction Dx becomes equal to or less than a threshold value (for example, 3 pixels).
[0106] The direction DAp may be determined by another method. Fig. 18(B) is a diagram showing another determination method. The processor 210 calculates a straight line LR that approximates the edge of the warp region Ap on the first direction Dx side and a straight line LL that approximates the edge on the -Dx direction side. The processor 210 may adopt the average direction of the direction DR parallel to the straight line LR and the direction DL parallel to the straight line LL as the direction DAp.
[0107] In S815 (FIG. 17), the processor 210 connects the target warp area with an adjacent warp area Ap located in the extension direction of the target warp area. The extension direction of the target warp area indicates the extension direction of the warp thread Wp represented by the target warp area. There is a high possibility that the target warp area and the adjacent warp area Ap located in the extension direction of the target warp area represent the same warp thread Wp. By making this connection, the processor 210 can connect the target warp area and the adjacent warp area Ap that represent the same warp thread Wp.
[0108] The processor 210 performs this type of connection for each of the multiple warp areas Ap. FIG. 18(C) is a diagram showing an example of the connection of warp areas Ap. The diagram shows multiple warp areas Ap11-Ap15. When the warp area Ap11 is the target warp area, the adjacent warp area Ap12 is connected to the warp area Ap11 as follows. The processor 210 calculates a straight line LAp11 that passes through the center Apc11 of the warp area Ap11 and is parallel to the direction DAp11 in which the warp area Ap11 extends. Of the warp areas Ap that are in contact with the straight line LAp11, the processor 210 selects the warp area Ap12 that is closest to the warp area Ap11 as the adjacent warp area Ap. The processor 210 connects the warp area Ap11 and the selected warp area Ap12. Similarly, the other warp regions Ap12-Ap15 are connected to adjacent warp regions Ap using the centers Apc12-Apc15, the extending directions DAp12-DAp15, and the straight lines LAp12-LAp15. In the example of Figure 18(C), the warp regions Ap11-Ap15 are connected in this order.
[0109] In S820 (FIG. 17), the processor 210 determines a curve (e.g., a spline curve) that fits the centers of the multiple warp regions Ap connected to one another. FIG. 18(D) shows the centers Apc11-Apc15 of the warp regions Ap11-Ap15 described in FIG. 18(C). The curve WpLc is a curve that approximates the multiple centers including the centers Apc11-Apc15. This curve WpLc corresponds to the warp Wp, similar to the straight line WpL in FIG. 7(B). Hereinafter, the determined curve will also be referred to as the warp curve.
[0110] S825, S830, and S835 are modifications of S810, S815, and S820 for the warp area Ap, which are modified to process the weft area Af. In S825, the processor 210 determines the extension direction of each of the multiple weft areas Af. The determination method is the same as the method for determining the extension direction DAp of the warp area Ap (FIGS. 18(A) and 18(B)), with the first direction Dx and the second direction Dy interchanged. In S830, the processor 210 connects the weft area Af to an adjacent weft area Af located in the extension direction of the weft area Af. The connection method is the same as the method described in FIG. 18(C). In S835, the processor 210 determines a curve that fits multiple centers of the multiple weft areas Af that are connected to each other. The curve determination method is the same as the method described in FIG. 18(D). Hereinafter, the determined curve is also referred to as the weft curve.
[0111] Through the above steps S810-S835, the processor 210 determines a plurality of warp curves and a plurality of weft curves corresponding to a plurality of warp threads Wp and a plurality of weft threads Wf. Fig. 18(E) shows an example of a plurality of warp curves WpLc and a plurality of weft curves WfLc.
[0112] In S840, the processor 210 determines a plurality of intersection positions Cp as intersections between a plurality of warp curves WpLc and a plurality of weft curves WfLc (FIG. 18(E)).
[0113] In S850, the processor 210 stores data representing the multiple intersection positions Cp in the storage device 215 (for example, the non-volatile storage device 230). Then, the processor 210 ends the processing in Fig. 17, i.e., the processing in S160 in Fig. 3.
[0114] As described above, in this embodiment, the process for determining an attribute pattern includes steps S120, S135, S160, and S165 (FIG. 3). In step S160, the processor 210 executes the process shown in FIG. 17. In steps S810-S815, the processor 210 connects each of the multiple warp regions Ap to adjacent warp regions Ap located in the direction in which the warp region Ap extends. In steps S825-S830, the processor 210 connects each of the multiple weft regions Af to adjacent weft regions Af located in the direction in which the weft region Af extends. The processor 210 determines an attribute pattern using the results of this connection (step S165 (FIG. 3)). Therefore, even if the fabric 700 in the scanned image has deformations (such as skew or distortion), the processor 210 can determine an appropriate attribute pattern.
[0115] This embodiment may be applied to the first and second embodiments.
[0116] D. Modifications: (1) In S170 (FIG. 3), the processor 210 may calculate multiple intervals between multiple warp threads Wp and multiple intervals between multiple weft threads Wf using the positional relationship of multiple gap regions Ag (FIG. 6C). For example, the length of the gap region Ag in the first direction Dx can be used as the interval between two adjacent warp threads Wp via the gap region Ag. The method for calculating the length of the gap region Ag in the first direction Dx may be the same as the method for calculating the width of the warp region Ap (e.g., FIG. 11A). The multiple gap regions Ag between two adjacent warp threads Wp may have different lengths in the first direction Dx. The processor 210 may calculate a statistical quantity indicating the size of the interval as the interval between the warp threads Wp (e.g., the average, mode, or maximum of the multiple lengths of the multiple gap regions Ag between two adjacent warp threads Wp). Similarly, the length of the gap region Ag in the second direction Dy can be used as the spacing between two adjacent weft yarns Wf across the gap region Ag. The method for calculating the length of the gap region Ag in the second direction Dy may be the same as the method for calculating the length of the gap region Ag in the first direction Dx, except that the first direction Dx and the second direction Dy are interchanged. The processor 210 may calculate a statistical quantity indicating the size of the spacing between two adjacent weft yarns Wf as the spacing between the weft yarns Wf (e.g., the average, mode, or maximum value of the multiple lengths of the multiple gap regions Ag between two adjacent weft yarns Wf). The processor 210 may detect spacings outside the standard range (i.e., different portions) by comparing multiple spacings between the multiple warp yarns Wp with a reference range for spacings between the warp yarns Wp. Similarly, the processor 210 may detect spacings outside the standard range (i.e., different portions) by comparing multiple spacings between the multiple weft yarns Wf with a reference range for spacings between the weft yarns Wf.
[0117] Furthermore, the processor 210 may detect, from among the plurality of gap regions Ag, gap regions Ag having a size different from a reference size as a gap difference portion. The reference size may be determined in advance depending on the configuration of the woven fabric 700. For example, the reference size may be determined by a first reference range of the length of the gap region Ag in the first direction Dx and a second reference range of the length of the gap region Ag in the second direction Dy. The processor 210 may detect gap regions Ag having a length in the first direction Dx outside the first reference range as a gap difference portion between the spacing of the warp yarns Wp and the information representing the spacing reference (here, the first reference range). Similarly, the processor 210 may detect gap regions Ag having a length in the second direction Dy outside the second reference range as a gap difference portion between the spacing of the weft yarns Wf and the information representing the spacing reference (here, the second reference range).
[0118] The spacing standard may also indicate a standard for the variation in size of the gap regions Ag between two adjacent yarns. The spacing standard may be determined, for example, by a first upper limit value for the variance in the lengths of the gap regions Ag between two adjacent warp yarns Wp in the first direction Dx and a second upper limit value for the variance in the lengths of the gap regions Ag between two adjacent weft yarns Wf in the second direction Dy. The processor 210 may detect two adjacent warp yarns Wp exhibiting a variance equal to or greater than the first upper limit value as a difference between the spacing between the warp yarns Wp and the information representing the spacing standard (here, the first upper limit value). Similarly, the processor 210 may detect two adjacent weft yarns Wf exhibiting a variance equal to or greater than a second upper limit value as a difference between the spacing between the weft yarns Wf and the information representing the spacing standard (here, the second upper limit value).
[0119] The processor 210 may perform one or both of the detection of the spacing difference portion using the gap region Ag and the detection of the spacing difference portion using the warp region Ap and the weft region Af (FIG. 12). If the gap region Ag is not used, the detection of the gap region Ag may be omitted in S120 (FIG. 3). Furthermore, one of the spacing of the warp thread Wp and the spacing of the weft thread Wf may be omitted from the detection of the spacing difference portion.
[0120] (2) The object detection model 300 is not limited to Mask R-CNN, but may be any of various trained machine learning models capable of detecting the target area (e.g., warp area Ap, weft area Af, and gap area Ag) from the scanned image (e.g., YOLO (You only look once)).
[0121] (3) The process of detecting target areas (e.g., warp area Ap, weft area Af, and gap area Ag) from the scanned image (S120 ( FIG. 3 )) may be performed using various methods instead of the area detection process using the object detection model 300 ( FIG. 5 ) and the process of detecting bright areas ( FIG. 14 ). For example, the processor 210 may detect each area Ap, Af, and Ag by template matching using template images of each area Ap, Af, and Ag. Note that the yarns (e.g., warp yarns Wp and weft yarns Wf) may contain either or both natural and chemical fibers. When the yarns contain natural fibers, the yarn attributes (e.g., color, thickness, etc.) may vary significantly. The machine learning model can appropriately detect the target areas even when the yarn attributes vary significantly.
[0122] (4) In the example of FIG. 17 , a predetermined direction (e.g., the second direction Dy) may be used as the direction in which the warp area Ap extends. A predetermined direction (e.g., the first direction Dx) may be used as the direction in which the weft area Af extends. Here, for example, the following warp areas Ap may be used as the adjacent warp area Ap located in the extension direction of the target warp area Ap. The processor 210 determines a first range of positions in the first direction Dx that includes the center of the target warp area Ap. The first range indicates the range of positions in the first direction Dx of one warp thread Wp (referred to as the target warp thread Wp) associated with the target warp area Ap. The first range is, for example, a range of a predetermined width centered on the position in the first direction Dx of the center (e.g., center of gravity) of the target warp area Ap. The width of the first range is experimentally determined in advance so that the centers of multiple warp regions Ap representing the target warp thread Wp are within the first range, and the centers of warp regions Ap representing other warp threads Wp are outside the first range. Multiple warp regions Ap having centers within the first range are aligned in the second direction Dy. The processor 210 selects, from these multiple warp regions Ap, the warp region Ap adjacent to the target warp region Ap. Similarly, the neighboring weft region Af located in the extension direction of the target weft region Af is also selected. The processor 210 determines a second range of positions in the second direction Dy that includes the center of the target weft region Af. The second range indicates the range of positions in the second direction Dy of one weft thread Wf (referred to as the target weft thread Wf) associated with the target weft region Af. The processor 210 selects, from multiple weft regions Af having centers within the second range, the weft region Af adjacent to the target weft region Af.
[0123] (5) The process for determining multiple crossing positions of warp and weft threads may be various processes instead of the processes of the above-described embodiments (e.g., FIGS. 7A, 7B, 8, 17, and 18) and their modified examples. The processor 210 may determine multiple crossing positions using the positional relationship between multiple warp regions Ap and multiple weft regions Af. For example, the processor 210 divides a long warp region Ap that crosses multiple weft threads Wf into multiple warp regions Ap that crosses a single weft thread Wf. The total number of warp regions Ap obtained by the division is determined according to the length of the long warp region Ap. The processor 210 divides a long weft region Af that crosses multiple warp threads Wp into multiple weft regions Af that cross a single warp thread Wp. The total number of weft regions Af obtained by the division is determined according to the length of the long weft region Af. This results in the formation of multiple warp regions Ap and multiple weft regions Af, each of which includes one crossing position (e.g., crossing position Cp (FIG. 7B)). The processor 210 may use the center (e.g., center of gravity) of each region Ap, Af as the crossing position.
[0124] The processor 210 may also detect multiple intersection positions using a machine learning model (e.g., YOLO (You only look once)) that has been trained to detect intersection positions from scanned images, or may detect multiple intersection positions by template matching using a template image that represents the intersection positions.
[0125] In either case, the processor 210 may determine a correspondence relationship between each of the multiple intersection positions and the warp region Ap or the weft region Af, and may use the determined correspondence relationship to determine the attributes of each of the multiple intersection positions. The correspondence relationship between the multiple intersection positions and the regions Ap, Af may be determined by associating the intersection positions with regions that include the intersection positions. Alternatively, the processor 210 may determine the attributes of the intersection positions by analyzing a portion of the scanned image that includes the intersection positions.
[0126] (6) The process of determining the attribute pattern may be various other processes instead of the processes of the above-described embodiments and modifications. For example, the processor 210 may determine the attribute pattern by using a machine learning model trained to generate attribute pattern data using scanned image data of the textile 700. Various models can be used as such a machine learning model (e.g., a convolutional neural network, a model composed of multiple fully connected layers, etc.).
[0127] (7) The process of detecting differences between the attribute pattern and the information representing the attribute standard may be various processes. For example, one of the warp threads Wp and the weft threads Wf may be excluded from the detection of differences. The attributes to be processed may include one or more attributes arbitrarily selected in advance from the type of visible thread (warp threads Wp or weft threads Wf), color, and width. For example, one of color and width may be omitted. Here, the attributes to be processed may include one of color and width and the type of visible thread. Alternatively, both color and width may be omitted. Here, the attributes to be processed may include the type of visible thread. Alternatively, the type of visible thread may be omitted. Here, the attributes to be processed may include one or both of color and width. In either case, the processor 210 may detect the width difference for each region representing a thread, instead of for each thread (FIG. 11(C)). In this case, the reference width pattern PW2 may indicate a reference width range for each warp region Ap and a reference width range for each weft region Af.
[0128] Furthermore, the difference portion is not limited to a portion indicating an anomaly, but may be various portions that represent a difference between an attribute and a reference for the attribute. For example, the difference portion may include a portion that represents a difference from a specific pattern (e.g., a symbol, a mark, a character string, etc.).
[0129] (8) The process for detecting the difference may be various other processes instead of the processes in the above-described embodiments and modifications. For example, the process for detecting the difference in spacing (S170 (FIG. 3)) may be omitted. Also, the skew correction (S115) may be omitted.
[0130] (9) When a difference is detected, the processor 210 may execute various processes (referred to as identification processes) in addition to the notification (S190 ( FIG. 3 )). The identification process may include a process of outputting output data representing the difference. The device to which the output data is output may include one or more devices arbitrarily selected from a display device, a printing device, and a storage device (for example, a storage device internal to the data processing device 200 (such as the non-volatile storage device 230) or an external storage device connected to the data processing device 200). In this manner, information representing the difference may be displayed, printed, or stored. The information representing the difference may include an image representing the difference in the textile 700, or a flag indicating whether a difference has been detected. Furthermore, the textile 700 may be transported by a transport device for reading. The identification process may include a process of stopping the transport device for the textile 700.
[0131] (10) The reading device that optically reads the textile 700 is not limited to the scanner 100, but may be a digital camera such as a line camera or an area camera. Although not shown, the digital camera may read the textile 700 being transported by a transport device. For example, while the transport device is transporting the textile 700, the line camera may repeatedly read the textile 700, thereby generating data of a read image representing the textile 700. In either case, the color components of the read image may be any color components, such as grayscale, RGB, YCbCr, or CMYK.
[0132] (11) In the above embodiment and modifications, the processor 210 may cause the GPU 260 to execute various calculations. For example, the processor 210 may cause the GPU 260 to execute some or all of the calculations performed by the object detection model 300. Note that the GPU 260 may be omitted.
[0133] (12) The detection device is not limited to a personal computer (e.g., data processing device 200 (FIG. 1)), but may be various other devices (e.g., a digital camera, a scanner, a smartphone). Furthermore, multiple devices (e.g., computers) that can communicate with each other via a network may share part of the data processing function of the detection device, and together provide the data processing function (a system including these devices corresponds to the detection device).
[0134] In each of the above embodiments and modifications, a part of the configuration realized by hardware may be replaced by software, and conversely, a part or all of the configuration realized by software may be replaced by hardware. For example, the process of S120 in Fig. 3 may be executed by a dedicated hardware circuit such as an Application Specific Integrated Circuit (ASIC).
[0135] Furthermore, when some or all of the functions of the present disclosure are realized by a computer program, the program can be provided in a form stored on a computer-readable recording medium (e.g., a non-transitory recording medium). The program can be used while stored on the same or a different recording medium (computer-readable recording medium) from when it was provided. The "computer-readable recording medium" is not limited to portable recording media such as memory cards and CD-ROMs, but can also include internal storage devices within a computer, such as various ROMs, and external storage devices connected to a computer, such as a hard disk drive.
[0136] The above-described examples and modifications can be combined as appropriate. The above-described examples and modifications are provided to facilitate understanding of the present disclosure and are not intended to limit the present invention. The present invention may be modified or improved without departing from the spirit thereof, and the present invention includes equivalents thereof.
[0137] 100...Scanner 120...Sensor unit 121...Light source 122...Reading sensor 130...Conveyor device 140...Control device 190...Housing 192...Cover 193...Frame 194...Support base 200...Data processing device 210...Processor 215...Storage device 220...Volatile storage device 230...Nonvolatile storage device 231...Program 240...Display unit 250...Operation unit 260...Graphics processor Graphics processing unit (GPU) 270...Communication interface 300...Object detection model 700...Woven fabric Af, Af1-Af4...Weft area Ag, Ag1-Ag6...Gap area Ap, Ap1-Ap5, Ap11-Ap15, Apa, Apf...Warp area Cp, Pa...Crossing positions df, df1-df8, dp, dp1-dp8...Interval I10, I20...Read image Wf, Wfd...Weft Wp, Wpd...Warp
Claims
1. A program that causes a computer to realize the following functions: determining an attribute pattern representing attributes of threads at each of multiple intersection positions of warp threads and weft threads by analyzing an image representing a woven fabric having multiple warp threads and multiple weft threads that has been optically read, the attributes including one or more of visible threads, color, and width of the warp threads and weft threads; detecting a difference between the attribute pattern and information representing the criteria for the attributes; and executing a specific process when the difference is detected.
2. A program as described in claim 1, wherein the function of determining the attribute pattern includes: a function of detecting a plurality of regions including a plurality of warp regions and a plurality of weft regions, each of the plurality of warp regions representing a portion of the plurality of warp threads that is visible and not hidden by the plurality of weft threads, and each of the plurality of weft regions representing a portion of the plurality of weft threads that is visible and not hidden by the plurality of warp threads; and a function of determining the attribute pattern using the positional relationship between the plurality of warp regions and the plurality of weft regions.
3. The program according to claim 2, wherein the attributes include the visible ones of the warp threads and the weft threads.
4. A program as described in claim 3, wherein the function of determining the attribute pattern includes a function of determining the attribute pattern by connecting each of the plurality of warp regions with an adjacent warp region located in the extension direction of the warp region, and connecting each of the plurality of weft regions with an adjacent weft region located in the extension direction of the weft region.
5. The program according to any one of claims 1 to 4, wherein the attribute includes one or both of the color and the width.
6. A program according to any one of claims 1 to 4, wherein the function for determining the attribute pattern includes one or both of a first area detection function for detecting a plurality of areas including a plurality of warp areas and a plurality of weft areas, and a second area detection function for detecting a plurality of gap areas between the plurality of warp threads and the plurality of weft threads, each of the plurality of warp areas representing a portion of the plurality of warp threads that is visible and not hidden by the plurality of weft threads, and each of the plurality of weft areas representing a portion of the plurality of weft threads that is visible and not hidden by the plurality of warp threads, and the program further includes one or both of a first calculation function for calculating one or both of a plurality of intervals between the plurality of warp threads and a plurality of intervals between the plurality of weft threads using a positional relationship between the plurality of warp areas and the plurality of weft areas, and a second calculation function for calculating one or both of a plurality of intervals between the plurality of warp threads and a plurality of intervals between the plurality of weft threads using a positional relationship between the plurality of gap areas, a function of detecting a difference between one or both of the plurality of intervals between the plurality of warp threads and the plurality of intervals between the plurality of weft threads and information indicating a reference for the intervals.
7. A detection device comprising: a determination unit that determines an attribute pattern representing attributes of threads at each of a plurality of crossing positions of warp threads and weft threads by analyzing an image representing a woven fabric having a plurality of warp threads and a plurality of weft threads that has been optically read, the attributes including one or more of attributes of visible threads, color, and width among the warp threads and the weft threads; a detection unit that detects a difference between the attribute pattern and information representing a standard of the attribute; and an execution unit that executes a specific process when the difference is detected.
Citation Information
Patent Citations
Linear pattern recognizing device
JP1994274630A
Method for judging defect of fabric
JP1997210625A
MONITORING DEVICE FOR LOOM, LOOM AND METHOD FOR SUCH MONITORING
JP2016528400A
Apparatus and method for real-time identification of fabric defects during weaving
JP2022529097A
Method and system for line-by-line one dimensional fabric inspection
US20210238781A1
Cited By
Warp deviation detection method for scutching woven fabric based on industrial vision
CN121329974A