Program and detector
By analyzing optically read fabric images to determine thread attribute patterns and comparing them to reference criteria, the method effectively detects abnormalities in textiles, enhancing inspection accuracy and efficiency.
Patent Information
- Application Number
- JP2023184815
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-05-13
AI Technical Summary
Existing techniques for detecting abnormalities in textiles, such as thread loss, lack the ability to accurately differentiate between the attributes of a fabric and those of a standard, leading to inefficiencies in inspection processes.
A method that involves analyzing an optically read fabric image to determine the attribute pattern of threads at intersections, including visibility, color, and width, and comparing this pattern to reference criteria to detect differences and perform specific processes when abnormalities are found.
This approach enables effective detection of differences between fabric attributes and standards, allowing for proper identification of abnormalities such as thread visibility, color, and width deviations, thereby improving the accuracy and efficiency of textile inspections.
Smart Images

Figure 2025073764000001_ABST
Abstract
Description
[Technical field]
[0001] The present specification relates to a technique for detecting anomalies in textiles. [Background technology]
[0002] Woven fabrics may have abnormalities such as loose threads. Inspection devices have been proposed to inspect woven fabrics for abnormalities. For example, Patent Document 1 proposes a technique for calculating the texture period of a woven fabric, setting a comparison region of image data based on the texture period, extracting statistics from the image data in the comparison region, and extracting defects based on the statistics. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 10-121368 Summary of the Invention [Problem to be solved by the invention]
[0004] There is room for improvement in detecting differences between the attributes of a fabric and the attributes of a reference.
[0005] This specification discloses techniques for detecting differences between attributes of a fabric and attributes of a reference. [Means for solving the problem]
[0006] The technology disclosed in this specification can be realized in the following application examples.
[0007] [Application Example 1] A program that causes a computer to realize a function of 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 attributes of visible threads, color, and width among the warp threads and the weft threads; a function of detecting a difference between the attribute pattern and information representing a standard for the attribute; and a function of executing a specific process when the difference is 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 suitably detected.
[0009] The technology disclosed in this specification can be realized in various forms, for example, as a detection method and detection device, a computer program for realizing the functions of those methods or devices, a recording medium (e.g., a non-transitory recording medium) on which that computer program is recorded, and the like. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is an explanatory diagram illustrating a data processing device according to an embodiment; [Diagram 2] FIG. 1 is a perspective view showing an example of a scanner 100. [Diagram 3] 13 is a flowchart illustrating an example of an inspection process. [Figure 4] 13A to 13C are diagrams showing examples of images processed in the inspection process. [Diagram 5] 10 is a flowchart illustrating an example of a process for acquiring information on a warp region, a weft region, and a gap region. [Figure 6] 13(A)-(C) are diagrams showing examples of warp regions, weft regions, and gap regions. [Figure 7]13A is a diagram showing an example of the center, and FIG. 13B is a diagram showing an example of the intersection position. [Figure 8] 13 is a flowchart showing an example of a process for determining an intersection position. [Figure 9] 13 is a flowchart illustrating an example of a comparison process. [Figure 10] 13A and 13B are diagrams illustrating an example of a comparison process. [Figure 11] 1A is a diagram showing an example of a width calculation method, FIG. 1B is a diagram showing a plurality of warp regions Ap associated with one warp thread Wp, and FIG. 1C is a diagram showing a scanned image I20. [Figure 12] 13 is a flowchart illustrating an example of a comparison process. [Figure 13] 1A is a diagram showing an example of spacing, FIG. 1B is a histogram showing the distribution of spacing dp of warp yarns Wp, and FIG. 1C is a histogram showing the distribution of spacing df of weft yarns Wf. [Figure 14] 10 is a flowchart showing a second embodiment of the process for acquiring information on the warp area Ap and the weft area Af. [Figure 15] 13A is a diagram showing an example of a portion of a scanned image I20, and FIG. 13B is a diagram showing an example of a detection result. [Figure 16] 13A to 13G are diagrams showing examples of methods for determining the type of a candidate region. [Figure 17] 13 is a flowchart showing another embodiment of the process of determining an intersection position. [Figure 18] (A) is a diagram showing an example of a method for determining the direction DAp in which the warp area Ap extends. (B) is a diagram showing another method for determining the direction DAp in which the warp area Ap extends. (C) is a diagram showing an example of the connection of the warp areas Ap. (D) is a diagram showing the center Apc11-Apc15. (E) is a diagram showing an example of multiple warp curves WpLc and multiple weft curves WfLc. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] A. First Example: A1. Equipment configuration: 1 is an explanatory diagram showing a data processing device according to an embodiment. The data processing device 200 is, for example, a personal computer. The data processing device 200 performs various data processing for inspecting the appearance of an object (a woven fabric in this embodiment). Hereinafter, it is assumed that the appearance of a woven fabric 700 is 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 perform data processing, 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 of 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 execute various numerical calculations such as image processing, machine learning, etc. The GPU 260 executes various calculations according to instructions from the processor 210. Note that 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 (e.g., one or more of a USB interface, a wired LAN interface, an IEEE802.11 wireless interface, and an industrial camera interface (e.g., CameraLink, CoaXPress, etc.)). In this embodiment, the communication interface 270 is connected to a 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, a first direction D1 and a second direction D2 indicate a horizontal direction, and a 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 a Charge Coupled Device (CCD) or a Complementary Metal Oxide Semiconductor (CMOS). 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 with the read sensor 122, thereby outputting data representative of 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 has a rail that supports the sensor unit 120 slidably in a direction parallel to the second direction D2, a plurality of pulleys, a belt that is wound around the plurality of pulleys and a part of which is fixed to the sensor unit 120, and an electric motor that rotates the pulley. The electric motor rotates the pulley, so that the sensor unit 120 moves 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 repeats reading the textile 700 during the conveying. 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 a 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 placing the textile 700, 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. The start instruction may be input to the data processing device 200 via the communication interface 270 by another device different from the data processing device 200.
[0023] The processor 210 of the data processing device 200 executes the inspection process according to 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 textile 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] 4(A) to 4(C) are diagrams showing examples of images processed in the inspection process. Image I10 in Fig. 4(A) shows an example of a read image of the textile 700. In this embodiment, the read 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 cross 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 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 multiple weft threads Wf. The multiple weft threads Wf may be formed by folding back one long thread multiple times. In this way, one long thread may form multiple thread portions (i.e., multiple weft threads Wf) extending in the horizontal direction at multiple positions in the vertical direction. The same applies to the multiple warp threads Wp.
[0026] Various deformations may occur in the woven fabric. Two line segments Df and Dp are shown on the scanned image I10. The first line segment Df is parallel to the weft thread Wf, and the second line segment Dp is parallel to the warp thread 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, the woven fabric 700 is skewed.
[0027] In S115 (FIG. 3), the processor 210 performs skew correction on the scanned image I10. The skew correction may be various processes (e.g., affine transformation) that correct the scanned image I10 to represent the non-skewed textile 700. FIG. 4(B) shows an example of a scanned image I20 that has been skew corrected. As shown, 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] The method of determining the parameters of the skew correction may be various methods. For example, the processor 210 may detect the skew of the woven fabric 700 by analyzing the read image I10, and correct the detected skew. The method of detecting the skew may be various methods. For example, the processor 210 may detect the direction parallel to the weft yarn Wf and the direction parallel to the warp yarn Wp by the Hough transform. Alternatively, the processor 210 may determine the parameters of the skew correction according to information input by the operator. For example, the processor 210 may display the read 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 read image I10 by operating the operation unit 250. The processor 210 may perform the skew correction according to the line segments Df and Dp specified by the operator.
[0029] FIG. 4(C) is a diagram showing an example of an enlarged view of a portion I20p of the scanned image I20 (FIG. 4(B)) after skew correction. The scanned image I20 shows a plurality of weft threads Wf, a plurality of warp threads Wp, and gaps Wg between the plurality of threads Wf, Wp. The plurality of weft threads Wf are each approximately parallel to a first direction Dx. The plurality of warp threads Wp are each approximately parallel to a second direction Dy. The weave of the woven fabric 700 may be various, such as a "plain weave", a "twill weave", or a "satin weave".
[0030] In S120 (FIG. 3), the processor 210 acquires information on the warp region, weft region, and gap region by analyzing the skew-corrected read image I20. FIG. 5 is a flowchart showing an example of a process for acquiring information on these regions. In S210, the processor 210 detects the warp region, weft region, and gap region from the read image I20. FIGS. 6(A)-6(C) show examples of the detected warp region, weft region, and gap region, respectively. Each figure shows a portion I20p of the read image I20.
[0031] In Fig. 6(A), each of the multiple warp regions Ap (including multiple warp regions Ap1-Ap5) is hatched. Each of the multiple warp regions Ap represents a portion of the multiple warp threads Wp that is not hidden by the weft threads Wf and is visible. In this embodiment, a continuous region that represents 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 Fig. 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 portion of the multiple wefts Wf that is not hidden by the warp threads Wp and is visible. In this embodiment, a continuous region that represents 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-Ag6) is hatched. Each of the gap regions Ag represents a gap between the warp yarns Wp and the weft yarns Wf.
[0034] The method of detecting these regions Ap, Af, and Ag may be various methods. 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 division called instance segmentation. This region division detects the region of the object and the type (class) of the object for each object. This region division determines which object region the pixel is included in for each pixel. The object detection model 300 is trained in advance so that it can appropriately divide multiple types of regions including the warp region Ap, the weft region Af, the gap region Ag, and other regions. The training method may be, for example, the training method of 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 region Ap, Af representing a yarn in the storage device 215 (e.g., the non-volatile storage device 230). The type data is data indicating 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 process of FIG. 5, i.e., the process of S120 in FIG. 3.
[0037] The position data may be various data representing the position of the area in the read 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 (for example, the smallest rectangle circumscribing the area). The position data may represent the coordinates of 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, in the read 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 that distinguish each area to each of the multiple areas Ap, Af, Ag detected. Then, in S215 and S220, the processor 210 generates data representing the correspondence between the pixels of the scanned image I20 and the area identifiers for each pixel as position data.
[0038] In S125 (FIG. 3), the processor 210 determines color values of each of the multiple warp regions Ap and each of the multiple weft regions Af by analyzing the read image I20. The color values of the regions may be various values that represent the color of the region represented by the read image I20. For example, the color value of the region may be determined to be a statistic (e.g., an average value or a mode value of multiple color values of multiple pixels) that indicates the magnitude of the gradation value of each color component in the region. Here, a portion of multiple pixels among the multiple pixels in the region may be used. Alternatively, the color value of the region may be determined to be the color value of a specific pixel in the region (e.g., a pixel at the center of the region). The processor 210 stores data representing the color value 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. 7(A) is a diagram showing an example of the center. In the diagram, a part I20p of the scanned image I20, which is the same as that in FIG. 4(C), is shown. In the diagram, 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 shown by black dots. The processor 210 adopts, for example, the position of the center of gravity of the regions Ap and Af as the position of the center Apc and Afc of each region Ap and Af in the scanned image I20. Alternatively, the regions Ap and Af may be approximated by a rectangle (for example, the smallest rectangle circumscribing the region). The processor 210 may adopt the average position of the four corners of the rectangle as the position of the center. The processor 210 stores data representing the positions of the centers Apc, Afc of the regions Ap, Af in the storage device 215 (eg, 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 a 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 thread centers Apc.
[0041] The graph GP1 below the scanned image I20 in FIG. 7(A) is an example of a histogram showing the distribution of the positions Pcx of the warp center Apc in the first direction Dx. As described above, the warp thread Wp is 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 center Apc in the first direction Dx, and adopts 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 a plurality of 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. As the representative position, 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 may be adopted. As a clustering method, various methods can be adopted. For example, the k-means method may be adopted (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 multiple weft yarns Wf in the second direction Dy. In this embodiment, the processor 210 determines the position Wfy of each of the multiple weft yarns Wf using multiple weft yarn centers Afc.
[0044] The graph GP2 on the right of the scanned image I20 in FIG. 7(A) 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 Wf is approximately parallel to the first direction Dx. Therefore, the positions Pcy of multiple weft centers Afc in the second direction Dy associated with the same weft Wf are approximately the same. One peak in the distribution of the positions Pcy corresponds to one weft Wf. The processor 210 determines the position Wfy of the weft Wf by a method similar to the method for determining the position Wpx of the warp Wp. For example, the processor 210 adopts the position Pcy of the peak or a representative position Pcy of the cluster as the position Wfy of the weft Wf.
[0045] In S460 (FIG. 8), the processor 210 determines the 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 an example of the crossing positions. In the diagram, a portion I20p of the read image I20, which is the same as that in FIG. 7(A), is shown. The multiple straight lines WpL extend in the second direction Dy at multiple positions Wpx in the first direction Dx and correspond to the multiple warp threads Wp. The multiple straight lines WfL extend in the first direction Dx at multiple positions Wfy in the second direction Dy and correspond to the multiple weft threads Wf. The multiple crossing positions Cp correspond to the intersections of the multiple straight lines WpL and the multiple straight lines WfL.
[0046] In S465 (FIG. 8), 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 process in FIG. 8, that is, the process of S160 in FIG.
[0047] In S165, the processor 210 compares the attribute pattern with a reference attribute. FIG. 9 is a flowchart showing an example of the comparison process. In S510, the processor 210 determines an interlacing pattern. FIG. 10(A) is a diagram showing an example of the comparison process between the interlacing pattern and a reference interlacing pattern. A part of the interlacing pattern PI1 is shown in the figure. The interlacing pattern PI1 represents threads that are visible at each of multiple intersection positions (i.e., positions where the warp threads Wp and the weft threads Wf overlap) between multiple warp threads Wp and multiple weft threads Wf. 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 read image I20 (FIG. 4(B)).
[0048] In this embodiment, the processor 210 detects the area including the crossing position Cp (FIG. 7(B)) determined in S160 (FIG. 3) by referring to the position data acquired in S120 (FIG. 3). The processor 210 acquires the type of area of each of the multiple crossing positions Cp (here, warp area Ap or weft area Af). The processor 210 generates data of the crossing pattern PI1 according to the matrix arrangement of the multiple crossing positions Cp (FIG. 7(B)). The crossing pattern PI1 represents the type of thread (called a thread flag) visible at each of the multiple crossing positions. The thread flag is set to the warp flag BLp or the weft flag BLf. In FIG. 10(A), the warp flag BLp is indicated by a hatched square, and the weft flag BLf is indicated by an unhatched square. One column indicates one warp thread Wp, and one row indicates one weft thread Wf.
[0049] In S515 (FIG. 9), the processor 210 detects the abnormal crossing portion by comparing the crossing pattern with a reference crossing pattern. The reference crossing pattern PI2 represents the reference yarn flag pattern (i.e., the reference structure diagram) of the entire textile 700 represented by the read image I20 (FIG. 4(B)). The abnormal crossing portion is a crossing position that indicates a yarn flag different from the reference yarn flag. In this embodiment, the abnormal crossing portion indicates an error in the weaving of the textile 700. FIG. 10(A) shows a portion of the reference crossing pattern PI2 that corresponds to the illustrated portion of the crossing pattern PI1.
[0050] In this embodiment, the reference interlacing pattern PI2 is obtained by repeating a unit pattern (not shown) in the first direction Dx and the second direction Dy. Among the patterns represented by the repetition of the unit patterns, a predetermined portion corresponding to the multiple rows and multiple columns of the interlacing pattern PI1 (i.e., the multiple weft threads Wf and multiple warp threads Wp of the textile 700) is used as the reference interlacing pattern PI2. For example, the end column in the first direction Dx of the reference interlacing pattern PI2 represents an appropriate yarn flag pattern of the end column in the first direction Dx of the interlacing pattern PI1 (i.e., the end warp threads Wp of the textile 700 in the first direction Dx of the scanned image I20).
[0051] The processor 210 detects a crossing position where the yarn flags are different between the crossing pattern PI1 and the reference crossing pattern PI2 (i.e., an abnormal crossing portion). FIG. 10(A) shows a portion of the crossing result pattern PI3 representing the detection result, which 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 the crossing positions where the yarn flags match (e.g., a yarn flag). Although not shown, the crossing result pattern PI3 represents the pattern of the overall detection result of the fabric 700 represented by the read 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 is a pattern that represents the color values of the threads visible at each of a plurality of crossing positions. FIG. 10(B) is a diagram showing an example of a comparison process between a color pattern and a reference color pattern. A part of a color pattern PC1 is shown in the diagram. The color pattern PC1 is represented by a crossing pattern PI1 (FIG. 10(A)) and the color values of each region determined in S125 (FIG. 3). In the diagram, a code indicating a color (here, white Cw or blue Cb) is assigned to each crossing position of the color pattern PC1.
[0054] In S530, the processor 210 detects color abnormality parts 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 part of the reference color pattern PC2 that corresponds to the illustrated part 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 woven fabric 700. The color abnormality parts indicate threads associated with crossing positions that show a color different from the reference color.
[0055] The processor 210 uses the color pattern PC1 and the reference color pattern PC2 to detect crossing positions that show a color different from the reference color, and detects threads (i.e., color abnormality portions) that correspond to the detected crossing 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). In addition, 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 experimentally determined in advance such that the color value is within the reference range when the thread color is appropriate and the color value 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 (eg, 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 the warp region Ap. As shown in the figure, the contour OL of the warp region Ap can bend in various directions. The width of the warp region Ap in the first direction Dx can differ depending on the position in the second direction Dy. In the figure, widths ApW1-ApW7 in the first direction Dx at seven pixel positions Py1-Py4 in the second direction Dy are shown. The widths ApW1-ApW7 can differ from each other.
[0059] In this embodiment, a statistic 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 multiple pixel positions among the multiple pixel positions in the second direction Dy in the warp area Ap may be used. In addition, 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 the pixel position in the second direction Dy that indicates such a recess CVy is excluded from the calculation of the width ApW. In other words, it is preferable that the length of a continuous portion in the warp area Ap from the end of the warp area Ap on the second direction Dy side to the end on the opposite direction (also called the -Dy direction) side is 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 of each of the multiple weft regions Af in the second direction Dy. The method of calculating the width of the weft region Af is the same as the method of calculating the width ApW of the warp region Ap, but with the first direction Dx and the second direction Dy interchanged. The widths of the regions Ap, Af are calculated by analyzing the position data of the regions Ap, Af (S210-S215 (FIG. 5)). The position data is data obtained by analyzing the read image I20 (S210-S215 (FIG. 5)). The processor 210 obtains the widths of the regions Ap, Af by analyzing the read 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 is also 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 position determined in S160 (FIG. 3). FIG. 11(B) is a diagram showing multiple warp thread areas Ap associated with one warp thread Wp. Multiple warp thread areas Ap including warp thread areas Apa-Apc are associated with the same warp thread Wp. The correspondence between the warp thread Wp and the warp thread area Ap is obtained by referring to the crossing position (FIG. 7(B)).
[0064] As the width pW of the warp thread Wp, various values indicating the size of the warp thread Wp in the first direction Dx can be used. 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 value or maximum value of the multiple widths of the multiple warp thread areas Ap associated with the warp thread Wp (including the widths ApaW-ApcW of the warp thread areas 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 thread areas 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 of calculating the width of the weft thread Wf is the same as the method of 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 the width abnormality portion by comparing the width pattern with the reference width pattern. FIG. 11(C) is a diagram showing the read image I20. Here, it is assumed that the woven fabric 700 has u warp threads Wp and v weft threads Wf. As described in S545 (FIG. 9), the processor 210 generates the width pattern PW1 from the cross width pattern PWc1, which is a pattern of a plurality of widths of a plurality of warp thread regions Ap and a plurality of widths of a plurality of weft thread 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, appropriate thicknesses of the multiple warp threads Wp and the multiple weft threads Wf are predetermined according to the configuration of the woven fabric 700. The reference width pattern PW2 is predetermined 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 that have a width 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 the 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 process in FIG. 9, that is, the process of S165 in FIG.
[0069] In S170, the processor 210 compares the yarn spacing with a reference spacing. FIG. 12 is a flow chart 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. In the figure, a portion I20p of the scanned image I20, which is the same as that in FIG. 7(B), is shown. The areas Ap and Af are omitted, and a number of 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 multiple intervals (here, the distance in the first direction Dx) between the multiple straight lines WpL as multiple intervals between the multiple warp threads Wp. The intervals dp1-dp8 in the figure respectively indicate the calculated intervals between two adjacent warp threads Wp. The intervals between the warp threads Wp indicate the density of the warp threads Wp (the larger the interval, the lower the density). Similarly, the processor 210 calculates multiple intervals (here, the distance in the second direction Dy) between the multiple straight lines WfL as multiple intervals between the multiple weft threads Wf. The intervals df1-df8 in the figure respectively indicate the calculated intervals between two adjacent weft threads Wf. The intervals between the weft threads Wf indicate 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. The 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 range Rdp of the spacing. The reference range Rdp indicates a range of appropriate spacing dp. The reference range Rdp is determined in advance according to the configuration of the fabric 700.
[0072] The processor 210 detects the interval dp outside the reference range Rdp as an abnormal interval 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 interval dp6 on the left of the warp thread Wpd is reduced, and the interval dp7 on the right of the warp thread Wpd is increased. As shown in FIG. 13(B), these intervals dp6 and dp7 are outside the reference range Rdp. The processor 210 detects the intervals dp6 and dp7 as an abnormal interval portion dpe. In this embodiment, the processor 210 acquires information indicating the detected intervals and the warp threads Wp that form these intervals as an abnormal interval portion. In the example of FIG. 13(A), information indicating the intervals dp6 and dp7 and the warp thread Wpd is acquired as the abnormal interval portion dpe.
[0073] The abnormal spacing portion of the spacing df of the weft yarn Wf is detected in the same 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 the appropriate spacing df. The reference range Rdf is determined in advance according to the configuration of the woven fabric 700. The processor 210 detects the spacing df outside the reference range Rdf as the abnormal spacing portion. 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 is reduced, and the spacing df3 below the weft yarn Wfd is increased. 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 the abnormal spacing portion dfe. The processor 210 acquires information representing the detected intervals df2, df3 and the weft yarns Wfd forming these intervals df2, df3 as an abnormal interval portion dfe.
[0074] In S670 (FIG. 12), the processor 210 stores the data representing the interval abnormal portion in the storage device 215 (for example, the non-volatile storage device 230). Then, the processor 210 ends the process in FIG. 12, that is, the process of S170 in FIG.
[0075] In S190, the processor 210 notifies the operator of the comparison result. The comparison result includes the detection result of the intersection abnormality portion (FIG. 9: S515), the detection result of the color abnormality portion (FIG. 9: S530), the detection result of the width abnormality portion (FIG. 9: S550), and the detection result of the spacing abnormality portion (FIG. 12: S665). The notification method may be any method. For example, the processor 210 may display information (e.g., text, table, etc.) representing the comparison result on the display unit 240. The notified comparison result may be various information including information indicating whether or not an abnormality portion has been detected. For example, when an abnormality portion is detected, the processor 210 may display an image of the fabric 700 having information (e.g., arrows, etc.) indicating the position of each abnormality portion on the display unit 240.
[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 determines an attribute pattern representing the attributes of the yarns at each of a plurality of intersection positions by analyzing the read image I20 (Figs. 4(B) and 4(C)). The read image I20 is an image representing the woven fabric 700 having a plurality of weft yarns Wp and a plurality of weft yarns Wf, and is optically read. The intersection positions are the intersection positions of the warp yarns Wp and the weft yarns Wf, as described in Fig. 7(B). The attributes include the visible threads of the warp thread Wp and the weft thread 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 (warp thread flag BLp or weft thread flag BLf in this embodiment) indicating which of the warp thread Wp and the weft thread Wf is visible. The reference crossing pattern PI2 is an example of information indicating the reference of the visible thread. The abnormal crossing portion BLIe is an example of a difference portion between the crossing pattern PI1 and the reference crossing pattern PI2. Such a difference portion indicates a difference portion 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. 10(B), in S530 (FIG. 9), the processor 210 detects the color abnormality parts WpCe, 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 of color (in this embodiment, white Cw, blue Cb, or red Cr). The color abnormality parts WpCe, WfCe are examples of difference parts 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 width abnormality parts Wpe, 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, that is, the width of the yarn at each of the multiple cross positions Cp (FIG. 7(B)). The width pattern PW1 represents each of the multiple warp regions Ap and multiple weft regions Af. The reference width pattern PW2 is an example of information representing a width reference. The width abnormality parts Wpe, Wfe are examples of difference parts between the cross width pattern PWc1 and the reference width pattern PW2.
[0081] In S190 (FIG. 3), when 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 the difference between the attribute pattern and the information representing the attribute standard by determining the attribute pattern (here, the intersection pattern PI1, the color pattern PC1, and the intersection width pattern PWc1) by analyzing the read image I20 representing the optically read textile 700. The data processing device 200 is an example of a detection device that detects the difference.
[0083] In this embodiment, the process of determining the attribute pattern includes S120, S135, S160, and S165 (FIG. 3). As shown in FIG. 6(A) and FIG. 6(B), in 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 not hidden by the plurality of weft threads Wf and is visible. Each of the plurality of weft regions Af represents a portion of the plurality of weft threads Wf that is not hidden by the plurality of warp threads Wp and is visible. In 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 (for example, FIG. 7(A) and FIG. 7(B)). 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 FIG. 7(A) and FIG. 7(B), in the read image I20, the multiple warp threads Wp are arranged so that the positions of the warp threads Wp in the first direction Dx are different from each other, and the multiple weft threads Wf are arranged so that the positions of the weft threads Wf in the second direction Dy are different from each other. As described in FIG. 8, the position of the warp thread area Ap in the first direction Dx and the position of the weft thread area Af in the second direction Dy are used as the positional relationship between the multiple warp thread areas Ap and the multiple weft thread areas Af. The processor 210 can determine an appropriate attribute pattern by using such a positional relationship. For example, the length of the second direction Dy of the warp thread area Ap may differ between multiple warp thread areas Ap depending on the weaving method. On the other hand, the position of the warp thread area Ap in the first direction Dx is approximately the same between multiple warp thread areas Ap associated with the same warp thread Wp, regardless of the weaving method. The processor 210 can appropriately obtain the positions of the multiple warp threads Wp in the first direction Dx, regardless of the weaving method, by using the positions of the multiple warp thread regions Ap in the first direction Dx. Similarly, the processor 210 can appropriately obtain the positions of the multiple weft threads Wf in the second direction Dy, regardless of the weaving method, by using the positions of the multiple weft thread regions Af in the second direction Dy. 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 also include visible yarns among the warp yarns Wp and weft yarns Wf (S510 (FIG. 9), yarn flags BLp, BLf (FIG. 10(A))). The processor 210 can detect differences between the visible yarns and the reference yarns (e.g., weaving anomalies in 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))). Processor 210 can detect differences between the color and a reference color (e.g., an incorrect thread color). Processor 210 can detect differences between the width and a reference width (e.g., an incorrect thread thickness).
[0087] In this embodiment, as described above, in S120 (FIG. 3), the processor 210 detects a plurality of regions including a plurality of warp regions Ap and a plurality of weft regions Af (FIGS. 6(A) and 6(B)). Each of the plurality of warp regions Ap represents a portion of the plurality of warp threads Wp that is not hidden by the plurality of weft threads Wf and is visible. Each of the plurality of weft regions Af represents a portion of the plurality of weft threads Wf that is not hidden by the plurality of warp threads Wp and is visible. The processor 210 further calculates both the plurality of intervals dp of the plurality of warp threads Wp and the plurality of intervals df of the plurality of weft threads Wf by S135, S160, and S170 (S660 (FIG. 12)) of FIG. 3 using the positional relationship between the plurality of warp regions Ap and the plurality of weft regions Af (FIGS. 12, 13(A)-13(C)). In S665 (FIG. 12), the processor 210 detects the abnormal spacing parts dpe, dfr using both the multiple spacings dp of the multiple warp threads Wp and the multiple spacings df of the multiple weft threads Wf, and the spacing reference ranges Rdp, Rdf. The spacing reference ranges Rdp, Rdf are an example of information that represents the reference for the spacings dp, df. The abnormal spacing parts dpe, dfr are an example of the difference parts between the multiple spacings dp, df and the reference ranges Rdp, Rdf. The processor 210 can appropriately detect the difference parts in spacing by using the positional relationship between the multiple warp thread areas Ap and the multiple weft thread areas Af.
[0088] B. Second Example: Fig. 14 is a flow chart showing a second embodiment of the process for acquiring information on the warp region Ap and the weft region Af. The process in Fig. 14 is executed in S120 (Fig. 3) instead of the process in Fig. 5. In S710, the processor 210 detects candidate regions for the warp region and the weft region.
[0089] FIG. 15(A) is a diagram showing an example of a portion of the read image I20. The same portion as the portion I20p in FIG. 4(C) is shown in the figure. The processor 210 detects bright areas in the read image I20 as candidate areas. When reading the textile 700, a light source such as the light source 121 (FIG. 2) irradiates light onto the textile 700. A reading device such as the scanner 100 reads the reflected light from the textile 700. The portions of the warp threads Wp and weft threads Wf that are not hidden at the intersections are easily exposed to light, and are therefore shown in bright colors in the read image I20. The other portions of the warp threads Wp and weft threads Wf are less likely to receive light, and are therefore shown in dark colors in the read image I20. Shadows are easily generated at the boundary between a thread (warp threads Wp or weft threads Wf) and another thread. The boundary portion is shown in dark colors in the read image I20. The gaps between the warp and weft yarns Wp and Wf are also represented in a dark color in the scanned image I20. The gaps may be represented in a darker color than the yarns. Thus, the light areas represent the warp or weft yarn 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 read image I20. A first graph G1 below the read 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 on the right of the read 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 part of the warp thread Wp and the weft thread Wf that is not hidden at the intersection position is large. The luminance value BV of the other part of the warp thread Wp and the weft thread Wf is small. The luminance value BV of the boundary part between the thread and other threads is small. When the color components of the scanned image I20 do not include the luminance value BV, the processor 210 obtains the luminance value BV by a known color conversion.
[0091] The processor 210 detects an area where pixels having a luminance value BV equal to or greater than the threshold value BVth are consecutive as a candidate area. Fig. 15(B) is a diagram showing 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 the warp area Ap or the weft area Af in Fig. 6(A) and Fig. 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 the candidate area (here, warp area or weft area) by analyzing the image of the candidate area. FIGS. 16(A)-16(G) are diagrams showing examples of methods for determining the type of the candidate area. FIGS. 16(A)-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 is a method using the arrangement of light and dark areas in the candidate area. FIG. 16(A) shows a first candidate area Ath1 representing the warp thread Wp and a second candidate area Ath2 representing the weft thread Wf. When reading the woven fabric 700, a light source such as the light source 121 (FIG. 2) irradiates the woven fabric 700 with light. The three-dimensional warp thread Wp and weft thread Wf may have relatively light and dark areas. The dark area is formed, for example, in a part of the thread on the side opposite to the direction of the light source. The first candidate area Ath1 has a light area AB1 and a dark area AD1, and the second candidate area Ath2 has a light area AB2 and a dark area AD2. The arrangement of the light and dark areas is determined according to the arrangement of the light source. In the example of FIG. 16(A), the dark areas AD1 and AD2 are formed in the parts of the candidate areas 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. The thread may cast a shadow on the surface of the other thread. The dark area indicating the shadow may be formed in the boundary part between the multiple candidate areas Ath adjacent to each other.
[0094] 16B shows an example of an analysis of the first candidate region Ath1. The processor 210 divides the first candidate region Ath1 into a first partial region AR1 on the first direction Dx side and a second partial region AL1 on the -Dx direction side along a line CL1 that passes through the center of gravity C1 of the first candidate region Ath1 and is parallel to the second direction Dy. The processor 210 calculates a first luminance value BR1 of the first partial region AR1 and a second luminance value BL1 of the second partial region AL1. The luminance values BR1 and BL1 may be various statistics (for example, the average value or the mode within the region).
[0095] When the first candidate region Ath1 represents a warp thread Wp, the first candidate region Ath1 extends in the second direction Dy. The size in the first direction Dx is smaller than the size in the second direction Dy. In this case, most of the dark region AD1 is included in the second partial region AL1, and most of the light region AB1 is included in the first partial region AR1. Therefore, the second luminance value BL1 is smaller than the first luminance value BR1. When the luminance ratio (BL1 / BR1) is less than the threshold value Bth, the processor 210 determines that the type of the first candidate region Ath1 is a warp thread region Ap.
[0096] Fig. 16(C) shows an example of analysis of the second candidate region Ath2. The processor 210 divides the second candidate region Ath2 into a first partial region AR2 on the first direction Dx side and a second partial region AL2 on the -Dx direction side by a line CL2 passing through the center of gravity C2 of the second candidate region Ath2 and parallel to the second direction Dy. The processor 210 calculates a first luminance value BR2 of the first partial region AR2 and a second luminance value BL2 of the second partial region AL2. The calculation method of the luminance values BR2 and BL2 is the same as the calculation method of the luminance values BR1 and BL1 described in Fig. 16(B).
[0097] When the second candidate region Ath2 represents a weft thread Wf, the second candidate region Ath2 extends in the first direction Dx. The size of the first direction Dx is larger than the size of the second direction Dy. In this case, most of the dark region AD2 is included in the second partial region AL2. The light region AB2 extends from the first partial region AR2 to the second partial region AL2. Therefore, the brightness ratio (BL2 / BR2) is larger than the brightness ratio (BL1 / BR1) in FIG. 16(B). When 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 region Ath2 is a weft thread region Af.
[0098] The processor 210 determines the type of each of the multiple candidate regions Ath as either the warp region Ap or the weft region Af using the brightness ratio and the threshold value Bth. The process of S715 (FIG. 14) is then terminated. The threshold value Bth is determined experimentally in advance so that the type of each of the multiple candidate regions 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 (for example, the non-volatile storage device 230). This process is the same as the process of S215 (FIG. 5). Then, the processor 210 ends the process of FIG. 14 (and thus the process of S120 (FIG. 3)).
[0100] The process of Fig. 14 detects the warp region Ap and the weft region Af. In S120 (Fig. 3), the processor 210 may further detect the gap region Ag. There may be various methods for detecting the gap region Ag. For example, the processor 210 may detect, as the gap region Ag, a region in which pixels having a luminance value BV equal to or less than a gap threshold value are consecutive. The gap threshold value is experimentally determined 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 Fig. 16(B) and Fig. 16(C), and may be various conditions suitable for the characteristics of the read 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 luminance ratio of the two partial regions.
[0102] The method of determining the type of the candidate region Ath may be another method instead of the first method. The second method (FIGS. 16(D) and 16(E)) is a method of using an image of the candidate region Ath. FIG. 16(D) shows a first candidate region Ath1 representing the warp thread Wp, and FIG. 16(E) shows a second candidate region Ath2 representing the weft thread Wf. In this embodiment, the warp thread Wp and the weft thread Wf are twisted yarns produced by twisting multiple fibers. In this case, the images of the candidate regions Ath1 and Ath2 represent multiple twisted fibers. As shown in FIG. 16(D), the image of the first candidate region Ath1 representing the warp thread Wp represents multiple twisted fibers extending toward the second direction Dy. As shown in FIG. 16(E), the image of the second candidate region Ath2 representing the weft thread Wf represents multiple twisted fibers extending toward the first direction Dx. The processor 210 may use such a difference between images to determine the type of the candidate region Ath. For example, the processor 210 may determine the type of the 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 determine the type of the candidate region Ath using a trained machine learning model (e.g., a classification model).
[0103] The third determination method (FIGS. 16(F) and 16(G)) is a method that uses the aspect ratio of the candidate area Ath. In this embodiment, the candidate area Ath representing the warp thread Wp is long in the second direction Dy, and the candidate area Ath representing the weft thread Wf is long in the first direction Dx. As shown in FIG. 16(F), when the first candidate area Ath1 represents the warp thread Wp, the height H1 (size in the second direction Dy) of the first candidate area Ath1 is larger than the width W1 (size in the first direction Dx) of the first candidate area Ath1. When the height H1 is larger than the width W1, the processor 210 determines that the type of the first candidate area Ath1 is the warp area Ap. As shown in FIG. 16(G), when the second candidate area Ath2 represents the weft thread Wf, the height H2 of the second candidate area Ath2 is smaller than the width W2 of the second candidate area Ath2. When 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 manner, the processor 210 may use the height and width of the candidate area Ath to determine the type 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 with the first direction Dx and the second direction Dy interchanged.
[0104] C. Third Example: Fig. 17 is a flowchart showing another embodiment of the process of determining the crossing position. The process of Fig. 17 is executed in S160 (Fig. 3) instead of the process of Fig. 8. In S810, the processor 210 determines the direction in which each of the multiple warp regions Ap extends.
[0105] FIG. 18(A) is a diagram showing an example of a method for determining the direction DAp in which the warp region Ap extends. The processor 210 executes a contraction process in the first direction Dx to thin the warp region Ap. The processor 210 then calculates a straight line that approximates the thinned warp region Apf, and adopts a direction parallel to the calculated straight line as the extending direction DAp. The contraction process may be, for example, a process for setting the target pixel to a non-region pixel when a plurality of peripheral pixels determined by a filter arranged at the position of the target pixel include a non-region pixel. The filter may be, for example, a pixel line of a predetermined length (for example, three pixels) that extends in the first direction Dx centered on the target pixel. The processor 210 repeats the contraction process until the size of 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 differ depending on the 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 smaller than a threshold value (for example, 3 pixels).
[0106] The direction DAp may be determined by other methods. 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 to 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 such a 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 such a 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. In the diagram, multiple warp areas Ap11-Ap15 are shown. 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 to the selected warp area Ap12. Similarly, the other warp regions Ap12-Ap15 are connected to the adjacent warp regions Ap using the centers Apc12-Apc15, the extending directions DAp12-DAp15, and the straight lines LAp12-LAp15. In the example of FIG. 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 that are connected to each other. 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 thread 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 region Ap, which are modified to process the weft region Af. In S825, the processor 210 determines the direction in which each of the multiple weft regions Af extends. The determination method is the same as the method for determining the direction DAp in which the warp region Ap extends (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 region Af to the adjacent weft region Af located in the direction in which the weft region Af extends. The connection method is the same as the method described in FIG. 18(C). In S835, the processor 210 determines a curve that fits the centers of the multiple weft regions 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 a 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 crossing 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 process of Fig. 17, that is, the process of S160 in Fig. 3.
[0114] As described above, in this embodiment, the process of determining the attribute pattern includes S120, S135, S160, and S165 (FIG. 3). In S160, the processor 210 executes the process of FIG. 17. In S810-S815, the processor 210 connects each of the multiple warp regions Ap to the adjacent warp regions Ap located in the direction in which the warp regions Ap extend. In S825-S830, the processor 210 connects each of the multiple weft regions Af to the adjacent weft regions Af located in the direction in which the weft regions Af extend. The processor 210 uses the result of this connection to determine the attribute pattern (S165 (FIG. 3)). Therefore, even if the fabric 700 has a deformation (such as a skew or a distortion) in the read image, the processor 210 can determine an appropriate attribute pattern.
[0115] This embodiment may be applied to the first and second embodiments.
[0116] D. Variations: (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 areas Ag (FIG. 6(C)). For example, the length of the gap area Ag in the first direction Dx can be used as the interval between two adjacent warp threads Wp via the gap area Ag. The method of calculating the length of the gap area Ag in the first direction Dx may be similar to the method of calculating the width of the warp thread area Ap (e.g., FIG. 11(A)). The multiple gap areas Ag between two adjacent warp threads Wp may have different lengths in the first direction Dx. The processor 210 may calculate a statistic indicating the size of the interval as the interval between the warp threads Wp (e.g., the average value, mode, or maximum value of the multiple lengths of the multiple gap areas Ag between two adjacent warp threads Wp). Similarly, the length of the gap area Ag in the second direction Dy can be used as the interval between two adjacent weft threads Wf through the gap area Ag. The calculation method of the length of the gap area Ag in the second direction Dy may be the same as the calculation method of the length of the gap area Ag in the first direction Dx, with the first direction Dx and the second direction Dy interchanged. The processor 210 may calculate a statistic indicating the size of the interval between two adjacent weft threads Wf as the interval between the weft threads Wf (for example, the average value, the mode, or the maximum value of the multiple lengths of the multiple gap areas Ag between two adjacent weft threads Wf). The processor 210 may detect an interval outside the reference range (i.e., a difference portion) by comparing multiple intervals between multiple warp threads Wp with a reference range of intervals between the warp threads Wp. Similarly, the processor 210 may detect an interval outside the reference range (i.e., a difference portion) by comparing multiple intervals between multiple weft threads Wf with a reference range of intervals between the weft threads Wf.
[0117] Moreover, the processor 210 may detect, from among the plurality of gap regions Ag, a gap region Ag having a size different from a reference size as a difference portion of the interval. The reference size may be determined in advance according to the configuration of the woven fabric 700. The reference size may be determined, for example, 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 a gap region Ag having a length in the first direction Dx outside the first reference range as a difference portion between the interval of the warp yarns Wp and the information representing the interval reference (here, the first reference range). Similarly, the processor 210 may detect a gap region Ag having a length in the second direction Dy outside the second reference range as a difference portion between the interval of the weft yarns Wf and the information representing the interval reference (here, the second reference range).
[0118] The interval standard may indicate a standard of variation in size of the gap regions Ag between two adjacent threads. The interval standard may be determined, for example, by a first upper limit value of the variance in the length of the gap regions Ag between two adjacent warp threads Wp in the first direction Dx and a second upper limit value of the variance in the length of the gap regions Ag between two adjacent weft threads Wf in the second direction Dy. The processor 210 may detect two adjacent warp threads Wp that show a variance equal to or greater than the first upper limit value as a difference portion between the interval of the warp threads Wp and the information representing the interval standard (here, the first upper limit value). Similarly, the processor 210 may detect two adjacent weft threads Wf that show a variance equal to or greater than the second upper limit value as a difference portion between the interval of the weft threads Wf and the information representing the interval standard (here, the second upper limit value).
[0119] The processor 210 may perform one or both of the detection of the difference in spacing using the gap area Ag and the detection of the difference in spacing using the warp area Ap and the weft area Af (FIG. 12). When the gap area Ag is not used, the detection of the gap area Ag may be omitted in S120 (FIG. 3). Also, from the detection of the difference in spacing, one of the spacing of the warp thread Wp and the spacing of the weft thread Wf may be omitted.
[0120] (2) The object detection model 300 is not limited to Mask R-CNN, but may be any of various pre-trained machine learning models capable of detecting the areas to be processed (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 the processing target area (e.g., warp area Ap, weft area Af, and gap area Ag) from the read image (S120 (FIG. 3)) may be various other methods instead of the area detection process by the object detection model 300 (FIG. 5) and the process of detecting the bright part (FIG. 14). For example, the processor 210 may detect each area Ap, Af, Ag by template matching using a template image of each area Ap, Af, Ag. Note that the thread (e.g., warp thread Wp and weft thread Wf) may include one or both of natural fibers and chemical fibers. When the thread includes natural fibers, the variation in the attributes of the thread (color, thickness, etc.) may be large. The machine learning model can appropriately detect the processing target area even when the variation in the attributes of the thread is large.
[0122] (4) In the embodiment 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 adopted 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 including 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 the multiple warp regions Ap representing the target warp thread Wp are included within the first range, and the centers of the warp regions Ap representing the other warp threads Wp are outside the first range. The multiple warp regions Ap having centers within the first range are arranged in the second direction Dy. The processor 210 selects the warp region Ap adjacent to the target warp region Ap from among the multiple warp regions Ap. The neighboring weft region Af located in the extension direction of the target weft region Af is also selected in the same manner. The processor 210 determines a second range of positions in the second direction Dy including 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 the weft region Af adjacent to the target weft region Af from among the multiple weft regions Af having centers within the second range.
[0123] (5) The process of determining the multiple crossing positions of the warp and weft threads may be various other processes instead of the processes of each of the above-mentioned embodiments (for example, Figs. 7(A), 7(B), 8, 17, and 18) and each modified example. The processor 210 may determine the multiple crossing positions using the positional relationship between the multiple warp thread regions Ap and the multiple weft thread regions Af. For example, the processor 210 divides a long warp thread region Ap that crosses multiple weft threads Wf into multiple warp thread regions Ap that crosses one weft thread Wf. The total number of warp thread regions Ap obtained by the division is determined according to the length of the long warp thread region Ap. The processor 210 divides a long weft thread region Af that crosses multiple warp threads Wp into multiple weft thread regions Af that crosses one warp thread Wp. The total number of weft thread regions Af obtained by the division is determined according to the length of the long weft thread 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. 7(B))). 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 detect the multiple intersection positions using a machine learning model (e.g., YOLO (You only look once)) that is trained to detect intersection positions from the scanned image. The processor 210 may detect the 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 between each of the multiple intersection positions and the warp region Ap or the weft region Af, and may use the determined correspondence to determine the attributes at each of the multiple intersection positions. The correspondence between the multiple intersection positions and the regions Ap and Af may be determined by associating the intersection positions with the 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-mentioned embodiments and modifications. For example, the processor 210 may determine the attribute pattern by using a machine learning model that has been trained to generate data of the attribute pattern using data of the scanned image of the textile 700. Various models can be adopted 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 the difference between the attribute pattern and the information representing the attribute standard may be various processes. For example, one of the warp thread Wp and the weft thread Wf may be excluded from the target of the detection of the difference. The attributes to be processed may include one or more attributes arbitrarily selected in advance from the type of thread that is not hidden and is visible (warp thread Wp or weft thread Wf), the color, and the width. For example, one of the color and the width may be omitted. Here, the attributes to be processed may include one of the color and the width, and the type of thread that is visible. Also, both the color and the width may be omitted. Here, the attributes to be processed may include the type of thread that is visible. Also, the type of thread that is visible may be omitted. Here, the attributes to be processed may include one or both of the color and the width. In either case, the processor 210 may detect the width differences 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 range of width for each warp region Ap and a reference range of width for each weft region Af.
[0128] Further, the difference part is not limited to a part indicating an abnormality, but may be various parts indicating a difference between an attribute and a standard of the attribute. For example, the difference part may include a part indicating a difference from a specific pattern (e.g., a symbol, a mark, a character string, etc.).
[0129] (8) The process of detecting the difference may be various other processes instead of the processes in each of the above-mentioned embodiments and modifications. For example, the process of detecting the difference in the interval (S170 (FIG. 3)) may be omitted. Also, the skew correction (S115) may be omitted.
[0130] (9) When a difference portion is detected, the processor 210 may execute various processes (referred to as identification processes) in addition to notification (S190 (FIG. 3)). The identification process may include a process of outputting output data representing the difference portion. 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, an internal storage device (such as the non-volatile storage device 230) of the data processing device 200, or an external storage device connected to the data processing device 200). In this manner, information representing the difference portion may be displayed, printed, or stored. The information representing the difference portion may include an image representing the difference portion of the textile 700, or a flag indicating whether or not the difference portion has been detected. In addition, 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, and 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 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 to generate 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, CMYK, etc.
[0132] (11) In the above embodiment and modified examples, the processor 210 may cause the GPU 260 to execute various calculations. For example, the processor 210 may cause the GPU 260 to execute a part or all of the calculations of 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., digital camera, scanner, smartphone). Furthermore, a plurality of 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 collectively 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 in a computer-readable recording medium (e.g., a non-transitory recording medium). The program can be used in a state stored in 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 may 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-mentioned examples and modifications can be combined as appropriate. The above-mentioned examples and modifications are provided to facilitate understanding of the present disclosure, and do not limit the present invention. The present invention may be modified or improved without departing from the spirit of the present invention, and the present invention includes equivalents thereof. [Explanation of symbols]
[0137] 100...scanner 120...sensor unit 121...light source 122...reading sensor 130...conveyor device 140...control device 190...casing 192...cover 193...frame 194...support stand 200...data processing device 210...processor 215...storage device 220...volatile storage device 230...non-volatile 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... Fabric Af, Af1-Af4... Weft region Ag, Ag1-Ag6... Gap region Ap, Ap1-Ap5, Ap11-Ap15, Apa, Apf... Warp region Cp, Pa... Intersection positions df, df1-df8, dp, dp1-dp8... Interval I10, I20... Read images Wf, Wfd... Weft Wp, Wpd... Warp
Claims
1. A program, A function for determining an attribute pattern representing attributes of yarns at each of a plurality of crossing positions of the warp yarns and the weft yarns by analyzing an optically read image representing a woven fabric having a plurality of warp yarns and a plurality of weft yarns, the attribute pattern including one or more of visible yarns, color, and width of the warp yarns and the weft yarns; detecting differences between the attribute patterns and information representative of the attribute criteria; A function of executing a specific process when the difference portion is detected; A program that enables a computer to achieve this.
2. The program according to claim 1, The function of determining the attribute pattern is A function for 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; a function of determining the attribute pattern using a positional relationship between the plurality of warp regions and the plurality of weft regions; Including, the program.
3. The program according to claim 2, The attributes include the visible ones of the warp yarns and the weft yarns. program.
4. The program according to claim 3, The function of determining the attribute pattern includes a function of determining the attribute pattern by connecting each of the plurality of warp regions to an adjacent warp region located in an extension direction of the warp region, and connecting each of the plurality of weft regions to an adjacent weft region located in an extension direction of the weft region. program.
5. 5. The program according to claim 1, The attributes include one or both of the color and the width. program.
6. 5. The program according to claim 1, The function of determining the attribute pattern is The method 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, The program further comprises: a first calculation function that calculates one or both of a plurality of intervals between the plurality of warps and a plurality of intervals between the plurality of wefts using a positional relationship between the plurality of warp regions and the plurality of weft regions, and a second calculation function that calculates one or both of a plurality of intervals between the plurality of warps and a plurality of intervals between the plurality of wefts using a positional relationship between the plurality of gap regions; A function of detecting a difference between one or both of the plurality of intervals between the plurality of warp yarns and the plurality of intervals between the plurality of weft yarns and information representing a reference for the intervals; A program that enables a computer to achieve this.
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 the warp threads and the weft threads by analyzing an optically read image representing a woven fabric having a plurality of warp threads and a plurality of weft threads, the attribute pattern including one or more attributes of visible threads of the warp threads and the weft threads, a color, and a width; a detection unit for detecting a difference between the attribute pattern and information representing a criterion for the attribute; an execution unit that executes a specific process when the difference portion is detected; A detection device comprising:
Citation Information
Patent Citations
Inspection apparatus for woven fabric
JP1998121368A