Program, and data processing device
The program enhances defect detection and width determination by using multiple read images and a trained model to halt conveyance upon defect detection, improving accuracy and reducing positional errors in object inspection.
Patent Information
- Application Number
- PCT/JP2024/043554
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-26
- Filing Date
- 2024-12-10
- Publication Date
- 2025-07-17
AI Technical Summary
Existing techniques for detecting defects and obtaining the width of an object using a read image are inadequate, leading to inaccurate representations of the object's state.
A program that executes a detection process using multiple read images, including a stop function to halt the conveyance of the object when a defect is detected, and employs a trained object detection model to accurately determine defects and width by combining and merging images to reduce positional deviations.
The solution provides a more accurate representation of the object's state by detecting defects and determining its width with reduced errors, allowing for efficient and precise inspection.
Smart Images

Figure JP2024043554_17072025_PF_FP_ABST
Abstract
Description
Program and data processing device
[0001] The present specification relates to a technique for detecting defects in an object or obtaining the width of an object using a scanned image of the object.
[0002] Various techniques for inspecting objects have been proposed. Patent Document 1 discloses a technique for inspecting the surface of a web, such as an aluminum sheet or a plastic sheet. In this technique, a surface defect detector detects defects present on the surface of the web and outputs a timing signal. Based on the timing signal, a stop control means decelerates the web transport and then stops the defect at a predetermined visual inspection position within the web transport path.
[0003] Japanese Unexamined Patent Publication No. 2-038958
[0004] However, there is room for improvement in terms of detecting defects in an object or acquiring the width of the object using a scanned image of the object.
[0005] This specification discloses a technique for detecting defects in an object or obtaining the width of the object using a scanned image of the object.
[0006] The techniques disclosed in this specification can be implemented in the following application examples.
[0007] [Application Example 1] A program that causes a computer to realize a detection function that sequentially executes a detection process, which is a process of detecting defects in an object, using each of a plurality of read images acquired using a reading device configured to sequentially read different parts of the object by transporting the object, and a stop function that, if a defect is detected by the detection process, executes a stop process that stops the transportation of the object after L (L is an integer equal to or greater than 2) specific read images including a first read image that is a read image in which the defect is detected and one or more read images following the first read image are acquired using the reading device, and the detection function executes the detection process using each of M (M is an integer equal to or greater than 2 and equal to or less than L) target read images including the first read image and one or more read images other than the first read image among the L specific read images.
[0008] According to this configuration, when a defect is detected from the first read image, a detection process is performed on not only the first read image but also one or more read images subsequent to the first read image, so that a detection process result that more appropriately represents the state of the object can be obtained compared to when the detection process result is obtained from only the first read image.
[0009] [Application Example 2] A program that causes a computer to realize the following functions: a function of acquiring multiple scanned images using a reading device configured to sequentially read different parts of fabric having selvedge in a direction perpendicular to the conveying direction by conveying the fabric in the conveying direction, the reading device being configured to read the entire fabric in the direction perpendicular to the conveying direction; a function of detecting P types (P is an integer of 1 or more) of detection objects including the selvedge of the fabric from the scanned images; a function of acquiring the width of the fabric and determining whether or not there is a defect in the fabric when the selvedge is detected; and a function of stopping the conveyance of the fabric and notifying that the selvedge is not detected in a first specific case where the selvedge is not detected.
[0010] With this configuration, when selvedge is detected, either or both of obtaining the width of the fabric and determining whether there is a defect in the fabric are properly performed. Also, in the first case, which is a specific case where the selvedge is not detected, the possibility of inappropriately obtaining the width of the fabric and determining whether there is a defect in the fabric is reduced.
[0011] The technology disclosed in this specification can be realized in various forms, such as a data processing method and a data processing device, a computer program for realizing the functions of the method or device, a recording medium (e.g., a non-temporary recording medium) on which the computer program is recorded, and the like.
[0012] FIG. 1 is an explanatory diagram showing a data processing device as an embodiment. It is a perspective view of digital cameras 111-114, a fabric 700, a conveying device 900, and a light source 130. It is a flowchart showing an example of a reading process. It is a diagram showing an example of flag data D1. (A)-(F) are diagrams showing an example of an image to be processed. It is a flowchart showing an example of an inspection process. It is a flowchart showing an example of an inspection process. It is a diagram showing an example of result data D2. (A) is a diagram showing an example of the shape of the fabric 700 relative to the reading area Ar. (B) is a diagram showing an example of a combined fabric image. (C)-(F) are diagrams showing an example of a combining process. (A)-(F) are diagrams showing an example of a combining process. (A) is a diagram showing an example of changes in the window size N and the window WN. (B) is a diagram showing an example of changes in the combined fabric image. It is a flowchart showing an example of a UI control process. (A)-(C) are diagrams showing an example of a screen displayed on the display unit 240. It is a flowchart showing an example of a merging process of defective portions. 10A-10D are diagrams showing an example of a merging process. A flowchart showing another embodiment of an inspection process. 10A shows an example of a change between a window size N and a window WN. 10B shows an example of a change in a combined texture image. 10C shows a flowchart showing another embodiment of an inspection process. 10D shows a flowchart showing another embodiment of a UI control process. 10A shows an example of a change between a window size N and a window WN. 10C shows an example of a change in a combined texture image. 10D shows a flowchart showing another embodiment of an inspection process. 10D shows a flowchart showing another embodiment of a UI control process. 10A shows an example of a change between a window size N and a window WN. 10C shows an example of a change in a combined texture image. 10D shows a flowchart showing another embodiment of an inspection process. 10D shows a flowchart showing another embodiment of an inspection process. 10D shows a flowchart showing another embodiment of an inspection process.
[0013] A. First Example: A1. Device Configuration: Fig. 1 is an explanatory diagram showing a data processing device as one example. 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 (for example, woven fabric, knitted fabric, or fabric for sewing such as denim fabric). Hereinafter, it is assumed that the appearance of fabric 700 is inspected.
[0014] 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.
[0015] The processor 210 is a device configured to process data, such as a central processing unit (CPU) or a system on a chip (SoC). The volatile storage device 220 is, for example, a dynamic random access memory (DRAM), and the non-volatile storage device 230 is, for example, a flash memory. The non-volatile storage device 230 stores data for a reading module 231, an inspection module 232, a UI module 233, and an object detection model 310. The modules 231-233 are each a program module. The object detection model 310 is a program module that forms a trained machine learning model. The non-volatile storage device 230 also stores flag data D1, result data D2, and merged data D3. Details of the data stored in the non-volatile storage device 230 will be described later.
[0016] 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 user operations, such as buttons, levers, and 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. The display unit 240 may display operation elements (e.g., buttons, sliders, etc.), and the displayed elements may be operated through operation of the operation unit 250.
[0017] The GPU 260 is a computing device configured to perform various numerical calculations such as image processing and machine learning. The GPU 260 performs various calculations in accordance with instructions from the processor 210. A driver program (not shown) for controlling the GPU 260 may be provided by the manufacturer of the GPU 260.
[0018] The communication interface 270 is an interface for communicating with other devices (for example, it includes one or more of a USB interface, a wired LAN interface, an IEEE802.11 wireless interface, and an industrial camera interface (for example, CameraLink, CoaXPress, etc.)). In this embodiment, the communication interface 270 is connected to the conveying device 900, the digital cameras 111-114, and the encoder 120. The conveying device 900 is a device that conveys the fabric 700. The digital cameras 111-114 are used to photograph the fabric 700. The encoder 120 is used to calculate the relative position of the fabric 700 with respect to the conveying device 900 (details will be described later).
[0019] FIG. 2 is a perspective view of the digital cameras 111-114, the fabric 700, the conveying device 900, and the light source 130. The conveying device 900 is a device that conveys the fabric 700 for inspection (such a device is also called a fabric inspection machine). The conveying device 900 includes multiple rollers (including two rollers 910 and 920) to convey the fabric 700, and a conveying motor (not shown) that drives one or more rollers. The partial conveying path Pth in the figure indicates the portion of the conveying path of the fabric 700 between the rollers 910 and 920 (the partial conveying path Pth is also simply referred to as the partial path Pth). In this embodiment, the fabric 700, which is longer than the partial path Pth, is wound around a roller (not shown). The fabric 700 pulled out from this roller is conveyed from the first roller 910 along the partial path Pth to the second roller 920 and then wound around another roller (not shown). Between the rollers 910 and 920 (i.e., on the partial path Pth), the fabric 700 forms a flat portion, that is, a flat portion 700F. The light source 130 irradiates light onto the flat portion 700F. The forward direction Df in the figure indicates the conveyance direction on the partial path Pth (the forward direction Df is also referred to as the conveyance direction Df). The reverse direction Db indicates the opposite direction of the forward direction Df, i.e., the conveyance direction when the fabric 700 is rewound. The orthogonal direction Dt indicates a direction parallel to the flat portion 700F and perpendicular to the partial path Pth.
[0020] The first end 700e1 and the second end 700e2 in the drawing are ends of the fabric 700 perpendicular to the partial path Pth. The lines indicating the ends 700e1 and 700e2 are roughly parallel to the partial path Pth. However, the fabric 700 is soft and easily deformed. The fabric 700 can be transported with the lines indicating the ends 700e1 and 700e2 inclined relative to the partial path Pth.
[0021] Two positions Pr and Pv are set on the partial path Pth. The first position Pr is the position where the digital cameras 111-114 read. In the figure, the reading area Ar, which is the area read by the digital cameras 111-114, is hatched. The reading area Ar is a rectangular area having two sides Ar1 and Ar2 parallel to the partial path Pth and two sides Ar3 and Ar4 perpendicular to the partial path Pth. The range PRr of the partial path Pth from the third side Ar3 to the fourth side Ar4 is the range read by the digital cameras 111-114 (the range PRr is referred to as the reading range PRr). The first position Pr is located at the center of the reading range PRr. The reading area Ar includes the entire portion of the fabric 700 within the reading range PRr. That is, the first side Ar1 and the second side Ar2 are located outside the fabric 700.
[0022] In the figure, partial areas R11-R14 indicate areas read by the digital cameras 111-114, respectively. In this embodiment, the digital cameras 111-114 (and therefore the partial areas R11-R14) are arranged side by side in the orthogonal direction Dt. The entire reading area Ar is represented by the entire partial areas R11-R14.
[0023] The second position Pv is a position for visual inspection. The second position Pv is located at a position that allows easy observation by the worker. In this embodiment, the second position Pv is located downstream of the first position Pr (i.e., further forward in the forward direction Df than the first position Pr). Note that in this embodiment, the worker can visually observe the fabric 700 not only at the second position Pv but also over the entire range from the first position Pr to the second position Pv.
[0024] Area Av in the figure is an area located at the second position Pv and has the same shape as the reading area Ar. In this embodiment, transport of the fabric 700 and reading of the reading area Ar are repeated. Reading of the reading area Ar is performed every certain transport distance in the forward direction Df so that no gaps occur between the multiple portions of the fabric 700 being read. Area Av indicates an area that was read h times (h is an integer greater than or equal to 1) before the reading area Ar. In this embodiment, h = 3. That is, the portion of the fabric 700 from the reading area Ar to area Av is read in four readings. The worker can easily observe the portion of the fabric 700 that corresponds to area Av (area Av is referred to as the visual area Av).
[0025] The transport device 900 includes a control panel 980 and a control device 990. The control panel 980 includes four operation units 981-984. The operation units 981-984 are devices configured to receive operations from an operator, such as buttons, push switches, foot switches, and touch panels. Hereinafter, each of the operation units 981-984 will be referred to as a push switch. The control device 990 is an electrical circuit configured to control the transport motor in response to operations on the control panel 980. The control device 990 includes, for example, wiring connecting the operation units 981-984 to the transport motor and a power source (not shown). In this embodiment, the control device 990 transports in the forward direction Df when the first operation unit 981 is pressed, and transports in the reverse direction Db when the second operation unit 982 is pressed. When the operation units 981 and 982 are not pressed, the control device 990 stops transport. Furthermore, the control device 990 starts transport in the forward direction Df in response to pressing of the third operation unit 983. After this, the control device 990 continues transport in the forward direction Df until the fourth operation unit 984 is pressed, regardless of the state of the third operation unit 983. Transport by operating the third operation unit 983 is also called automatic transport. The control device 990 may be configured using a computer or dedicated hardware (such as an Application Specific Integrated Circuit (ASIC)).
[0026] The conveying device 900 is connected to an encoder 120 that detects the direction and amount of position change due to conveyance. In this embodiment, the encoder 120 is connected to a roller (e.g., the first roller 910). The encoder 120 may have various configurations for detecting the direction and amount of position change due to conveyance. For example, the encoder 120 may be an incremental encoder. An incremental encoder alternately outputs A pulses and B pulses in response to position changes. The number of output pulses indicates the amount of movement. The phase difference (positive or negative) between the A pulse and the B pulse indicates the direction of movement. The data processing device 200 ( FIG. 1 ) can calculate the current conveyance position of the fabric 700 conveyed by the conveying device 900 (i.e., the relative position of the fabric 700 with respect to the conveying device 900) by counting the number of pulses output from the encoder 120 according to the phase difference (i.e., direction). Note that a counter that counts the number of pulses according to the direction may be connected to the encoder 120. The data processing device 200 may use the information from the counter to obtain the current relative position of the fabric 700 .
[0027] A2. Inspection Process: For inspection, the fabric 700 ( FIG. 2 ) is attached to the conveying device 900. In this embodiment, an operator attaches the fabric 700 to the conveying device 900. Alternatively, a machine (e.g., a robot arm) may attach the fabric 700 to the conveying device 900. After the fabric 700 is attached, 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. In this embodiment, the processor 210 performs the processes of the modules 231, 232, and 233 in parallel or concurrent processing. The processor 210 uses the storage device 215 (e.g., the volatile storage device 220) to share various information (e.g., the inspection mode, the current relative position described below, etc.) between the processes of the modules 231, 232, and 233. The following describes the processing of each of the modules 231, 232, and 233. The start instruction may be input to the data processing device 200 via the communication interface 270 by a device other than the data processing device 200.
[0028] A2-1. Reading Process: Fig. 3 is a flowchart showing an example of the reading process executed by the reading module 231. In S105, the processor 210 initializes flag data D1. Fig. 4 is a diagram showing an example of the flag data D1. The flag data D1 indicates the correspondence between the reading relative position Ps and the read flag F1.
[0029] The reading relative position Ps indicates the relative position of the fabric 700 to be read by the digital cameras 111-114 (FIG. 2). The relative position of the fabric 700 is the position of the fabric 700 relative to the conveying device 900, which changes as the fabric 700 is conveyed. In this embodiment, the relative position of the fabric 700 is represented by a count value, which is the number of pulses obtained from the encoder 120. The count value is calculated taking into account the conveyance direction. Here, the count value increases with conveyance in the forward direction Df and decreases with conveyance in the reverse direction Db. The relative position of the fabric 700 is a position on the fabric 700 and can be used as an index value of a position indicating the portion located at the first position Pr (FIG. 2). The relative position of the fabric 700 corresponds to a position on the fabric 700 in a direction parallel to the forward direction Df.
[0030] The multiple reading relative positions Ps are arranged in advance at regular intervals (here, at intervals of 100). As will be described later, when the current relative position calculated using the encoder 120 is the reading relative position Ps, the portion of the fabric 700 located at the first position Pr (here, the portion included in the reading area Ar (FIG. 2)) is read. The interval between the reading relative positions Ps may be set to a value (referred to as the reading width) corresponding to the width Wr of the reading area Ar in the forward direction Df. This reduces the possibility of gaps occurring between the multiple reading portions read at the multiple reading relative positions Ps. Furthermore, the interval between the reading relative positions Ps may be set to a value smaller than the reading width. In this case, two adjacent reading portions include a common portion.
[0031] The read flag F1 indicates the reading status of the fabric 700. A read flag F1 of YES indicates that the fabric 700 has been read at the corresponding relative reading position Ps. A read flag F1 of NO indicates that the fabric 700 has not been read at the corresponding relative reading position Ps.
[0032] In S105, the processor 210 sets the read flag F1 of all read relative positions Ps to NO. The processor 210 may further initialize the current relative position to a predetermined value (e.g., zero). Note that the relationship between the relative position of zero and the position on the fabric 700 may be determined by various other methods. Also, the relationship between the amount of change in the count value and the amount of change in the actual position may be various. For example, a change of 100 in the count value may indicate a length of 5 cm or more and 50 cm or less.
[0033] In S110, the processor 210 acquires the current relative position. In this embodiment, the processor 210 calculates the current relative position by measuring pulses from the encoder 120.
[0034] In S120, the processor 210 determines whether the current relative position is the reading relative position Ps. If the current relative position is different from any of the multiple reading relative positions Ps (S120: No), the processor 210 proceeds to S110. The processor 210 repeats S110 and S120 until the current relative position becomes the same as any of the reading relative positions Ps.
[0035] If the current relative position is the same as any one of the plurality of read relative positions Ps (S120: Yes), in S130, the processor 210 determines whether the fabric 700 has not been read at the current relative position. The processor 210 determines that the fabric 700 has not been read if the read flag F1 associated with the current relative position by the flag data D1 (FIG. 4) is NO.
[0036] If the fabric 700 has not been read (S130: Yes), in S140, the fabric 700 is photographed by the digital cameras 111-114. The processor 210 supplies a reading instruction to each of the digital cameras 111-114. The digital cameras 111-114 read the fabric 700 in response to the reading instruction. The processor 210 acquires read image data representing the read image from each of the digital cameras 111-114.
[0037] 5(A)-5(F) are diagrams showing examples of images to be processed. FIG. 5(A) shows examples of scanned images IMr1-IMr4 obtained from digital cameras 111-114 (FIG. 2), respectively. Each of scanned images IMr1-IMr4 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. The second direction Dy indicates a direction roughly parallel to the partial path Pth (FIG. 2). The data for each of scanned images IMr1-IMr4 is bitmap data representing the color values of a plurality of pixels arranged in a matrix along the first direction Dx and the second direction Dy. The color values are represented, for example, by the respective gradation values of red (R), green (G), and blue (B) (for example, values greater than or equal to zero and less than or equal to 255).
[0038] As described in FIG. 2, the partial regions R11-R14 corresponding to the scanned images IMr1-IMr4 (FIG. 5A) are arranged side by side in the orthogonal direction Dt. The first scanned image IMr1 represents a portion of the fabric 700 including the first end 700e1 and the first selvedge 700L, as well as the background BG. In this embodiment, the fabric 700 has selvedges 700L and 700R. The selvedge of the fabric is the end of the fabric in the width direction (the direction perpendicular to the partial path Pth in FIG. 2). The selvedge may have a different configuration from the interior of the fabric. For example, to reduce the possibility of fraying of the fabric, the thread density at the selvedge may be increased (e.g., the selvedge may be formed using additional thread). The second scanned image IMr2 and the third scanned image IMr3 represent the portions of the fabric 700 that are inside the selvedges 700L and 700R, respectively. The fourth scanned image IMr4 represents a portion of the fabric 700 including the second end 700e2 and the second selvage 700R, and the background BG. The entire scanned images IMr1-IMr4 represent the entire scanning area Ar. Although not shown, the background BG may represent various objects located outside the fabric 700, such as a portion of the conveying device 900.
[0039] In the example of FIG. 5A , the portion of the fabric 700 represented by the third scanned image IMr3 has a linear defect FD. The linear defect can be formed due to various causes. For example, a defect in the thread forming the fabric 700 can cause the linear defect. Furthermore, the linear defect (e.g., a scratch or a linear drawing) can be formed due to contact between the fabric 700 and another member (e.g., a device for transporting the fabric 700, a writing implement, etc.).
[0040] In S150 (FIG. 3), the processor 210 sets the read flag F1 associated with the current relative position of the flag data D1 (FIG. 4) to YES.
[0041] In S160, the processor 210 associates the scanned image data (in this embodiment, four pieces of image data for four scanned images) obtained from the digital cameras 111-114 (FIG. 2) with data on the current relative position, and transmits the associated data to the inspection module 232. Any method may be used to transmit the data to the inspection module 232. In this embodiment, the non-volatile storage device 230 (FIG. 1) is provided with a first buffer area BF1 for temporarily storing data destined for the inspection module 232. The processor 210 stores the data destined for the inspection module 232 in the first buffer area BF1. As will be described later, the processor 210, which performs processing in accordance with the inspection module 232, obtains the data from the first buffer area BF1. After S160, the processor 210 proceeds to S110.
[0042] If the fabric 700 has been read at the current relative position (S130: No), the processor 210 proceeds to S110.
[0043] The processor 210 repeats the above process in accordance with the reading module 231. The conveying device 900 ( FIG. 2 ) conveys the fabric 700 in response to operation of the control panel 980. In this embodiment, the operator causes the conveying device 900 to continue conveying the fabric 700 in the forward direction Df for automatic inspection by the data processing device 200. Each time the current relative position reaches a reading relative position Ps associated with a read-completed flag F1 of NO, the processor 210 causes the digital cameras 111-114 to photograph the fabric 700 and transmits the read image data to the inspection module 232. Instead of automatic inspection, the operator can also visually inspect the fabric 700. The operator may manually convey the fabric 700 in the forward direction Df or the reverse direction Db. When conveying the fabric 700 in the reverse direction Db, the current relative position may reach a reading relative position Ps associated with a read-completed flag F1 of YES. In this case, photographing the fabric 700 is omitted (S130: No).
[0044] A2-2. Inspection Process and UI Control Process: FIGS. 6 and 7 are flowcharts illustrating an example of the inspection process executed in accordance with the inspection module 232. In S210, the processor 210 initializes parameters. In this embodiment, the processor 210 sets the window size N to 1, sets the inspection mode to the second mode, and initializes the result data D2 (e.g., data representing the contents of the result data D2 is deleted). The window indicates the range of the relative position of the image to be displayed. The processor 210 generates the image to be displayed by combining multiple scanned images obtained by N scans (FIG. 3: S140). The window size N is represented by the number of scans (details will be described later). The inspection mode is selected from a first mode and a second mode. The first mode is a mode in which the inspection results from the data processing device 200 are not used. In this embodiment, in the first mode, the operator visually inspects the fabric 700. The second mode is a mode in which the inspection results from the data processing device 200 are used. Details of each mode will be described later. The result data D2 will be described in detail later.
[0045] In S215, the processor 210 receives the data on the scanned images and their relative positions (S160 in FIG. 3) sent by the scanning module 231. In this embodiment, the processor 210 monitors the first buffer area BF1 (FIG. 1). If the data on the four scanned images IMr1-IMr4 (FIG. 5A) and their relative positions are stored in the first buffer area BF1 in S160 in FIG. 3, the processor 210 acquires the data from the first buffer area BF1. The processor 210 executes the process following S215 in response to acquisition of new data. S215 and the process following S215 are executed for each relative position. For example, if transport in the forward direction Df continues for automatic inspection, the provision of new data for a new relative position is repeated. The processor 210 executes the process following S215 each time new data for a new relative position is acquired.
[0046] In S220, the processor 210 generates data for one scanned image by combining the four scanned images IMr1-IMr4. Figure 5(B) shows an example of an image generated from the scanned images IMr1-IMr4. Image IMrc is a band-shaped image representing the scanned area Ar (Figure 2). Hereinafter, image IMrc will be referred to as band texture image IMrc.
[0047] Various methods may be used to generate the band texture image IMrc. For example, the partial regions R11-R14 (FIG. 2) may be arranged side by side in the orthogonal direction Dt within the reading area Ar so that they do not overlap with each other and have no gaps. In this case, the processor 210 may generate data for the band texture image IMrc by connecting the respective edges of the read images IMr1-IMr4 (FIG. 5A) arranged in the first direction Dx. Alternatively, the partial regions R11-R14 may be arranged so that two adjacent partial regions partially overlap. In this case, the processor 210 may generate data for the band texture image IMrc by combining the read images IMr1-IMr4 in the same arrangement as the partial regions R11-R14. The corresponding portion of one of the read images may be used as the image for the overlapping portion of the two read images. In either case, the arrangement of the partial regions R11-R14 can be adjusted by adjusting the arrangement of the digital cameras 111-114.
[0048] The processor 210 stores the data of the generated band fabric image IMrc in the storage device 215 (e.g., the non-volatile storage device 230). In this embodiment, the data of the band fabric image IMrc is registered in the result data D2. FIG. 8 is a diagram showing an example of the result data D2. In this embodiment, the result data D2 represents the correspondence between the reading relative position Ps, the band fabric image IMrc, the band mask image IMmc, the box information BB, the width Wf, the inspection mode MD, and the defect flag F2. In S220, the processor 210 adds the data of the band fabric image IMrc to the result data D2 in association with the reading relative position Ps indicating the relative position acquired in S215. Other information in the result data D2 will be described later.
[0049] In S225 (FIG. 6), the processor 210 determines whether the inspection mode is the second mode for automatic inspection. If the inspection mode is the second mode (S225: Yes), in S235, the processor 210 detects defect portions representing defects (e.g., holes, linear defects FD (FIG. 5(B)), etc.) and selvedge portions representing the selvedge of the fabric 700 from the band fabric image IMrc. Various methods may be used to detect these portions. In this embodiment, the processor 210 detects the defect portions and selvedge portions using a trained object detection model 310. The object detection model 310 may be various models capable of detecting defect portions and selvedge portions. In this embodiment, the object detection model 310 is a model called "RTMDet" disclosed in the following paper: Chengqi Lyu, Wenwei Zhang, Haian Huang, Yue Zhou, Yudong Wang, Yanyi Liu, Shilong Zhang and Kai Chen. "Rtmdet: An Empirical Study of Designing Real-Time Object Detectors", arXiv.2212.07784, December 16, 2022, https: / / doi.org / 10.48550 / arXiv.2212.07784.
[0050] RTMDet is a model that detects the bounding box and category (i.e., object type) of an object and performs region segmentation, known as instance segmentation. In this embodiment, the object detection model 310 is pre-trained to detect the bounding boxes, types, and regions of multiple types of detection objects, including defects representing holes, linear defects, and selvedge features of the fabric 700. A bounding box is detected as a rectangle consisting of two sides parallel to the first direction Dx and two sides parallel to the second direction Dy. The bounding box is associated with the type of detection object. Region segmentation detects the region of each detection object (called a mask). The mask is associated with an identifier of the detection object. This region segmentation determines, for each pixel, which mask the pixel falls within. The object detection model 310 may be trained using various methods, such as the training method described in the above-mentioned paper on RTMDet. The defect bounding box and mask are examples of defect portions detected using an image of the fabric 700. The defect portion is a portion of the fabric 700 that represents a defect.
[0051] In this embodiment, the specified size, which is the size of an image that can be input to the object detection model 310, is smaller than the size of the band texture image IMrc ( FIG. 5B ). Therefore, the processor 210 performs object detection using the object detection model 310 on each of multiple partial images that represent different parts of the band texture image IMrc. Each partial image has a specified size. The entire band texture image IMrc is represented by the multiple partial images.
[0052] FIG. 5C is a diagram showing an example of multiple partial images. In this embodiment, multiple partial images IMa1-IMak are extracted from the band fabric image IMrc (FIG. 5B). The arrangement of the multiple partial images IMa1-IMak on the band fabric image IMrc is predetermined. Partial image IMa2 represents the first ear 700L, partial image IMai represents the defect FD, and partial image IMak represents the second ear 700R.
[0053] FIG. 5B shows the range of partial images IMa1-IMak on the band texture image IMrc. In this embodiment, multiple partial images IMa1-IMak are aligned in the first direction Dx on the band texture image IMrc. The ranges in the first direction Dx differ among partial images IMa1-IMak. The size of partial images IMa1-IMak in the second direction Dy is the same as the size of band texture image IMrc in the second direction Dy. In this embodiment, two adjacent partial images partially overlap. This is to reduce the possibility of missing a defect when it is located at the boundary between two adjacent partial images. Note that the size of a partial image in the second direction Dy may be smaller than the size of band texture image IMrc in the second direction Dy. In this case, multiple partial images aligned along the first direction Dx and the second direction Dy may be used.
[0054] FIG. 5(D) is a diagram showing examples of masks and bounding boxes detected from the partial images IMa1-IMak (FIG. 5(C)). Partial mask images IMm1-IMmk represent mask images corresponding to the partial images IMa1-IMak, respectively. The mask ME1 and bounding box BBE1 on the partial mask image IMm2 indicate the first ear 700L. The mask MD1 and bounding box BBD1 on the partial mask image IMmi indicate the defect FD. The mask ME2 and bounding box BBE2 on the partial mask image IMmk indicate the second ear 700R.
[0055] In S240 (FIG. 6), the processor 210 generates data for a band mask image by combining multiple partial mask images. FIG. 5(E) shows an example of a band mask image generated from partial mask images IMm1-IMmk (FIG. 5(D)). The processor 210 generates data for a band mask image IMmc by combining partial mask images IMm1-IMmk in the same arrangement as the arrangement of partial images IMa1-IMak on the band texture image IMrc (FIG. 5(B)). A mask image represented by the logical sum of the two partial mask images may be used as the mask image for the overlapping portion of the two partial mask images. The band mask image IMmc represents a mask image corresponding to the band texture image IMrc (FIG. 5(B)).
[0056] In S245 (FIG. 6), the processor 210 calculates the width of the fabric 700. FIG. 5(F) is a diagram showing an example of the width of the fabric 700. The diagram shows a band mask image IMmc. In this embodiment, the distance in the first direction Dx between both selvages 700L and 700R is used as the width Wf. The processor 210 counts the number of pixels between the masks ME1 and ME2 representing the selvages 700L and 700R, and calculates the width using the number of pixels and the pixel density (unit: pixels / inch, for example) of the band mask image IMmc. In this embodiment, the pixel density is predetermined.
[0057] Note that because the fabric 700 is easily deformed, the distance between the selvedge 700L, 700R may vary depending on the position in the second direction Dy. The processor 210 may use the distance at a predetermined position in the second direction Dy within the band mask image IMmc (e.g., the position of the center of the band mask image IMmc in the second direction Dy). Alternatively, the processor 210 may employ various summary statistics (e.g., the mean, median, maximum, etc.) of multiple distances at multiple positions in the second direction Dy.
[0058] In S250 (FIG. 6), the processor 210 associates the detection information data acquired in S235-S245 with the reading relative position Ps indicating the relative position acquired in S215 and adds it to the result data D2 (FIG. 8). The detection information includes a band mask image IMmc (S240), box information BB (S235), width Wf (S245), inspection mode MD (here, the second mode), and defect flag F2. The box information BB indicates a bounding box and the type of object. The defect flag F2 indicates whether the portion of the fabric 700 represented by the band fabric image IMrc has a defect. In this embodiment, if one or both of the following defect conditions C1 and C2 are met, the processor 210 sets the defect flag F2 to YES. If neither of the defect conditions C1 and C2 is met, the processor 210 sets the defect flag F2 to NO. (C1) One or more defects are detected in the process of S235. (C2) The width Wf is outside the allowable width range.
[0059] If the flat portion 700F of the fabric 700 (FIG. 2) has uneven portions such as wrinkles or creases, a normal portion may be erroneously detected as a defective portion in S235 (FIG. 6). Furthermore, defects may not be detected. The allowable width range indicates the appropriate range of width Wf of the fabric 700 without uneven portions. If the width Wf is outside the allowable width range, the fabric 700 is likely to have uneven portions, and as a result, the object detection error in S235 will be large. Therefore, in this embodiment, even if the first defect condition C1 is not satisfied, if the second defect condition C2 is satisfied, the processor 210 sets the defect flag F2 to YES.
[0060] In S255 (FIG. 6), the processor 210 generates data for a combined texture image to be displayed by combining the N band texture images included in the window. The total number N of combined band texture images is determined by the window size N described in S210 (FIG. 6). The window size N is initialized to 1 in S210. As described below, the window size N increases by 1 each time the reading of the texture 700 (FIG. 3: S140) is repeated. In this embodiment, the window size N can increase up to a standard size Nstd (FIG. 7(A): S270) described below. The standard size Nstd is the same as the number of readings required to read the range from the reading area Ar (FIG. 2) to the visual area Av (in this embodiment, Nstd = 4). The window represents the current band texture image, which is the band texture image corresponding to the current relative position, or N band texture images composed of the current band texture image and the band texture image preceding it (here, the most recent N band texture images).
[0061] 9A is a diagram showing an example of the shape of the fabric 700 relative to the reading area Ar (FIG. 2). As shown in the figure, the fabric 700 can be transported in a state where it is oblique to the reading area Ar.
[0062] 9B is a diagram showing an example of a combined texture image. The combined texture image IMrNa is an image obtained by arranging four band texture images IMrc1-IMrc4 in a direction parallel to the second direction Dy and combining the edges of adjacent band texture images. The positions of the band texture images IMrc1-IMrc4 in the first direction Dx are not adjusted.
[0063] If the fabric 700 is skewed within each band fabric image IMrc1-IMrc4, the position of the fabric 700 in the first direction Dx may be shifted at the joint between the band fabric images IMrc1-IMrc4. In other words, the fabric 700 may be discontinuous. For example, the first image edge ie1 on the side opposite the second direction Dy (also referred to as the -Dy direction) of the first band fabric image IMrc1 is connected to the second image edge ie2 on the second direction Dy (also referred to as the +Dy direction) of the second band fabric image IMrc2 (image edges ie1 and ie2 are edges parallel to the first direction Dx). The black dots in the figure indicate the edges of the fabric 700 at the edges of the band fabric images IMrc1-IMrc4 (referred to as fabric edges fe). For example, the first fabric edge fe1 is the edge of the fabric 700 on the first image edge ie1. The second fabric edge fe2 is the edge of the fabric 700 on the second image edge ie2. These fabric edges fe1 and fe2 indicate the same part of the fabric 700. However, on the joined image edges ie1 and ie2, the fabric edges fe1 and fe2 are located at different positions in the first direction Dx. The same is true for the other fabric edges fe.
[0064] Although not shown, if a single linear defect intersects with the connection portion of two adjacent band fabric images, the defect may be displayed as two separate defects in the combined fabric image IMrNa. Such an image may lead to an incorrect interpretation of the inspection results (e.g., an incorrect total number of defects). Therefore, in this embodiment, the processor 210 combines the N band fabric images so as to minimize the positional deviation of the fabric 700 between the N band fabric images.
[0065] 9(C) to 9(F) and 10(A) to 10(F) are diagrams showing examples of joining processes. These diagrams show four types of joining processes. The processor 210 executes one joining process that is pre-selected from these joining processes. Each joining process will be explained below.
[0066] FIG. 9C is a flowchart of the first type combining process. In S410b, the processor 210 detects the edge of the fabric 700 at the edge of the band fabric image. The fabric edge fe described in FIG. 9B is detected as the edge of the fabric 700. Any method may be used to detect the fabric edge fe. For example, the processor 210 separates the band fabric image into a fabric 700 region and a background BG region using binarization (e.g., Otsu binarization). The processor 210 detects the boundary point between the fabric 700 and the background BG at the edge of the band fabric image as the fabric edge fe. In S420b, the processor 210 combines N band fabric images in an arrangement that connects the fabric edges fe of two adjacent band fabric images. In this embodiment, the processor 210 determines the position of each of the N band fabric images in the first direction Dx so that the fabric edges fe of two adjacent band fabric images are connected. 9(D) shows an example of a combined fabric image. On the combined fabric image IMrNb, the fabric edges fe of two adjacent band fabric images are connected. For example, the first fabric edge fe1 of the first band fabric image IMrc1 and the second fabric edge fe2 of the second band fabric image IMrc2 are connected. In this way, the fabric 700 is continuous on the combined fabric image IMrNb.
[0067] FIG. 9(E) is a flowchart of the second type combining process. In S410c, the processor 210 corrects the skew of each band fabric image. Any method may be used for the skew correction. For example, the processor 210 detects four fabric edges fe, which represent the four corners of the fabric 700, from the band fabric image using a process similar to that of S410b (FIG. 9(C)). The processor 210 corrects the skew of the band fabric image (e.g., using affine transformation) so that the four fabric edges fe form a rectangle. Images IMrcc1-IMrcc4 in FIG. 9(F) represent corrected band fabric images obtained from the band fabric images IMrcc1-IMrcc4, respectively. The skew of the fabric 700 has been corrected in each of the images IMrcc1-IMrcc4. In S420c, the processor 210 combines N corrected band fabric images in an arrangement that connects the fabric edges fe of two adjacent corrected band fabric images. The processing of S420c is performed in the same manner as the processing of S420b (FIG. 9C). FIG. 9F shows an example of a combined fabric image. On the combined fabric image IMrNc, the fabric edges fe of two adjacent corrected band fabric images are connected. On the combined fabric image IMrNc, the fabric 700 is continuous.
[0068] FIG. 10A is a flowchart of the third type combining process. In S410d, the processor 210 calculates the center of the fabric 700 at the edge of the band fabric image IMrc. FIG. 10B is a diagram showing band fabric images IMrc1-IMrc4 and fabric center fc. The first fabric center fc1 is the center of the fabric 700 at the image edge ie1 of the band fabric image IMrc1. The midpoint of the line segment connecting the two fabric edges fe1 on the image edge ie1 is adopted as the first fabric center fc1. The other fabric centers fc are similarly set to the midpoints between the two fabric edges on the image edges. In S420d (FIG. 10A), the processor 210 combines N band fabric images in an arrangement that connects the fabric centers fc of two adjacent band fabric images. In this embodiment, the processor 210 determines the position of each of the N band fabric images in the first direction Dx so that the fabric centers fc of two adjacent band fabric images are connected. FIG. 10C shows an example of a combined fabric image. On the combined fabric image IMrNd, the fabric centers fc of two adjacent band fabric images are connected. For example, the first fabric center fc1 of the first band fabric image IMrc1 and the second fabric center fc2 of the second band fabric image IMrc2 are connected. On the combined fabric image IMrNd, the fabric 700 is continuous.
[0069] FIG. 10(D) is a flowchart of the fourth-type combining process. The fourth-type combining process combines N band fabric images, assuming that two adjacent band fabric images contain a common image portion. FIG. 10(E) is a diagram showing an example of band fabric images IMrc1-IMrc4. The hatched common portion pc is the portion of the fabric 700 that is common to two adjacent band fabric images. Each of the band fabric images IMrc1-IMrc4 has a common portion pc. Such band fabric images IMrc1-IMrc4 are generated by reducing the spacing between multiple reading relative positions Ps (FIG. 4) to a value smaller than the value corresponding to the width Wr of the reading area Ar (FIG. 2) in the forward direction Df. In S410e (FIG. 10(D)), the processor 210 calculates an arrangement in which the common portions pc of the two adjacent band fabric images overlap. In this embodiment, the length of the common portion pc in the second direction Dy, i.e., the length of the overlapping portion of two adjacent band texture images in the second direction Dy, is predetermined. The processor 210 determines the position of each of the N band texture images in the first direction Dx so as to minimize the positional misalignment between the two common portions pc of the two adjacent band texture images. Various methods similar to template matching can be used to determine the position that minimizes the positional misalignment between the two common portions pc. For example, the position that minimizes the sum of the color value differences (e.g., brightness value differences) at the same position between the two common portions pc may be used. The processor 210 may also determine the position of each of the N band texture images in the first direction Dx and the second direction Dy so as to minimize the positional misalignment between the two common portions pc in the first direction Dx and the second direction Dy. In S420e, the processor 210 combines the N band texture images in the arrangement calculated in S410e. The corresponding portion of one of the band texture images may be used as the image of the overlapping portion of the two band texture images. FIG. 10(F) shows an example of a combined texture image. In the combined texture image IMrNe, two common portions pc of two adjacent band texture images overlap at the same position. For example, the first common portion pc1 of the first band texture image IMrc1 and the second common portion pc2 of the second band texture image IMrc2 overlap at the same position. In the combined texture image IMrNe, the texture 700 is continuous.
[0070] After generating the combined texture image (FIG. 6: S255), in S260, the processor 210 determines whether the oldest band texture image in the window has a defect. FIG. 11A shows an example of changes in the window size N and window WN. The processor 210 repeatedly executes the process SR (referred to as the acquisition and inspection process SR) starting from S215 in FIGS. 6 and 7A-7C. The window size N and window WN are updated each time the acquisition and inspection process SR is executed (details will be described later).
[0071] The process number NP (FIG. 11A) is a number indicating the order of the process (here, the acquisition inspection process SR) starting from S215. The numbers at the end of the symbols of the windows WN1-WN6 indicate the corresponding process number NP. As shown in the figure, the window size N increases by 1 each time the acquisition inspection process SR is executed. In this embodiment, the window size N can increase up to the standard size Nstd (in this embodiment, Nstd=4). As will be described later, if the fabric 700 has a defect, the conveyance stops and the operator investigates the defect. Thereafter, the window size N is reset to 1.
[0072] The figure shows an example of the correspondence between band fabric images IMrc, relative read positions Ps, and defect flags F2. The numbers at the end of the reference numerals of band fabric images IMrc1-IMrc6 indicate the process number NP at which the band fabric images IMrc1-IMrc6 are generated (S220). For example, the second band fabric image IMrc2 is generated in the second S220 (NP=2) using the read image obtained at the relative read position Ps of 200.
[0073] Each of the windows WN1-WN6 indicates the range of the relative reading position Ps (i.e., the range of the band texture image IMrc). The symbol Pr attached near each of the windows WN1-WN6 indicates the relative reading position Ps corresponding to the first position Pr (FIG. 2). For example, the first position Pr of the third window WN3 indicates the relative reading position Ps of 300. In the third step S220 (NP=3), a third band texture image IMrc3 is generated using the read image obtained at the relative reading position Ps of 300.
[0074] FIG. 11B is a diagram showing an example of changes in the combined texture image generated in S255 (FIG. 6). The diagram shows combined texture images IMrN1-IMrN6 corresponding to processing numbers NP ranging from 1 to 6. In this example, as the processing number NP increases from 1 to 4, the window size N increases from 1 to 4. The combined texture images IMrN1-IMrN4 are generated by sequentially combining the newly generated band texture images IMrc1-IMrc4. As the processing number NP increases from 4 to 5, the window size N remains at 4. In this case, the fifth combined texture image IMrN5 is generated by deleting the oldest first band texture image IMrc1 from the fourth combined texture image IMrN4 and combining it with the newly generated fifth band texture image IMrc5. In this way, the combined texture image, i.e., the window WN, contains the latest N band texture images IMrc.
[0075] In S260 (FIG. 6), the processor 210 determines whether the oldest band fabric image IMrc in the window WN has a defect. If the window size N is the same as the standard size Nstd, the oldest band fabric image IMrc is the Nstd-th band fabric image IMrc counted from the most recent band fabric image IMrc corresponding to the first position Pr. That is, the portion of the fabric 700 represented by the oldest band fabric image IMrc is located at the second position Pv (FIG. 2). Thus, when N=Nstd, the processor 210 determines in S260 whether the portion of the fabric 700 located at the second position Pv has a defect. The processor 210 makes the determination in S260 by referencing the defect flag F2 in the result data D2 (FIG. 8).
[0076] If the oldest band texture image IMrc in the window WN does not have any defects (S260: No), in S265 (FIG. 7A), the processor 210 transmits data of the combined texture image to the UI module 233. The processing of S265 is performed via the storage device 215, similar to the processing of S160 (FIG. 3). In this embodiment, the non-volatile storage device 230 (FIG. 1) is provided with a second buffer area BF2 for temporarily storing data destined for the UI module 233. The processor 210 stores the data destined for the UI module 233 in the second buffer area BF2. As will be described later, the processor 210, which performs processing in accordance with the UI module 233, obtains data from the second buffer area BF2.
[0077] In S270, the processor 210 updates the window size N. The window size N is set to the smaller of the standard size Nstd and the current window size N plus 1. After S270, the processor 210 proceeds to S215 (FIG. 6). If the oldest band texture image IMrc in the window WN does not have a defect (FIG. 6: S260: No), the processes of S215-S270 (FIGS. 6 and 7A) are repeated. The window size N increases by 1 each time (S270). After the window size N increases to the standard size Nstd, the window size N is maintained at the standard size Nstd (S270). In the example of FIGS. 11A and 11B, the result of each S260 repeated until the process number NP changes from 1 to 5 is No. The window size N increases from 1 to 4, and then the window size N is maintained at 4.
[0078] FIG. 12 is a flowchart illustrating an example of UI control processing executed by the UI module 233. In S810, the processor 210 determines the type of event when an event occurs. In this embodiment, the processor 210 processes two events: reception of a combined texture image including the oldest defect-free band texture image (referred to as a normal reception event) and reception of a combined texture image including the oldest defect-containing band texture image (referred to as a defective reception event). The processor 210 monitors the second buffer area BF2 ( FIG. 1 ). In S265 of FIG. 7 , when data of the combined texture image is stored in the second buffer area BF2, the processor 210 acquires the data from the second buffer area BF2. Because the acquired data does not include data of defect information, which will be described later, the processor 210 determines that a normal reception event has occurred.
[0079] If a normal reception event occurs, in S825, the processor 210 displays the combined texture image on the display unit 240 (FIG. 1). FIGS. 13(A)-13(C) are diagrams showing examples of screens displayed on the display unit 240. FIG. 13(A) shows an example of a screen displayed in S825. Screen DP1 is a screen displayed when the inspection mode is the second mode for automatic inspection. Screen DP1 shows an image area AWs representing the combined texture image IMrNs and a button Bt1 for switching the inspection mode to the first mode. After S825, the processor 210 proceeds to S810.
[0080] If the fabric 700 has a defect, the band fabric image representing the defect becomes the oldest band fabric image in the window through repetition of the acquisition inspection process SR ( FIG. 6 ). For example, in the example of FIG. 11B , the second band fabric image IMrc2 represents defect FD1. When the process number NP becomes 5 through repetition of the acquisition inspection process SR, the second band fabric image IMrc2 becomes the oldest band fabric image in the window. If the oldest band fabric image IMrc in the window WN has a defect ( FIG. 6 : S260: Yes), in S350 ( FIG. 7B ), the processor 210 executes a stop process to stop the conveyance of the fabric 700. In this embodiment, the stop process includes a process of sending a stop instruction to the conveyance device 900. The control device 990 of the conveyance device 900 stops the conveyance of the fabric 700 in accordance with the instruction.
[0081] In S355, processor 210 generates data for a combined mask image by combining the N band mask images included in the window. The N band mask images to be combined correspond to the N band texture images used in S255 (FIG. 6). The arrangement for combining the N band mask images is the same as the arrangement for combining the N band texture images. When skew-corrected band texture images are combined (FIG. 9(F)), processor 210 may perform the same skew correction on the band mask images as on the corresponding band texture images, and combine the skew-corrected band mask images. When two adjacent band mask images overlap, a mask image represented by the logical OR of the two band mask images may be used as the mask image for the overlapping portion.
[0082] In S360, the processor 210 obtains a bounding box for each defect included in the combined mask image by referring to the result data D2 (FIG. 8). The processor 210 obtains the arrangement of each bounding box on the combined mask image according to the arrangement for combining the N band mask images.
[0083] In S370, the processor 210 executes a defect portion merging process, which merges multiple defect portions when multiple portions of one defect on the fabric 700 are detected as multiple defect portions, in order to process the entire multiple defect portions as a single defect portion.
[0084] FIG. 14 is a flowchart illustrating an example of a merging process for defect portions. In S510, the processor 210 acquires an image of the target area. FIGS. 15(A) to 15(D) are diagrams illustrating an example of the merging process. FIG. 15(A) illustrates an example of a target area image. In this embodiment, the processor 210 acquires a 3-row, 3-column partial mask image IMmn-IMmv centered on the target partial mask image IMmr as the target area image IMi. The partial mask image generated in S235 (FIG. 6) may be used as the partial mask image. As described in FIGS. 5(D) and 5(E), the band mask image is represented by a plurality of partial mask images aligned in the first direction Dx. The combined mask image (S355 (FIG. 7(B))) is represented by N band mask images aligned in the second direction Dy. The combined mask image is represented by a plurality of partial mask images aligned along the first direction Dx and the second direction Dy. In S510 (FIG. 14), the processor 210 selects an unprocessed partial mask image as a target partial mask image from the plurality of partial mask images of the combined mask image. The processor 210 selects the target partial mask image and eight partial mask images surrounding the target partial mask image as target range images.
[0085] Note that if the target partial mask image is located at the edge of the combined mask image, one or more of the surrounding eight partial mask images will be located outside the combined mask image. Acquisition of partial mask images from outside the combined mask image is omitted. Furthermore, if a skew-corrected band mask image is used to generate the combined mask image ( FIG. 7B : S355), a similarly skew-corrected partial mask image may be used.
[0086] In S515 ( FIG. 14 ), the processor 210 selects a pair of defect portions of interest. In this embodiment, a pair of bounding boxes is selected as the pair of interest. When the range-of-interest image IMi ( FIG. 15(A) ) includes multiple bounding boxes for multiple defect portions, the processor 210 selects an unprocessed pair as the pair of interest from all pairs of bounding boxes formed by the multiple bounding boxes for the multiple defect portions. Conditions for selecting two bounding boxes as the pair of interest may include that the two bounding boxes represent the same type of defect.
[0087] The target area image IMi in FIG. 15A includes two masks MDa and MDb and two bounding boxes BBa and BBb representing two linear defects FDa and FDb. The first defect FDa and the first bounding box BBa are included in the partial mask image IMmr, and the second defect FDb and the second bounding box BBb are included in the adjacent partial mask image IMmu. It is assumed that defects FDa and FDb represent a single long linear defect extending from the partial mask image IMmr to the partial mask image IMmu. If a single defect is long, the defect will be represented by multiple partial mask images, and therefore multiple portions of the defect may be detected as multiple defect portions. The following description will be given assuming that the bounding boxes BBa and BBb are the target pair. Although not shown, if the total number of bounding boxes included in the interest range image IMi is one or less, the processor 210 cannot select a pair of bounding boxes and proceeds to S575.
[0088] In S530, the processor 210 calculates the distance between the two bounding boxes that form the pair of interest. Fig. 15B is a diagram showing the distance DBb between the bounding boxes BBa and BBb. The shortest distance is used as the distance DBb.
[0089] In S550, the processor 210 determines whether the distance DBb is equal to or less than a first threshold value Th1. The first threshold value Th1 is experimentally determined in advance so that the distance DBb is greater than the first threshold value Th1 when two bounding boxes are associated with two different defects on the fabric 700, respectively.
[0090] If the distance DBb is equal to or less than the first threshold value Th1 (S550: Yes), in S555, the processor 210 calculates the defect extension direction. FIG. 15C is a diagram illustrating an example of the defect extension direction. Various methods may be used to calculate the extension directions DDa and DDb of the defects FDa and FDb. For example, the processor 210 may calculate a regression line using the positions of each of the multiple pixels of the first mask MDa and use the extension direction of the regression line as the extension direction DDa of the first defect FDa. Alternatively, the processor 210 may use the extension direction of the diagonal of the first bounding box BBa as the extension direction DDa of the first defect FDa. The extension direction DDb of the second defect FDb is also determined using the same method. Each of the directions DDa and DDb may be represented by, for example, an angle AGa or AGb relative to a reference direction (for example, the first direction Dx).
[0091] In S560, the processor 210 determines whether the angle Ad between the two directions is equal to or smaller than an angle threshold Adth. The angle Ad is expressed by the absolute value of the difference between the angles AGa and AGb between the two directions DDa and DDb, as shown in FIG. 15C. The angle threshold Adth is experimentally determined in advance so that the angle Ad is greater than the angle threshold Adth when the two defect portions respectively represent two different defects on the fabric 700.
[0092] If the angle Ad is equal to or smaller than the angle threshold Adth (S560: Yes), the processor 210 merges the pair of interest in S565. Fig. 15D is a diagram showing an example of merging the pair of interest. In this embodiment, the processor 210 generates a smallest rectangle that includes the two bounding boxes BBa and BBb as a new bounding box BBab.
[0093] The processor 210 may add a connection mask MDab that connects the two masks MDa and NDb to the mask image (e.g., the combined mask image). The connection mask MDab may be, for example, a line segment that connects the two masks MDa and NDb over the shortest distance. Note that the addition of the connection mask MDab may be omitted.
[0094] In S570, the processor 210 stores data of the merged defective portion in the storage device 215 (e.g., the non-volatile storage device 230). In this embodiment, the processor 210 stores merged data D3 representing information about the merged defective portion (e.g., including the two bounding boxes before merging, the bounding box generated by merging, and information associating them) in the non-volatile storage device 230. The processor 210 then proceeds to S575.
[0095] If the determination result in S550 is No or if the determination result in S560 is No, the processor 210 proceeds to S575.
[0096] In S575, the processor 210 determines whether all pairs have been processed. If unprocessed pairs remain (S575: No), the processor 210 proceeds to S515 to process a new pair of interest. If all pairs have been processed (S575: Yes), the processor 210 proceeds to S580 to determine whether the entire range of the combined mask image has been processed. In this embodiment, if a partial mask image that has not been selected as a partial mask image of interest remains in the combined mask image, the determination result is No. If all partial mask images of the combined mask image have been processed as partial mask images of interest, the determination result is Yes. If the determination result is No, the processor 210 proceeds to S510 to process a new range of interest. If the determination result is Yes, the processor 210 ends the processing of FIG. 14, i.e., S370 (FIG. 7B).
[0097] After two defect portions are merged in S565, the processor 210 selects a pair of interest using the merged defect portion instead of the defect portion before merging in S515. Defect portions at least partially included in the target area image (S510) are used as defect portions forming the target pair. Therefore, three or more defect portions representing a long defect can be merged into a single defect portion. For example, in the example of FIG. 11(B), in the fifth combined texture image IMrN5 associated with NP=5, defect FD1 is represented by three band texture images IMrc2-IMrc4 (i.e., three or more bounding boxes can represent defect FD1). In the merging process of FIG. 14, the processor 210 can merge multiple bounding boxes representing defect FD1 to form a single bounding box BB1.
[0098] Although not shown, one partial mask image (e.g., partial mask image IMmr) may include multiple defect portions. In this embodiment, two defect portions included in one partial mask image may be merged.
[0099] In this manner, processor 210 can merge multiple defect portions representing a single defect into a single defect portion, thereby reducing the likelihood of misinterpretation of inspection results (e.g., an incorrect total number of defects).
[0100] In S375, the processor 210 generates defect information. In this embodiment, the defect information includes the type, bounding box, and length of each defect portion included in the combined mask image. Various methods may be used to calculate the length of the defect portion. For example, the diameter of the smallest circle circumscribing the mask representing the defect may be used as the length of the defect portion. Alternatively, the length of the diagonal of the smallest rectangle circumscribing the mask representing the defect may be used as the length of the defect portion. If multiple defect portions are merged in S370, the defect information includes information on the merged defect portion.
[0101] In S380, the processor 210 transmits processing information data to the UI module 233. The processing information includes a combined texture image, a combined mask image, a bounding box, the width of the texture 700, and defect information. The data transmission method is the same as the transmission method in S265 (FIG. 7A). After S380, the processor 210 proceeds to S215 (FIG. 6).
[0102] If the processing information data including the combined texture image and defect information is stored in the second buffer area BF2 in S380, the processor 210 acquires the processing information data from the second buffer area BF2 in S810 of Fig. 12. Then, the processor 210 determines that a defect reception event has occurred.
[0103] When a defect reception event occurs, in S835, the processor 210 displays processing information including defect information on the display unit 240 ( FIG. 1 ). FIG. 13B shows an example of a screen displayed in S835. Screen DP2 shows an image area AWt representing the combined surface image IMrNt, a progress button Bt21 for advancing the process, a button Bt22 for editing the information representing the defect, and a string TW representing the width Wf. The combined surface image IMrNt shows a linear defect FDp and a hole defect FDq. In addition to the combined surface image IMrNt, the image area AWt shows information about the defect (here, defect information DFDp and DFDq representing defects FDp and FDq). The defect information DFDp and DFDq show the entire bounding box surrounding the defect, a string representing the defect type, and a string representing the defect length. The defect information DFDq indicating the hole defect FDq does not include the display of the defect length.
[0104] The worker can recognize the detected defect by observing the screen DP2. The worker can then visually inspect the fabric 700 ( FIG. 2 ) to check the condition of the defect. In the example of FIG. 11(B) , the fifth combined fabric image IMrN5, which corresponds to NP=5, is displayed in the image area AWt. As shown, a portion of the defect FD1 is included in the second band fabric image IMrc2 at the second position Pv. That is, a portion of the defect FD1 is located in the visual inspection area Av ( FIG. 2 ). Therefore, the worker can easily inspect the condition of the defect FD1.
[0105] If an error in the detection results is found as a result of the defect investigation, the worker can edit the detection results by operating button Bt22 on screen DP2 (FIG. 13(B)). For example, the processor 210 edits the result data D2 and merged data D3 according to instructions input to the operation unit 250. When the defect investigation is complete, the worker can input instructions to proceed with the process by operating progress button Bt21.
[0106] After S835 (FIG. 12), the processor 210 waits for receipt of a proceed instruction in S840. If a proceed instruction is input (S840: Yes), the processor 210 sets the window size N to 1 in S845. Then, the processor 210 proceeds to S810.
[0107] After inputting the proceed command, the worker resumes the conveyance by operating the control panel 980 of the conveyance device 900 (FIG. 2). For example, the worker starts the automatic conveyance by operating the third operation unit 983. The processor 210 repeats the above-described process. In the example of FIG. 11(B), a sixth combined texture image IMrN6 consisting of one band texture image IMrc6 is generated after the fifth combined texture image IMrN5.
[0108] When the screen DP1 (FIG. 13A) is displayed, the operator may operate the button Bt1 to change the inspection mode to the first visual inspection mode. The operator may then manually transport the fabric 700 by operating the control panel 980 of the transport device 900 (FIG. 2). In the reading process of FIG. 3, the processor 210 acquires read image data each time the current relative position reaches the read relative position Ps associated with the read completion flag F1 set to NO, regardless of the inspection mode. In the inspection process of FIG. 6, the determination result of S225 is No. In this case, the processor 210 executes the processes of S390, S393, S395, and S398 (FIG. 7C). The process of S390 is the same as the process of S255 (FIG. 6) (data of the combined fabric image for display is generated). The processes of S393 and S395 are the same as the processes of S265 and S270 (FIG. 7A), respectively (data of the combined texture image is sent to the UI module 233, and the window size N is updated). In S398, the processor 210 stores the inspection record data in the storage device 215. In this embodiment, the processor 210 sets the inspection mode MD corresponding to the same reading relative position Ps as the current relative position of the result data D2 (FIG. 8) as the first mode. After S398, the processor 210 proceeds to S215 (FIG. 6).
[0109] If the data of the combined texture image is stored in the second buffer area BF2 in S393, the processor 210 acquires the data of the combined texture image from the second buffer area BF2 in S810 of Fig. 12. Because the acquired data does not include data of defect information, the processor 210 determines that a normal reception event has occurred.
[0110] If a normal reception event occurs, in S825, the processor 210 displays the combined texture image on the display unit 240 ( FIG. 1 ). FIG. 13C shows an example of a screen displayed in S825. Screen DP3 is a screen displayed when the inspection mode is the first mode for visual inspection. Screen DP3 displays an image area AWu representing the combined texture image IMrNu, a button Bt31 for editing information representing defects, a button Bt32 for switching the inspection mode to the second mode, and a button Bt33 for terminating processing. Although not shown, when button Bt31 is operated, the processor 210 edits the result data D2 and merged data D3 in accordance with instructions input to the operation unit 250. When button Bt32 is operated, the processor 210 sets the inspection mode to the first mode. When button Bt33 is operated, the processor 210 terminates the inspection process.
[0111] As described above, in this embodiment, the digital cameras 111-114 (FIG. 2) are an example of a reading device configured to sequentially read different portions of the fabric 700, which is an example of an object, as the fabric 700 is transported. The processor 210 (FIG. 1) executes the following process in accordance with the program (inspection module 232). In S235, S245, and S250 (FIG. 6), the processor 210 executes a detection process, which is a process for detecting defects in the fabric 700 (the processes of S235, S245, and S250 are also referred to as the detection process SS). The processor 210 sequentially executes the detection process SS using each of a plurality of read images (here, band fabric images IMrc) acquired using the digital cameras 111-114.
[0112] If a defect is detected by the detection process SS, the processor 210 executes a stop process in S350 of FIG. 7B to stop the conveyance of the fabric 700 in response to the condition of S260 being satisfied (the process of S350 is referred to as the stop process S350). The condition of S260 is satisfied when N standard images, including the first scanned image in which the defect is detected (e.g., the second band fabric image IMrc2 in FIG. 11B) and one or more scanned images subsequent to the first scanned image (e.g., band fabric images IMrc3-IMrc5), are acquired using the digital cameras 111-114. Hereinafter, the N standard images acquired between the detection of the defect by the detection process and the stop of conveyance are referred to as specific scanned images (e.g., band fabric images IMrc2-IMrc5). The number of specific scanned images N standard may be any integer greater than or equal to 2. After the condition of S160 is satisfied, the processor 210 executes the stop process S350.
[0113] The processor 210 repeats the detection process SS (FIG. 6) to execute the detection process SS using each of M target read images among the N standard number of specific read images. M may be an integer greater than or equal to 2 and less than or equal to N standard number. The M target read images include a first read image (e.g., the second band texture image IMrc2 in FIG. 11B) and one or more read images other than the first read image (e.g., the third band texture image IMrc3). In this embodiment, the M target read images include N standard number of band texture images IMrc2-IMrc5.
[0114] With this configuration, when a defect is detected in the first read image, the processor 210 executes the detection process SS on not only the first read image but also one or more read images subsequent to the first read image. Therefore, the processor 210 can obtain a result of the detection process SS that more appropriately represents the state of the fabric 700, compared to when the result of the detection process SS is obtained from only the first read image. For example, like the defect FD1 in the fifth combined fabric image IMrN5 in FIG. 11(B), the processor 210 can obtain a detection result for a defect indicated by each of the multiple band fabric images.
[0115] In this embodiment, the M target read images that are the targets of the detection process SS among the Nstd specific read images include one or more read images that follow the first read image (for example, the third band texture image IMrc3 that follows the second band texture image IMrc2 in FIG. 11B). Therefore, the processor 210 can obtain detection results for defects indicated by the first read image and one or more read images that follow the first read image.
[0116] In this embodiment, the last scanned image among the M target scanned images is the last specified scanned image among the Nstd specified scanned images (for example, the fifth band texture image IMrc5 of the fifth combined texture image IMrN5 in FIG. 11B). Therefore, the processor 210 can obtain detection results of defects indicated by the first scanned image and the last specified scanned image.
[0117] In this embodiment, as described with reference to FIG. 2 , a first position Pr and a second position Pv are set on the transport path (here, partial path Pth) of the fabric 700. The first position Pr is the position where the digital cameras 111-114 read the fabric. The second position Pv is a position for visual inspection located downstream of the first position Pr. As described with reference to S260 in FIG. 6 and the fifth combined fabric image IMrN5 associated with NP=5 in FIG. 11B , the processor 210 executes the stop process S350 after the target portion of the fabric 700 corresponding to the first scanned image (here, the second band fabric image IMrc2) is scanned by the digital cameras 111-114 at the first position Pr. The transport is stopped when the target portion is located at the second position Pv. Therefore, the operator can easily investigate defects indicated by the first scanned image by observing the portion of the fabric 700 located at the second position Pv.
[0118] In this embodiment, the detection process SS ( FIG. 6 ) includes a process S235. The process S235 detects a defect portion of the fabric 700 that represents a defect (e.g., defect FD in FIG. 5D ) as a defect (hereinafter, the process S235 will be referred to as defect detection process S235). A bounding box and a mask (e.g., bounding box BBD1 and mask MD1 in FIG. 5D ) are examples of a defect portion. In S370 ( FIG. 7B ), the processor 210 executes a merging process of the defect portion (the process S370 will also be referred to as merging process S370). As shown in FIG. 14 , the processor 210 merges the first defect portion and the second defect portion into a single defect portion. In FIG. 15(D), the first bounding box BBa is an example of a first defective portion, the second bounding box BBb is an example of a second defective portion, and the bounding box BBab is an example of a defective portion generated by merging.
[0119] The condition for merging is that a continuity condition CC, which indicates that the first defect portion and the second defect portion are in a predetermined contiguous relationship, is satisfied. In this embodiment, the continuity condition CC includes the determination results of both S550 and S560 being Yes. As shown in FIGS. 15(A)-15(D), under such conditions, the processor 210 can merge two defect portions that represent different portions of the same linear defect. Note that the processor 210 may determine whether the two defect portions are in a contiguous relationship regardless of whether the two defect portions are actually contiguous. In other words, the processor 210 may determine that the two defect portions are in a predetermined contiguous relationship if the two defect portions may represent different portions of the same defect. The contiguous condition CC may be various conditions that indicate that the two defect portions are in such a predetermined contiguous relationship. For example, if the two defect portions are actually contiguous, the two defect portions may be determined to be in a contiguous relationship regardless of the angle Ad.
[0120] 6, the processor 210 executes a combining process to combine N band texture images IMrc to generate a combined texture image (the process of S255 is also referred to as the combining process S255). When N=Nstd, in this embodiment, Nstd band texture images IMrc are combined. That is, the combined scanned image (here, the band texture image IMrc) includes two or more consecutive target scanned images among M target scanned images that are targets of the detection process SS among the Nstd specific scanned images.
[0121] The combining process S255 may include the process of FIG. 10A, i.e., S410d and S420d. In S410d, as shown in FIG. 10B, the processor 210 calculates the fabric center fc at the edge of the band fabric images IMrc1-IMrc4. The fabric center fc is the center of the portion representing the fabric 700 at the edge of the target scanned image that connects to the adjacent target scanned image. In S420d (FIG. 10A), as shown in FIG. 10C, the processor 210 generates a combined fabric image IMrNd by combining N band fabric images in an arrangement that connects the fabric centers fc of two adjacent band fabric images. That is, the two target scanned images are combined in an arrangement that connects the fabric centers fc of the two target scanned images at the joining portion of the two adjacent target scanned images. This allows the processor 210 to reduce the likelihood that the combined texture image represents the texture 700 including discontinuous portions (e.g., misalignment in the first direction Dx).
[0122] Furthermore, as described in S355, the N band mask images are combined in the same arrangement as the arrangement for combining the N band texture images. Then, in the merging process S370, the bounding box and mask on the combined mask image are used. These bounding boxes and masks correspond to the bounding box and mask on the combined texture image (e.g., combined texture image IMrNd), respectively. That is, the merging process S370 includes a process of merging the first defect portion (e.g., bounding box BBa in FIG. 15(D)) and the second defect portion (e.g., bounding box BBb) included in the combined texture image into a single defect portion (e.g., bounding box BBab) when the first defect portion and the second defect portion satisfy the continuity condition CC. As described above, in the merging process S370, the processor 210 can appropriately merge two defect portions included in the combined texture image, which represent two defects included in a single linear defect.
[0123] The merging process S255 (FIG. 6) may also include the processes of FIG. 9E, i.e., S410c and S420c. In S410c, the processor 210 generates corrected images IMrcc1-IMrcc4 (FIG. 9F) by correcting the skew of the region representing the fabric 700 in the target scanned image (e.g., band fabric images IMrc1-IMrcc4 in FIG. 9B). In S420c, the processor 210 generates a combined fabric image IMrNc by combining two adjacent corrected target scanned images. This allows the processor 210 to reduce the possibility that the combined fabric image represents the fabric 700 including discontinuous portions (e.g., misalignment in the first direction Dx). Similarly to the case where the merging process of FIG. 10A is performed, the processor 210 can appropriately merge two defective portions included in the combined fabric image.
[0124] Furthermore, the combining process S255 (FIG. 6) may include the process of FIG. 9C, i.e., S410b and S420b. In S410b, the processor 210 detects the edge of the fabric 700 at the edge of the band fabric image (for example, the fabric edge fe of band fabric images IMrc1-IMrc4 in FIG. 9D). The fabric edge fe is the edge of the portion representing the fabric 700 at the edge of the target read image that is connected to the adjacent target read image. In S420b, the processor 210 generates a combined fabric image IMrNb by combining N band fabric images in an arrangement that connects the fabric edges fe of two adjacent band fabric images. That is, the two target read images are combined in an arrangement that connects the fabric edges fe of the two target read images at the joining portion of the two adjacent target read images. This allows the processor 210 to reduce the likelihood that the combined fabric image represents the fabric 700 with discontinuous portions (e.g., misalignment in the first direction Dx). Also, similar to the case where the merging process of FIG. 10A is performed, the processor 210 can appropriately merge two defect portions included in the combined fabric image.
[0125] In this embodiment, the defect detection process S235 ( FIG. 6 ) includes a process for detecting a linear defect portion representing a linear defect as a defect portion (e.g., the bounding box BBD1 representing the defect FD in FIG. 5D ). The first defect portion merged by the merging process S370 ( FIG. 7B ) may be a first linear defect portion representing a first linear defect (e.g., the bounding box BBa representing the first defect FDa in FIG. 15A ). The second defect portion merged by the merging process S370 may be a second linear defect portion representing a second linear defect (e.g., the bounding box BBb representing the second defect FDb). As described with reference to FIG. 14 , in this embodiment, the continuity condition CC includes the determination results of both S550 and S560 being Yes. 15(C), the condition of S560 is that the angle Ad formed between the extension direction of the first defect and the extension direction of the second defect is equal to or less than the angle threshold Adth (the angle Ad formed between the extension direction DDa of the first defect FDa and the extension direction DDb of the second defect FDb is an example of the angle Ad). The condition of S550 is that the distance DBb between the first linear defect portion and the second linear defect portion is equal to or less than the first threshold Th1 (the distance DBb between the first bounding box BBa and the second bounding box BBb is an example of the distance DBb). By using such a continuity condition CC, the processor 210 can merge two defect portions representing two defects FDa and FDb included in one linear defect.
[0126] Furthermore, the combining process S255 (FIG. 6) may include the process of FIG. 10(D), i.e., S410e and S420e. In this case, as shown in FIG. 10(E), two or more consecutive target scanned images (e.g., band fabric images IMrc1-IMrc4) each contain a common portion pc, which is an image portion common to adjacent target scanned images. In S410e and S420e, the processor 210 calculates an arrangement in which the common portions pc of two adjacent band fabric images overlap, and combines N band fabric images in the calculated arrangement to generate a combined fabric image IMrNe. In other words, the two adjacent target scanned images are superimposed so that the image portions common to the two adjacent target scanned images overlap. This allows the processor 210 to reduce the possibility that the combined fabric image represents a fabric 700 that includes discontinuous portions (e.g., misalignment in the first direction Dx). Furthermore, similar to when the merging process of FIG. 10A is performed, the processor 210 can appropriately merge two defect portions included in the combined texture image.
[0127] In this embodiment, when multiple defect portions are merged by the merging process S370 ( FIG. 7B ), the processor 210 generates defect information representing the merged defect portions in S375. The bounding box BBab in FIG. 15D is an example of a merged defect portion. In this embodiment, the defect information includes the bounding box. Furthermore, the processor 210 executes the process of S835 in FIG. 12 in accordance with the program (UI module 233). In S835, the processor 210 displays the entire bounding box on the display unit 240 ( FIG. 13B ). That is, the entire merged defect portion is displayed on the display unit 240. A user (e.g., an operator) can easily recognize a long defect by observing the displayed defect portion.
[0128] In this embodiment, the detection process SS ( FIG. 6 ) also includes a defect detection process S235. The object to be processed in the defect detection process S235 is fabric 700 having selvedge 700L, 700R ( FIG. 5A ). As described in FIG. 5D , in the defect detection process S235, the processor 210 detects the selvedge 700L, 700R and defects as separate objects. That is, the processor 210 detects defects in the remaining portion of the region representing fabric 700 in the scanned image, excluding the portions representing selvedge 700L, 700R. This reduces the possibility that the selvedge 700L, 700R will be erroneously detected as defects.
[0129] In this embodiment, as shown in FIG. 7B , the processor 210 executes S355, S370, and S375 after the stop processing S350. S355 is a process for generating data of a combined mask image by combining N band mask images included in a window. S370 is a process for merging defective portions. The combined mask image may be used in this merging process ( FIG. 14 ) (S555). S375 includes a process for calculating the length of the defective portion using the combined mask image. The N band mask images used to generate the combined mask image include images (here, band mask images) obtained using the first scanned image in which a defect is detected (e.g., the second band texture image IMrc2 in FIG. 11B ). S355, S370, and S375 are examples of specific image processing using images (here, band mask images) obtained using the first scanned image in which a defect is detected.
[0130] Image processing can take a long time. If a specific image process (here, S355, S370, and S375) is performed before the stop process S350, the stop process S350 may be delayed due to the time required for the specific image process. If the stop process S350 is delayed, the conveyance stop position may deviate from the appropriate position. For example, the appropriate stop position for the fifth stop process S350 (NP=5) in FIG. 11(B) is the relative position where the portion of the fabric 700 corresponding to the second band fabric image IMrc2 is located at the second position Pv. If the stop process S350 is delayed, conveyance may stop after the portion corresponding to the second band fabric image IMrc2 passes the second position Pv. One possible method to reduce the possibility of such a problem is to slow the upper limit of the conveyance speed. However, if the upper limit of the conveyance speed is slow, the time required to inspect the fabric 700 will be longer. In this embodiment, the processor 210 executes the specific image processing after the stop processing S350. Therefore, the processor 210 can suppress deviation of the stop position caused by the specific image processing without lowering the upper limit of the transport speed.
[0131] B. Second Embodiment: FIG. 16 is a flowchart showing another embodiment of the inspection process. The only difference from the inspection processes of FIGS. 6 and 7(A)-7(C) is that steps S320-S330 of FIG. 16 are inserted between S260 and S350. In this embodiment, when a defect is detected, the processor 210 increases the window size N until no defects are detected. The reading process and the UI-controlled reading process are the same as the reading process of FIG. 3 and the UI-controlled reading process of FIG. 12, respectively.
[0132] 17(A) shows an example of changes in window size N and window WN. Shown in the figure are windows WN4-WN9 corresponding to process numbers NP of 4 to 9, respectively. FIG. 17(B) is a diagram showing an example of changes in the combined texture image generated in S255 (FIG. 6). Shown in the figure are combined texture images IMrN4-IMrN9 corresponding to process numbers NP of 4 to 9, respectively.
[0133] As shown, the fourth combined texture image IMrN4 includes N standard band texture images IMrc1-IMrc4. The first band texture image IMrc1 has no defects, and the band texture images IMrc2-IMrc4 represent defect FD2. In the fourth step (NP=4) of S260 (FIG. 6), it is determined that the oldest band texture image IMrc1 has no defects (S260: No). As a result, the fifth step (NP=5) of S215-S255 generates a fifth combined texture image IMrN5 including band texture images IMrc2-IMrc5. The window size N of the fifth combined texture image IMrN5 is the same as the window size N of the fourth combined texture image IMrN4 (N=N standard).
[0134] In S260, the fifth step (NP=5), it is determined that the oldest band texture image IMrc2 has a defect (S260: Yes). In this case, the processor 210 determines in S320 (FIG. 16) whether the latest band texture image in the window has a defect. If the fifth combined texture image IMrN5 in FIG. 11(B) is processed, the latest band texture image IMrc5 does not have a defect (S320: No). In this case, the processor 210 proceeds to S350 in FIG. 7(B). The processing following S350 is the same as the processing described in FIG. 11(B).
[0135] When the fifth combined texture image IMrN5 in FIG. 17B is processed, the latest band texture image IMrc5 has a defect (S320: Yes). In this case, the processor 210 transmits data of the combined texture image to the UI module 233 in S325. The processing of S325 is the same as the processing of S265 (FIG. 7A). In S330, the processor 210 adds 1 to N. Unlike S270 (FIG. 7A), the window size N can be a value larger than the standard size Nstd. After S330, the processor 210 proceeds to S215 in FIG. 6. Then, the processor 210 generates a combined texture image to which the new scanned image has been added by the processing of S215-S255. For example, the sixth combined texture image IMrN6 in FIG. 17B is an image obtained by adding the sixth band texture image IMrc6 to the fifth combined texture image IMrN5.
[0136] The processor 210 increases the window size N (S330) until the latest band texture image within the window does not contain any defects, and generates a combined texture image to which the new scanned image has been added (S215-S255). In the example of FIG. 17(B), as shown in combined texture images IMrN7 and IMrN8, the linear defect FD2 extends from the second band texture image IMrc2 to the seventh band texture image IMrc7. The eighth band texture image IMrc8 does not contain any defects. The processor 210 increases the window size N until a combined texture image IMrN8 including the eighth band texture image IMrc8 is generated.
[0137] When the combined texture image IMrN8 is processed, the oldest band texture image IMrc2 contains a defect (S260: Yes), and the latest eighth band texture image IMrc8 does not contain a defect (S320: No). Therefore, the processor 210 proceeds to S350 (FIG. 7B). In S370, a bounding box BB2 representing the entire defect FD2 may be formed by merging multiple defect portions representing the defect FD2. If a bounding box BB2 is formed, in S835 (FIG. 12), the processor 210 displays the entire bounding box BB2 on the display unit 240, as in the example of FIG. 13B. For example, the entire combined texture image IMrN8 and the entire bounding box BB2 are displayed in the image area AWt. Thereafter, the proceed button Bt21 is operated to set the window size N to 1 (FIG. 12: S845), and a new scanned image is processed.
[0138] As described above, in this embodiment, the total number N of specific read images acquired between the time a defect is detected by the detection process SS and the time conveyance is stopped can be further increased from the standard size Nstd. The band fabric images IMrc2-IMrc8 in FIG. 17B are examples of N specific read images. The N specific read images include normal read images, which are read images in which no defect is detected by the detection process SS (for example, the eighth band fabric image IMrc8). The last read image of the M target read images is a normal read image (the M target read images are the targets of the detection process SS among the N specific read images). In the example of FIG. 17B, the M target read images include N band fabric images IMrc2-IMrc8. The eighth band fabric image IMrc8, which is a normal read image, is the last image of the N band fabric images IMrc2-IMrc8. That is, the eighth band fabric image IMrc8 is the last image of the M target scanned images. In this way, the processor 210 executes the stop process S350 when a scanned image in which no defects are detected is obtained by the detection process SS. When the fabric 700 has a long defect, the processor 210 can transport the fabric 700 to the position where the defect ends. This reduces the burden on the operator, as the operator does not need to manually search for the position where the defect ends.
[0139] Furthermore, in this embodiment, the processor 210 executes the stop process S350 when no defect is detected by the detection process SS using a scanned image (here, the eighth band fabric image IMrc8) obtained after the first scanned image in which the defect is detected (for example, the second band fabric image IMrc2 in FIG. 17B). Therefore, the processor 210 can appropriately transport the fabric 700 to the end of the defect. Another possible method for stopping transport is, for example, stopping transport when a predetermined number of scanned images have been acquired after a defect is detected from the scanned images. If this method is adopted, transport may stop at a position midway through the defect. In this embodiment, the possibility of transport stopping midway through the defect is reduced.
[0140] The inspection process of this embodiment is the same as the inspection process of the first embodiment (FIGS. 6 and 7(A)-7(C)) with the addition of the process of FIG. 16. Therefore, the inspection process of this embodiment can provide the same various advantages as those provided by the inspection process of the first embodiment.
[0141] C. Third Embodiment: FIG. 18 is a flowchart showing another embodiment of the inspection process. The only difference from the inspection processes of FIGS. 6 and 7(A)-7(C) is that S310 and S385 have been added. FIG. 19 is a flowchart showing another embodiment of the UI control process. There are two differences from the UI control process of FIG. 12. The first difference is that S840 and S845 have been omitted. The second difference is that a process (S855) for receiving a progress instruction (called a progress event) has been added. The reading process is the same as the reading process of FIG. 3.
[0142] In this embodiment, unlike the embodiments of Fig. 7B and Fig. 12, manual conveyance is performed after conveyance is stopped. When a new scanned image is acquired by manual conveyance, 1 is added to the window size N, and a combined texture image including the new scanned image is generated. Then, when the operator inputs a proceed instruction, the window size N is set to 1.
[0143] FIG. 20A shows an example of changes in window size N and window WN. Shown in the figure are windows WN4-WN9 corresponding to processing numbers NP of 4 to 9, respectively. FIG. 20B is a diagram showing an example of changes in the combined texture image generated in S255 (FIG. 6). Shown in the figure are combined texture images IMrN4-IMrN9 corresponding to processing numbers NP of 4 to 9, respectively. The band texture images IMrc1-IMrc9 and the combined texture images IMrN4-IMrN9 are the same as those in FIG. 17B.
[0144] In the fourth step (NP=4) of S260 (FIG. 6), it is determined that the oldest band texture image IMrc1 has no defects (S260: No). As a result, the fifth step (NP=5) of S215-S255 generates a fifth combined texture image IMrN5 including band texture images IMrc2-IMrc5. The window size N of the fifth combined texture image IMrN5 is the same as the window size N of the fourth combined texture image IMrN4 (N=Nstd).
[0145] In S260 (FIG. 6) for the fifth time (NP=5), it is determined that the oldest band texture image IMrc2 has a defect (S260: Yes). In this case, in S310 (FIG. 18), the processor 210 determines whether the window size N is the same as the standard size Nstd. When the fifth combined texture image IMrN5 is processed, N=Nstd (S310: Yes). In this case, the processor 210 executes a process to stop conveyance in S350 and executes the processes of S355-S380. The processes of S355-S380 are the same as the processes of S355-S380 in FIG. 7B, respectively. In S370, a bounding box BB2a representing the defect FD2 on the fifth combined texture image IMrN5 may be formed. As a result of the processing of S380 and S835 (FIG. 19), a screen DP2 showing processing information is displayed on the display unit 240, as shown in FIG. 13(B). In S385 (FIG. 18), the processor 210 adds 1 to the window size N. Then, the processor 210 proceeds to S215 (FIG. 6).
[0146] When the conveyance is stopped, the worker recognizes that a defect has been detected. The worker can easily recognize the defect by observing the display unit 240. The worker can also visually observe the fabric 700 (FIG. 2) to check the state of the defect. After this, the worker manually conveys the fabric 700 while visually observing the fabric 700 (FIG. 19: Su1). As a result, the following steps S215-S255 (FIG. 6) are executed, and a sixth combined fabric image IMrN6 including the band fabric images IMrc2-IMrc6 is generated.
[0147] In S260 (FIG. 6) of the sixth iteration (NP=6), it is determined that the oldest band texture image IMrc2 has a defect (S260: Yes). In S310 (FIG. 18), it is determined that the window size N is different from the standard size Nstd (S310: No). In this case, the processor 210 skips S350 and executes S355-S380 and S385. In S370, a bounding box BB2b representing the defect FD2 in the sixth combined texture image IMrN6 may be formed. Processing information is displayed on the display unit 240 (FIG. 1) through the processing of S380 and S835 (FIG. 19).
[0148] Thereafter, the fabric 700 is manually conveyed (FIG. 19: Su1), and the process starting from S215 (FIG. 6) is repeated to sequentially generate combined fabric images IMrN7 and IMrN8. In the repeated process of S370 (FIG. 7(B)), bounding boxes BB2c and BB2d representing the defect FD2 on the combined fabric images IMrN7 and IMrN8 can be formed, respectively.
[0149] In S835 (FIG. 19) for the eighth (NP=8), the combined fabric image IMrN8 (FIG. 20B) is displayed on the display unit 240 (FIG. 13B). At this stage, the operator can visually observe the fabric 700 (FIG. 2) to recognize the end position of the defect. After this, the operator operates the progress button Bt21 to start automatic transport. In S810 (FIG. 19), the processor 210 determines that a progress event has occurred. In this case, in S855, the processor 210 sets the window size N to 1. Then, the processor 210 proceeds to S810. The operator starts automatic transport by operating the control panel 980 (FIG. 2). This allows automatic transport to proceed (Su2).
[0150] As described above, in this embodiment, the Nstd band fabric images IMrc2-IMrc5 (FIG. 20B) read before the stop processing S350 (FIG. 18) are examples of specified read images. All of these images IMrc2-IMrc5 are processed in the detection processing SS. That is, the M target read images that are the targets of the detection processing SS include the Nstd specified read images. In the examples of FIGS. 20A and 20B, defects are detected from each of the Nstd specified read images (here, band fabric images IMrc2-IMrc5). After the transport of the fabric 700 is stopped by the stop processing S350, the operator resumes transport of the fabric 700. Upon resumption of transport, a new read image (here, the sixth band fabric image IMrc6) is acquired using the digital cameras 111-114. A defect is detected from the sixth band fabric image IMrc6. In this case, the processor 210 generates a combined image (here, the sixth combined texture image IMrN6) by combining the Nstd specific scanned images with the new scanned image in S255 (FIG. 6). In this way, the processor 210 can generate a combined image that shows defects in each of the Nstd specific scanned images and the new scanned image. When such a combined image is displayed, the worker can easily recognize the defects by observing the combined image.
[0151] In this embodiment, if a defect is detected and the determination result in S260 (FIG. 6) is Yes, the processor 210 temporarily stops the conveyance (FIG. 18: S310: Yes, S350). After that, the worker manually carries out the conveyance. Therefore, the worker can continue the conveyance while visually observing the defects of the fabric 700.
[0152] The process from the start of the inspection process (FIG. 6) to the stop of transport at S350 (FIG. 18) is the same as the inspection process of Example 1. Therefore, the inspection process of this example can provide the same various advantages as those provided by the inspection process of Example 1.
[0153] D. Fourth Embodiment: FIG. 21 is a flowchart showing another embodiment of the inspection process. The only difference from the inspection process of the embodiment of FIG. 18 is the addition of S320d. Note that, unlike the embodiment of FIG. 18, in this embodiment, after the transport is stopped by the stop process S350, the operator restarts the automatic transport. FIG. 22 is a flowchart showing another embodiment of the UI control process. This UI control process is the same as the UI control process of FIG. 19. Note that, unlike the embodiment of FIG. 19, in this embodiment, after the transport is stopped, the operator restarts the automatic transport. For example, after S835, the automatic transport proceeds (Su3).
[0154] Fig. 23(A) shows an example of changes in the window size N and the window WN. Fig. 23(B) is a diagram showing an example of changes in the combined texture image generated in S255 (Fig. 6). The only difference from Fig. 20(A) and Fig. 20(B) is that the manual transport from the fourth (NP=4) to the eighth (NP=8) is replaced with automatic transport.
[0155] As in the examples of FIGS. 20(A) and 20(B), the determination result of S260 (FIG. 6) in the fourth step (NP=4) is No. A fifth combined texture image IMrN5 is generated by steps S215-S255 in the fifth step (NP=5). The determination result of S260 in the fifth step (NP=5) is Yes. In this case, the processor 210 proceeds to S310 (FIG. 21). The determination result of S310 in the fifth step (NP=5) is Yes. In this case, the processor 210 executes a process to stop conveyance in S350, and executes the processes of S355-S380 and S385. By the processes of S380 and S835 (FIG. 22), a screen DP2 showing processing information is displayed on the display unit 240, as shown in FIG. 13(B). The above process is the same as the process in the examples of FIGS. 20(A) and 20(B).
[0156] When the conveyance stops, the worker recognizes that a defect has been detected. The worker can easily recognize the defect by observing the display unit 240. The worker can also visually inspect the fabric 700 (FIG. 2) to check the state of the defect. For example, the worker can recognize that defect FD2 continues. After this, unlike the examples of FIGS. 20(A) and 20(B), in this embodiment, the worker starts automatic conveyance. This causes automatic conveyance to proceed (FIG. 22: Su3). Then, inspection of the remaining portion of defect FD2 proceeds. In the next steps S215-S255 (FIG. 6), a sixth combined fabric image IMrN6 is generated.
[0157] The sixth (NP=6) determination result in S260 (FIG. 6) is Yes. In S310 (FIG. 21), it is determined that the window size N is different from the standard size Nstd (S310: No). In this case, the processor 210 proceeds to S320d. The processing of S320d is the same as the processing of S320 (FIG. 16). The processor 210 determines whether the latest band texture image in the window has a defect. When the sixth combined texture image IMrN6 is processed, it is determined that the latest sixth band texture image IMrc6 has a defect (S320d: Yes). In this case, the processor 210 skips S350 and executes the processing of S355-S380 and S385. In this way, automatic conveyance continues without being stopped.
[0158] Thereafter, the automatic transport and the process starting from S215 (FIG. 6) are repeated until the determination result in S320d becomes No. In this way, combined texture images IMrN7 and IMrN8 are generated in sequence.
[0159] In S320d (FIG. 21) at the eighth time (NP=8), it is determined that the latest eighth band texture image IMrc8 has no defects (S320d: No). In this case, the processor 210 proceeds to S350 and executes stop processing. The processor 210 then executes the processing of S355-S380 and S385. As a result of the processing of S380 and S835 (FIG. 22), a screen DP2 showing processing information is displayed on the display unit 240 as shown in FIG. 13(B) (for example, a bounding box BB2d is displayed).
[0160] The stop of conveyance allows the operator to recognize that no defects have been detected in the latest scanned image. The operator can recognize the end of defect FD2 by observing the bounding box BB2d displayed on the display unit 240 in S835 (FIG. 22). The operator can also recognize the end of defect FD2 by visually observing the fabric 700 (FIG. 2).
[0161] When the investigation of the defect is complete, the worker operates the progress button Bt21 (FIG. 13(B)) to input an instruction to proceed with the process. In S810 (FIG. 22), the processor 210 determines that a progress event has occurred. In this case, in S855, the processor 210 sets the window size N to 1. The processor 210 then proceeds to S810. The worker starts automatic transport by operating the control panel 980 (FIG. 2). This allows automatic transport to proceed (Su2).
[0162] As described above, in this embodiment, the Nstd band fabric images IMrc2-IMrc5 (FIG. 23B) read before the stop processing S350 (FIG. 21) are examples of specified read images. These images IMrc2-IMrc5 are all processed in the detection processing SS. That is, the M target read images that are the targets of the detection processing SS include the Nstd specified read images. As shown in FIGS. 23A and 23B, defects are detected from each of the Nstd specified read images (here, band fabric images IMrc2-IMrc5). After the transport of the fabric 700 is stopped by the stop processing S350, the operator resumes transport of the fabric 700. Upon resumption of transport, a new read image (here, the sixth band fabric image IMrc6) is acquired using the digital cameras 111-114. A defect is detected from the sixth band fabric image IMrc6. In S255 (FIG. 6), the processor 210 generates a combined image by combining the Nstd specific scanned images with the new scanned image (here, the sixth combined texture image IMrN6). In this way, the processor 210 can generate a combined image that shows defects in each of the Nstd specific scanned images and the new scanned image. When such a combined image is displayed, the worker can easily recognize the defects by observing the combined image.
[0163] In this embodiment, after a defect is detected by the detection process SS, conveyance is temporarily stopped (FIG. 6: S260: Yes, FIG. 21: S310: Yes). Then, conveyance is resumed. Then, if the latest band fabric image does not contain a defect (S320d: No), that is, if no defect is detected by the detection process SS using the scanned image (here, the band fabric image), the processor 210 executes the stop process S350. Therefore, the processor 210 can appropriately convey the fabric 700 to the end of the defect.
[0164] The process from the start of the inspection process (FIG. 6) to the stop of transport at S350 (FIG. 21) is the same as the inspection process of Example 1. Therefore, the inspection process of this example can provide the same various advantages as those provided by the inspection process of Example 1.
[0165] E. Fifth Embodiment: Figure 24 is a flowchart showing another embodiment of the inspection process. The only difference from the inspection process shown in Figure 6 is that S235, S240, and S245 between S225 and S250 are replaced with S227, S228, S235, and S240 in Figure 24. The process in Figure 24 is applicable to each of the first to fourth embodiments described above.
[0166] If the inspection mode is the second mode for automatic inspection (S225: Yes), in S227, the processor 210 calculates the width of the fabric 700. The width calculation method may be any method. For example, the processor 210 may divide the band fabric image (for example, the band fabric image IMrc ( FIG. 5(B) )) into a background BG region and a fabric 700 region by binarization (for example, Otsu binarization). Then, the processor 210 may calculate the width of the fabric 700 region. Alternatively, the processor 210 may detect the boundary between the background BG and the fabric 700 by a Hough transform, and calculate the width of the fabric 700 using the detected boundary. In either case, the width of the fabric 700 in the band fabric image is calculated by dividing the width of the fabric 700 in the second direction Dy 5(F) 。 In this case, the method of calculating the width of the fabric 700 may be various methods, similar to the method of calculating the width Wf in FIG. 5(F). In S228, the processor 210 determines whether the width is within the allowable width range. If the width is within the allowable width range (S228: Yes), the processor 210 executes the processes of S235 and S240 and proceeds to S250. If the width is outside the allowable width range (S228: No), the processor 210 skips S235 and S240 and proceeds to S250.
[0167] As described above, in this embodiment, the object to be inspected is the fabric 700 ( FIG. 2 ). In S227, S228, S235, S240, and S250 in FIG. 24 , the processor 210 executes a detection process that detects defects in the fabric 700 (the process in FIG. 24 including S227, S228, S235, S240, and S250 is also referred to as a detection process SSe). In S227, the processor 210 calculates the width of the fabric 700 in the read image (for example, band fabric image IMrc ( FIG. 5B )). In S228 and S250, the processor 210 detects that the width of the fabric 700 is outside the allowable width range as a defect. If the width of the fabric 700 is within the allowable width range (S228: Yes), the processor 210 detects in S235 a defective portion of the fabric 700 that represents a defect as a defect. The processing load for detecting defective portions of the fabric 700 is often greater than the processing load for calculating the width of the fabric 700. In this embodiment, if the width is outside the allowable width range (S228: No), the processing for detecting defective portions (S235) is omitted, thereby reducing the load of the inspection processing.
[0168] F. Sixth Embodiment: FIG. 25 is a flowchart showing another embodiment of the inspection process. There are two differences from the portion of the inspection process shown in FIG. 6. The first difference is that S710 in FIG. 25 is inserted between S235 and S240. If the determination result of S710 is Yes, the process proceeds to S240. The second difference is that if the determination result of S710 is No, S725 and S730 are executed. The process of FIG. 25 is applicable to each of the first to fourth embodiments described above, including the process of FIG. 6. The other parts of the inspection process are the same as the corresponding parts of the inspection process described above (illustration and description of the same parts will be omitted).
[0169] In S710, the processor 210 determines whether or not selvage portions were detected in S235 (FIG. 6). As shown in FIG. 5B, in this embodiment, selvages 700L and 700R are formed on both ends of the fabric 700 in the width direction (i.e., the direction perpendicular to the conveying direction Df (FIG. 2)).
[0170] In this embodiment, because the fabric 700 ( FIG. 2 ) is soft, the fabric 700 may skew while being conveyed. That is, the position of the fabric 700 in the orthogonal direction Dt between the rollers 910 and 920 may move little by little in the orthogonal direction Dt or in the direction opposite to the orthogonal direction Dt (also referred to as the −Dt direction). If the fabric 700 continues to skew in the same direction, a portion of the fabric 700 may move outside the reading area Ar. That is, the first selvedge 700L or the second selvedge 700R may move outside the reading area Ar. In this case, the first selvedge 700L or the second selvedge 700R is not shown in the band fabric image IMrc ( FIG. 5(B) ), and therefore the first selvedge 700L or the second selvedge 700R is not detected from the band fabric image IMrc. If a selvedge is not detected from the band fabric image IMrc, an inappropriate width Wf (FIG. 5(F)) may be calculated in S245 (FIG. 6). Also, if a portion of the fabric 700 having a defect is located outside the reading area Ar, the band fabric image IMrc does not represent the defect, and therefore the defect may not be detected.
[0171] If two ears 700L, 700R are detected from the band fabric image IMrc, the processor 210 determines that the ear portions are detected. In this case (S710: Yes (FIG. 25)), the processor 210 proceeds to S240 (FIG. 6). If one or both of the ears 700L, 700R are not detected, the processor 210 determines that the ear portions are not detected. In this case (S710: No), the processor 210 proceeds to S725.
[0172] In S725, the processor 210 executes a stop process to stop the conveyance of the fabric 700. The stop process is the same as the stop process in S350 (FIG. 7B).
[0173] In S730, the processor 210 notifies the user that an ear has not been detected. Various notification methods may be used. In this embodiment, the processor 210 displays a message indicating that an ear has not been detected on the display unit 240 ( FIG. 1 ). The worker can easily recognize the misalignment of the fabric 700 by observing the display unit 240. Alternatively, the processor 210 may output a sound indicating that an ear has not been detected from a speaker (not shown). The worker can easily recognize the misalignment of the fabric 700 by hearing the sound. In this way, various notification methods may be used to notify a user, such as a worker, that an ear has not been detected. After S730, the processor 210 ends the inspection process. The worker may correct the misalignment of the fabric 700 and then resume the inspection process.
[0174] As described above, in this embodiment, the entire digital cameras 111-114 (FIG. 2) are an example of a reading device configured to sequentially read different portions of the fabric 700 as the fabric 700 is conveyed in the conveyance direction Df. The band fabric image IMrc (FIG. 5(B)) is an example of a read image acquired using the digital cameras 111-114. As described in FIG. 2, the digital cameras 111-114 sequentially read multiple portions of the fabric 700 that are aligned in the conveyance direction Df.
[0175] The fabric 700 (FIG. 5(B)) has selvedges 700L and 700R in a direction perpendicular to the second direction Dy (i.e., the conveying direction Df (FIG. 2)). As shown in the figure, the band fabric image IMrc represents the entire fabric 700 from the first selvedge 700L to the second selvedge 700R, i.e., the entire fabric 700 in a direction perpendicular to the conveying direction Df. In this way, the digital cameras 111-114 are configured to read the entire fabric 700 in a direction perpendicular to the conveying direction Df.
[0176] The processor 210 (FIG. 1) executes the processes of FIG. 3 and S215 and S220 of FIG. 6 in accordance with the program (reading module 231 and inspection module 232). Through these processes, the processor 210 acquires multiple band fabric images IMrc (i.e., multiple read images). The processor 210 also executes the following processes in accordance with the program (inspection module 232). In S235 (FIG. 6), the processor 210 detects P types of detection objects, including the selvedge 700L and 700R of the fabric, from the band fabric image IMrc. As described in FIG. 5(D), in this embodiment, the P types of detection objects include the selvedge 700L and 700R (i.e., P is 1 or more).
[0177] If a selvedge is detected (S710: Yes (FIG. 25)), the processor 210 proceeds to S240 (FIG. 6) and executes steps S245 and S250. In S245, the processor 210 acquires the width of the fabric 700. In S250, the processor 210 sets a defect flag F2. The defect flag F2 indicates whether or not the portion of the fabric 700 represented by the band fabric image IMrc has a defect. In this way, the processor 210 both acquires the width Wf of the fabric 700 in the band fabric image IMrc and determines whether or not there is a defect in the fabric 700.
[0178] If selvedge is not detected (S710: No (FIG. 25)), the processor 210 executes S725 and S730. In S725, the processor 210 stops the conveyance of the fabric 700. In S730, the processor 210 executes notification that selvedge is not detected.
[0179] With this configuration, when a selvedge is detected (S710: Yes), the processor 210 can appropriately acquire the width Wf of the fabric 700 and determine whether or not there is a defect in the fabric 700. Furthermore, when a selvedge is not detected (S710: No), the processor 210 can reduce the possibility of inappropriately acquiring the width Wf of the fabric 700 and determining whether or not there is a defect in the fabric 700. For example, the processor 210 can reduce the possibility of continuing to acquire the width Wf of the fabric 700 and determine whether or not there is a defect in the fabric 700 when the position of the fabric 700 is shifted from the reading area Ar.
[0180] In this embodiment, if selvedge is not detected (C1a, S710: No (FIG. 25)), the processor 210 stops conveyance (S725) and issues a notification (S730). Thus, case C1a is a specific case where selvedge is not detected, and is an example of the first case where either or both of stopping conveyance of fabric and notifying that selvedge is not detected are executed.
[0181] Furthermore, in this embodiment, as described in FIG. 5(D), the P types of detection objects include not only the selvages 700L and 700R but also defects in the fabric 700 (e.g., holes, linear defects FD, etc.) (i.e., P is 2 or more). As described in S235 (FIG. 6), the processor 210 uses the object detection model 310, which is an example of a trained machine learning model, to detect the P types of detection objects including selvages and defects from the band fabric image IMrc. The selvages and defects are detected by the same object detection model 310. Therefore, the load of the detection process for the selvages and defects can be reduced compared to when the selvages and defects are detected by independent processes.
[0182] In this embodiment, the appearance of the first ear 700L is similar to the appearance of the second ear 700R. The processor 210 detects the first ear 700L and the second ear 700R as the same type of object. Alternatively, the appearance of the first ear 700L may be dissimilar to the appearance of the second ear 700R. In this case, the processor 210 may detect the first ear 700L and the second ear 700R as different types of objects. That is, the first ear 700L and the second ear 700R may form two types of detection targets. The processor 210 may also detect one type of defect or multiple types of defects.
[0183] 25 may be applied to the fifth embodiment (FIG. 24). S710 (FIG. 25) may be inserted between S235 and S240 in FIG.
[0184] G. Seventh Embodiment: FIG. 26 is a flowchart showing another embodiment of the inspection process. The only differences from the embodiment of FIG. 25 are the following three points. The first difference is that in S210 (FIG. 6), the consecutive number Nn (described later) is initialized to zero (not shown). The second difference is that S713 is added, which is executed before S240 if the determination result of S710 (FIG. 26) is Yes. The third difference is that S716 and S720 are added, which are executed before S725 if the determination result of S710 is No. The other parts of the inspection process are the same as the corresponding parts of the inspection process of FIG. 25 (illustration and description of the same parts are omitted). The process of FIG. 26 is applicable to each of the first to fifth embodiments described above.
[0185] The consecutive number Nn indicates the number of consecutive No determination results in S710. In other words, the consecutive number Nn indicates that selvedge is not detected from Nn consecutive band fabric images IMrc (FIG. 5B). In the selvedge detection (S235 (FIG. 6)), the percentage of band fabric images IMrc in which selvedge is detected among the multiple band fabric images IMrc that show selvedge may actually be lower than 100%. Even if the determination result in S710 is No, the band fabric image IMrc may actually show selvedge. In such a case, it is not appropriate to stop conveyance (S725) and issue a notification (S730).
[0186] In this embodiment, the processor 210 uses the consecutive number Nn to determine whether to stop transport (S725) and issue a notification (S730). If an ear is not detected (S710: No), the processor 210 adds 1 to the consecutive number Nn in S716. In S720, the processor 210 determines whether the consecutive number Nn is equal to or greater than a threshold Q (Q is an integer equal to or greater than 2, for example, Q=2). If the consecutive number Nn is less than the threshold Q (S720: No), the processor 210 skips S725 and S730 and proceeds to S240 ( FIG. 6 ). If an ear is detected in the next step S235 ( FIG. 6 ) (S710: Yes ( FIG. 26 )), the processor 210 initializes the consecutive number Nn to zero in S713. Then, the processor 210 proceeds to S240.
[0187] After obtaining a No determination result in S710 and a No determination result in S720, if an ear is not detected in the next S235 (FIG. 6) (S710: No (FIG. 26)), the consecutive number Nn increases in S716. If the No determination result in S710 continues, the consecutive number Nn may become equal to or greater than Q. If the consecutive number Nn is equal to or greater than Q (S720: Yes), the processor 210 stops the transport (S725) and issues a notification (S730), and ends the inspection process.
[0188] As described above, in this embodiment, when selvedge is not detected from the Q consecutive band fabric images IMrc, the processor 210 stops the fabric conveyance (S725) and notifies the user that selvedge is not detected (S730). Therefore, the processor 210 can reduce the possibility that S725 and S730 are erroneously executed when no positional deviation of the fabric 700 in the orthogonal direction Dt occurs.
[0189] In this embodiment, if selvedge is not detected from Q consecutive band fabric images IMrc, C1b (S710: No and S720: Yes) is a specific case in which selvedge is not detected, and is an example of the first case in which either or both of stopping the transport of fabric and notifying that selvedge is not detected are executed.
[0190] Note that if the threshold Q is large, the possibility that the conveyance is stopped (S725) and the notification (S730) is erroneously executed even though the band fabric image IMrc shows an ear is reduced. However, if the threshold Q is large, the possibility that S725 and S730 are erroneously skipped even though the band fabric image IMrc does not show an ear is increased. The threshold Q may be determined in advance in consideration of the balance between these possibilities and depending on the ear detection performance of the process of S235 (FIG. 6).
[0191] H. Modifications: (1) The defect portion merging process S370 ( FIG. 7B ) may be various processes for merging two defect portions instead of the process of FIG. 14 . The merging condition for merging two defect portions is not limited to the continuity condition CC of FIG. 14 , and may be various conditions that are satisfied when two defect portions may represent different portions of the same defect. For example, the merging condition may be satisfied when a mask distance condition is satisfied that the distance between two masks of the two defect portions (e.g., masks MDa and MDb ( FIG. 15A )) is less than or equal to a second threshold, regardless of the angle Ad ( FIG. 15C ). Furthermore, the merging condition may be satisfied when a box distance condition is satisfied that the distance DBb between two bounding boxes of the two defect portions (e.g., bounding boxes BBa and BBb ( FIG. 15A )) is less than or equal to a third threshold, regardless of the angle Ad ( FIG. 15C ). The processor 210 may determine whether the merging conditions are satisfied in the following order: box distance condition, mask distance condition, and continuity condition CC. In each case, the merging conditions may include the two defect portions being of the same type.
[0192] The merging process S370 may be various processes that generate merging information for treating multiple different defect portions as a single defect portion. The merging information is not limited to a new bounding box, but may be various information indicating that multiple defect portions should be treated as a single defect portion as a whole. The merging information may be, for example, information that associates multiple defect portions to be merged. By referencing such merging information, the processor 210 can determine a defect portion that represents the entirety of the multiple defect portions (e.g., the smallest rectangle that encompasses the multiple defect portions). The defect portion that represents the entirety of the multiple defect portions may be used for various processes other than display (e.g., calculating the length of the defect). In addition to generating the merging information, the merging process may also include an image correction process that fills gaps between multiple defects in the scanned image to form a continuous defect. The corrected image may be used for various processes, such as display. However, the image correction process may be omitted. The merging process S370 may also be omitted.
[0193] (2) The object detection model 310 used in the defect detection process S235 ( FIG. 6 ) may be various other object detection models (e.g., YOLO (You only look once), Mask R-CNN, etc.) instead of RTMDet. Furthermore, the defect detection process may be a process for detecting defects without using a machine learning model. For example, the defect detection process may be a process for detecting defective portions by template matching using a template image representing a defect. Defective portions detected by the defect detection process are not limited to holes and linear defects, and may include portions representing various defects, such as dirty portions. Defective portions detected by the defect detection process may include one or more types of defective portions, including, for example, defect portions representing linear defects. In either case, the processor 210 may execute the defect detection process in a specific case. The specific cases may be various cases such as "when an unprocessed read image (e.g., band fabric image IMrc (FIG. 5B)) is acquired" or "when an unprocessed read image is acquired and the width Wf is within the allowable width range value (S228 (FIG. 24))." Furthermore, defects detected by the detection process (e.g., detection processes SS and SSe (FIGS. 6 and 24)) are not limited to defects in width Wf and defective portions, but may include various defects such as incorrect colors. Defects detected by the detection process may include, for example, one or more types of defects including defective portions.
[0194] (3) The method for detecting the ears 700L, 700R (S235 ( FIG. 6 )) is not limited to a method using the same model as the object detection model 310 used for defect detection, and may be any method. For example, the processor 210 may detect the ears 700L, 700R using a machine learning model different from the machine learning model for defect detection. The configuration of the machine learning model for ear detection may be the same as or different from the configuration of the machine learning model for defect detection. Furthermore, the processor 210 may detect the ears 700L, 700R by template matching using multiple template images of the ears 700L, 700R.
[0195] (4) The conditions for executing the stop process S350 may be various conditions other than the condition in FIG. 6 (S260: Yes), the condition in FIG. 16 (S260: Yes, S320: No), the condition in FIG. 18 (S260: Yes, S310: Yes), or the condition in FIG. 21 (S260: Yes, S310: Yes, or S260: Yes, S310: No, S320d: No). The processor 210 may execute the stop process when no defect is detected by the detection process using a specific read image obtained after the first read image in which a defect is detected (e.g., the second band texture image IMrc2 in FIG. 17B). The specific read image may be any read image obtained after the first read image. For example, the specific read image may be the first normal read image obtained after the first read image (a normal read image is a read image in which no defect is detected). The specific read image may be the Nstd image counted from the first read image, a read image before the Nstd image, or a read image after the Nstd image.
[0196] (5) After the stop process S350, various processes may be executed, including but not limited to S355-S380 (FIG. 7B). For example, the processor 210 may execute one or more of S355, S370, and S375 before the stop process S350 and execute the remaining processes after the stop process S350. Alternatively, one or more of S355, S370, and S375 may be omitted. Furthermore, the processor 210 may execute image processing using the first scanned image in which a defect is detected (e.g., the second band texture image IMrc2 in FIG. 13B). Such image processing may include, for example, a more accurate defect detection process. The more accurate defect detection process may be, for example, a process using an object detection model larger in scale than the object detection model 310. The more accurate defect detection process may take a long time. If a high-precision defect detection process is performed in the defect detection process S235 (FIG. 6) before the stop process S350, the stop process S350 may be delayed due to the time required for the high-precision defect detection process. If a high-precision defect detection process is performed after the stop process S350, defects can be detected more appropriately without the delay of the stop process S350.
[0197] Thus, after the stop process S350, the processor 210 may perform specific image processing using the first read image (e.g., a band texture image) or an image obtained using the first read image (e.g., a band mask image). The specific image processing may include image processing related to defects detected by the detection process SS performed using the first read image (e.g., a merging process S370 (FIG. 7B)).
[0198] (6) The inspection process is not limited to the above-described embodiment and modifications, and may be various processes. For example, the process of displaying the entire merged defect portion on a display device (e.g., S835 in FIG. 12) may be omitted. In this case, the worker can also visually inspect the fabric 700 for defects.
[0199] (7) The stop process for stopping the transport of an object (e.g., stop process S350 (FIGS. 7B, 15, 18, and 21)) may be executed not only in the cases shown in FIG. 6 (S260: Yes), FIG. 16 (S260: Yes, S320: No), FIG. 18 (S260: Yes, S310: Yes), and FIG. 21 (S260: Yes, S310: Yes, or S260: Yes, S310: No, S320d: No), but also in various cases in which a malfunction is detected by the detection process (e.g., detection processes SS and SSe (FIGS. 6 and 24)). Here, the processor 210 may execute the stop process after L (where L is an integer equal to or greater than 2) specific read images described below are acquired using the digital cameras 111-114. The L specific read images include a first read image (e.g., the second band fabric image IMrc2 in Figure 13 (B)) which is the read image in which the defect is detected, and one or more read images following the first read image (e.g., band fabric images IMrc3-IMrc5).
[0200] Furthermore, the processor 210 may perform the detection process using each of M target read images (M is an integer greater than or equal to 2 and less than or equal to L) described below out of the L specific read images. The M target read images include a first read image out of the L specific read images and one or more read images other than the first read image. The number M of target read images may be less than the number L of specific read images. For example, if the L specific read images include band fabric images IMrc2-IMrc5, the M target read images may include the first read image (band fabric image IMrc2) and one or two other read images (for example, band fabric image IMrc5).
[0201] The L specified read images may include various read images. For example, the L specified read images may include normal read images, which are read images in which no defects are detected by the detection process. The total number of normal read images included in the L specified read images may be 1 or may be 2 or more. In either case, the last read image of the M target read images may be any of the normal read images, or may be an image different from the normal read images.
[0202] (8) The method for acquiring the width of the fabric 700 is not limited to the method of calculating the width of the fabric 700 represented by the scanned image (e.g., S245 (FIG. 6) and S227 (FIG. 24)), and various other methods may be used. For example, the conveying device 900 (FIG. 2) may be equipped with a width sensor that outputs information regarding the width of the fabric 700. The width sensor may be equipped with, for example, multiple optical sensors lined up in the orthogonal direction Dt. The multiple optical sensors are arranged behind the fabric 700 as viewed from the light source 130. Such optical sensors can detect the presence or absence of the fabric 700 at the position of the optical sensor. When the fabric 700 is present at the position of the optical sensor, the light from the light source 130 is blocked by the fabric 700, and therefore the luminance detected by the optical sensor becomes dark. When the fabric 700 is not present at the position of the optical sensor, the light from the light source 130 is incident on the optical sensor, and therefore the luminance detected by the optical sensor becomes bright. The edge of the fabric 700 in the orthogonal direction Dt and the edge in the opposite direction to the orthogonal direction Dt are respectively located between the optical sensor indicating a bright luminance and the optical sensor indicating a dark luminance. The processor 210 can obtain the width of the fabric 700 using the position in the orthogonal direction Dt and the luminance of each of the multiple sensors.
[0203] (9) In the embodiment of FIG. 25 and the embodiment of FIG. 26, the inspection process may be various processes. For example, one of stopping the conveyance (S725) and notifying (S730) may be omitted. If stopping the conveyance (S725) is omitted, the processor 210 may proceed to S240 ( FIG. 6 ) after notifying (S730). Continuing the conveyance may resolve the misalignment of the fabric 700. In this case, the operator may continue the inspection process. If continuing the conveyance does not resolve the misalignment of the fabric 700, the operator may stop the conveyance and resolve the misalignment of the fabric 700. After this, the operator may resume the inspection process. Also, one of calculating the width (e.g., S245 ( FIG. 6 )) and determining whether or not there is a defect (e.g., setting the defect flag F2 in S250) may be omitted.
[0204] (10) The total number of digital cameras used to read the fabric 700 is not limited to four and may be any number greater than or equal to one. Furthermore, the reading device used to read the fabric 700 may include a line sensor instead of an area sensor such as a digital camera. In this case, the processor 210 may acquire read image data by having the reading device read the fabric 700 while the conveying device 900 conveys the fabric 700. In either case, the processor 210 may detect defects using the read image acquired using the reading device. For example, if the reading device includes one sensor, the read image acquired from the single sensor may be used as is. Furthermore, multiple sensors may be arranged to read different portions of the fabric 700. In this case, multiple read images obtained from the multiple sensors may be combined to generate a single read image. The combination of the read images may be performed by a device (e.g., a reading device) different from the data processing device 200.
[0205] (11) The processing target object, which is the object subjected to the defect detection process, may be various types of fabric for sewing (woven fabric, knitted fabric, denim fabric, etc.). The fabric may be fabric without selvedge. In this case, the distance from one end of the fabric to the other end may be used as the width Wf ( FIG. 5(F) ). The processing target object is not limited to fabric, but may be various types of sheet-like objects (e.g., paper, resin film, etc.). The processing target object is not limited to sheet-like objects, but may be various types of objects such as automobile bodies. The configuration of the transport device for transporting the processing target object may be various types suitable for transporting the processing target object. The configuration of the reading device may be various types suitable for the processing target object and the transport device.
[0206] (12) Visual observation of the object to be processed may be omitted from the inspection process of the object to be processed. In this case, the processor 210 may also display information indicating the detected defect on the display unit 240 ( FIG. 1 ). The worker can recognize the defect by observing the display unit 240. The standard size Nstd may be determined to a value suitable for displaying information indicating the defect. Here, display of an image representing the object to be processed may be omitted.
[0207] (13) The inspection process may be various other processes instead of the above embodiment and the above modified example. For example, the determination of S130 (FIG. 3) and the flag data D1 (FIG. 4) may be omitted. That is, the processor 210 may execute the processes of S140-S160 regardless of whether the fabric 700 has not been read at the current relative position. In S215 (FIG. 6), the processor 210 may execute the acquisition inspection process SR if the scanned image associated with the current relative position is unprocessed. The processor 210 may determine whether the scanned image is unprocessed by referring to the inspection mode MD (FIG. 8). If the inspection mode MD associated with the current relative position has not been set, the processor 210 may determine that the scanned image is unprocessed. If the inspection mode MD has been set to the first mode or the second mode, the processor 210 may determine that the scanned image has been processed.
[0208] (14) The configuration of the inspection program is not limited to the configuration divided into three programs such as modules 231, 232, and 233, and various configurations may be used. For example, a single program may be used that realizes all of the functions of modules 231, 232, and 233. Furthermore, the inspection process may be various other processes instead of the above embodiment and the above modified example. For example, the processor 210 may sequentially perform the entire reading process ( FIG. 3 ), the inspection process ( FIGS. 6 and 7(A)-7(C)), and the UI control process ( FIG. 12 ).
[0209] (15) In the above embodiment and the above modification, the processor 210 may cause the GPU 260 to execute various calculations. For example, the processor 210 may cause the GPU 260 to execute some or all of the calculations performed by the object detection model 310. Note that the GPU 260 may be omitted.
[0210] (16) The data processing device 200 in Fig. 1 may be a device of a type different from a personal computer (e.g., a digital camera, a scanner, or a smartphone). Furthermore, multiple devices (e.g., computers) that can communicate with each other via a network may share some of the data processing functions of the data processing device and collectively provide the data processing functions (a system including these devices corresponds to the data processing device).
[0211] (17) In each of the above embodiments, a part of the hardware configuration may be replaced with software, and conversely, a part or all of the software configuration may be replaced with hardware. For example, the processing by the object detection model 310 (FIG. 1) may be performed by a dedicated hardware circuit such as an Application Specific Integrated Circuit (ASIC).
[0212] (18) The technology disclosed in this specification can be realized as the following aspects: [Aspect 1] A program that causes a computer to realize the following: a detection function that sequentially executes a defect detection process that detects defect portions that represent defects in an object by using each of a plurality of read images acquired using a reading device configured to sequentially read different portions of the object by conveying the object, a function that executes a combination process that generates a combined image by combining two or more consecutive read images, and a function that executes a merging process that merges the first defect portion and the second defect portion as a single defect portion when a continuity condition indicating that a first defect portion and a second defect portion detected by the defect detection process are in a predetermined contiguous relationship is satisfied, wherein the combination process includes: a process of calculating an object center that is the center of a portion that represents the object at an end of the read image that is connected to an adjacent read image, and a process of combining the two adjacent read images in an arrangement that connects the object centers of the two read images at a combined portion of the two read images. the merging process includes a process of merging the first defect portion and the second defect portion included in the combined image into a single defect portion when the first defect portion and the second defect portion included in the combined image satisfy the continuity condition. With this configuration, an appropriate combined image can be generated, and two defect portions included in the combined texture image can be appropriately merged.
[0213] [Aspect 2] A program that causes a computer to realize the following: a detection function that sequentially executes a defect detection process that detects defect portions that represent defects in an object, using each of a plurality of read images acquired using a reading device configured to sequentially read different portions of the object by transporting the object; a function that executes a combination process that generates a combined image by combining two or more consecutive read images; and a function that executes a merging process that merges a first defect portion and a second defect portion detected by the defect detection process into a single defect portion if a continuity condition indicating that a first defect portion and a second defect portion are in a predetermined contiguous relationship is satisfied, wherein the combination process includes: a process that corrects skew in an area representing the object in the read image; and a process that combines two adjacent corrected read images, wherein the merging process includes a process that merges the first defect portion and the second defect portion into a single defect portion if the first defect portion and the second defect portion included in the combined image satisfy the continuity condition. According to this configuration, an appropriate combined image can be generated, and two defect portions included in the combined texture image can be appropriately merged.
[0214] [Aspect 3] A program that causes a computer to realize the following functions: a detection function that sequentially executes a defect detection process that detects defect portions that represent defects in an object by using each of a plurality of read images acquired using a reading device configured to sequentially read different portions of the object by conveying the object; a function that executes a combination process that generates a combined image by combining two or more consecutive read images; and a function that executes a merging process that merges the first defect portion and the second defect portion as a single defect portion when a continuity condition that indicates that a first defect portion and a second defect portion detected by the defect detection process are in a predetermined contiguous relationship is satisfied, wherein the combination process includes: a process of detecting an object edge that is an edge of a portion that represents the object at an edge of the read image that is connected to an adjacent read image; and a process of combining the two adjacent read images in an arrangement that connects the object edges of the two read images at the combined portion of the two adjacent read images. the merging process includes a process of merging the first defect portion and the second defect portion included in the combined image into a single defect portion when the first defect portion and the second defect portion included in the combined image satisfy the continuity condition. With this configuration, an appropriate combined image can be generated, and two defect portions included in the combined texture image can be appropriately merged.
[0215] [Aspect 4] A program that causes a computer to realize the following: a detection function that sequentially executes a defect detection process that detects defect portions that represent defects in an object by using each of a plurality of read images acquired using a reading device configured to sequentially read different portions of the object by conveying the object; a function that executes a combination process that generates a combined image by combining two or more consecutive read images; and a function that executes a merging process that merges the first defect portion and the second defect portion as a single defect portion when a continuity condition indicating that a first defect portion and a second defect portion detected by the defect detection process are in a predetermined continuity relationship is satisfied, wherein each of the two or more consecutive target read images includes an image portion that is common to an adjacent target read image, and the combination process includes a process of superimposing the two adjacent target read images so that the image portions common to the two adjacent target read images overlap, the merging process includes a process of merging the first defect portion and the second defect portion included in the combined image into a single defect portion when the first defect portion and the second defect portion included in the combined image satisfy the continuity condition. With this configuration, an appropriate combined image can be generated, and two defect portions included in the combined texture image can be appropriately merged.[Aspect 5] A program that causes a computer to realize the following functions: a function of sequentially executing a defect detection process that detects defect portions that represent defects in an object using each of a plurality of read images acquired using a reading device configured to sequentially read different portions of the object as the object is conveyed in a conveying direction; and a function of executing a merging process that merges two defect portions detected by the defect detection process into one defect portion when two defect portions satisfy a continuity condition that indicates that the two defect portions are in a predetermined contiguous relationship; The merging process includes a process of merging a first defect portion detected by the defect detection process using a first read image and a second defect portion detected by the defect detection process using a second read image subsequent to the first read image as a single defect portion when the continuity condition is satisfied, wherein the first read image is a read image acquired before the conveying of the object in the conveying direction is stopped and then resumed, and the second read image is a read image acquired after the conveying is resumed.
[0216] This configuration allows for merging of multiple defect portions when multiple portions of a single defect on an object are detected as multiple defect portions. For example, in the example shown in FIGS. 23A and 23B, a fifth band texture image IMrc5 is acquired in S220 (FIG. 6) at the fifth step (NP=5). The fifth band texture image IMrc5 represents a portion of defect FD2. In S235, a defect portion representing a portion of defect FD2 is detected from the fifth band texture image IMrc5 (not shown). In S255, a fifth combined texture image IMrN5 including the fifth band texture image IMrc5 is generated. Since the determination results in S260 and S310 (FIG. 21) are both Yes, the processor 210 executes a process to stop conveyance in S350. This stops conveyance in the conveyance direction Df. In S370, a bounding box BB2a representing defect FD2 in the fifth combined fabric image IMrN5 is formed. The bounding box BB2a is formed by merging multiple bounding boxes, including a bounding box (not shown) detected from the fifth band fabric image IMrc5. After conveyance is stopped, the operator starts automatic conveyance (Su3 in FIG. 22). This restarts conveyance in the conveyance direction Df. In the next step S220 (FIG. 6), a sixth band fabric image IMrc6 (FIG. 23B) is acquired. The sixth band fabric image IMrc6 represents a portion of defect FD2. In S235, a defect portion representing a portion of defect FD2 is detected from the sixth band fabric image IMrc6 (not shown). In S255, a sixth combined fabric image IMrN6 is generated, including the sixth band fabric image IMrc6 and the fifth band fabric image IMrc5. The determination result at S260 is Yes, the determination result at S310 ( FIG. 21 ) is No, and the determination result at S320d is Yes. The processor 210 skips S350 and proceeds to S355. At S370, a bounding box BB2b representing the defect FD2 in the sixth combined texture image IMrN6 is formed. The bounding box BB2b is formed by merging multiple bounding boxes, including a bounding box (not shown) detected from the fifth band texture image IMrc5 and a bounding box (not shown) detected from the sixth band texture image IMrc6.In this way, processor 210 merges a defective portion detected from a read image (e.g., fifth band fabric image IMrc5) acquired before conveying is stopped and a defective portion detected from a read image (e.g., sixth band fabric image IMrc6) acquired after conveying is resumed into a single defective portion if these defective portions satisfy the continuity condition CC.
[0217] After the conveyance in the conveying direction Df is stopped, the fabric 700 may be conveyed in the reverse direction Db before the conveyance in the conveying direction Df is resumed. For example, the worker may convey the fabric 700 in the reverse direction Db to check for defects.
[0218] Here, in a first specific case in which the fabric 700 (or more generally, the object) is returned upstream in the conveying direction Df and then conveyance of the fabric 700 in the conveying direction Df is resumed, the processor 210 may not perform a new defect detection process on a portion of the fabric 700 for which the defect detection process has already been performed. Various methods may be used to determine whether a defect detection process (e.g., the defect detection process S235) has been performed. In each of the above embodiments, as described in S215 ( FIG. 6 ), when a scanned image is provided by the reading module 231, the processor 210 performs the detection process SS (including the defect detection process S235) using the provided scanned image. When a scanned image is not provided by the reading module 231, the processor 210 waits for the provision of a scanned image in S215 without performing the detection process SS. In other words, when a scanned image is provided by the reading module 231, the processor 210 determines that the detection process SS using the provided scanned image has not yet been performed. For example, if a read image is not provided from the reading module 231 while transport is in progress in the transport direction Df, the processor 210 determines that the detection process SS (and thus the defect detection process S235) using the read image at the read relative position Ps has been executed, even if the current relative position is the read relative position Ps.
[0219] In this embodiment, in S150 of FIG. 3 , the processor 210 sets the read completion flag F1 ( FIG. 4 ) of the read relative position Ps where the fabric 700 was read to YES. As described in S130, if the read completion flag F1 associated with the read relative position Ps indicating the current relative position is YES (S130: No), the processor 210 does not read the fabric 700 (S140) or transmit the read image data (S160). As described above, if the read image data is not transmitted, in the process of FIG. 6 , even if the current relative position is the read relative position Ps, the processor 210 determines that the detection process SS (including the defect detection process S235) using the read image at that read relative position Ps has already been executed, and does not execute a new detection process SS. The read relative position Ps (and thus the relative position of the fabric 700) corresponds to a position on the fabric 700 in a direction parallel to the conveyance direction Df. In this way, the flag data D1 is an example of data representing a processed position that is associated with a position in the conveyance direction Df on the fabric 700 of a portion of the fabric 700 that has been subjected to the detection process SS (and thus the defect detection process S235). S150 (FIG. 3) is an example of a process for storing such flag data D1 in the storage device 215 (here, the non-volatile storage device 230).
[0220] The method of determining whether the portion of the fabric 700 represented by the scanned image has already undergone defect detection processing may be various methods other than the method using the flag data D1 ( FIG. 4 ). For example, the processor 210 may refer to the inspection mode MD ( FIG. 8 ). If the inspection mode MD associated with the scanned image is set to the second mode, the processor 210 may determine that the defect detection processing has already been performed on the scanned image. If the inspection mode MD is set to the first mode or is not set, the processor 210 may determine that the defect detection processing has not yet been performed on the scanned image.
[0221] The first specific case in which a new defect detection process is not performed on a portion of the fabric 700 that has already been subjected to the defect detection process may be any of various specific cases in which the fabric 700 is returned to the upstream side in the conveying direction Df and then conveyance of the fabric 700 in the conveying direction Df is resumed. For example, the condition for omitting a new defect detection process on the processed portion may include receiving a user instruction indicating omission.
[0222] It should be noted that various configurations included in the above-mentioned examples or the above-mentioned modifications can also be applied to the above-mentioned aspects 1 to 5.
[0223] Furthermore, when some or all of the functions of the present disclosure are realized by a computer program, the program can be provided in a form stored on a computer-readable recording medium (e.g., a non-transitory recording medium). The program can be used while stored on the same or a different recording medium (computer-readable recording medium) from when it was provided. The "computer-readable recording medium" is not limited to portable recording media such as memory cards and CD-ROMs, but can also include internal storage devices within a computer, such as various ROMs, and external storage devices connected to a computer, such as a hard disk drive.
[0224] The above-described examples and modifications can be combined as appropriate. The above-described examples and modifications are provided to facilitate understanding of the present disclosure and are not intended to limit the present invention. The present invention may be modified or improved without departing from the spirit thereof, and the present invention includes equivalents thereof.
[0225] 111...digital camera, 120...encoder, 130...light source, 200...data processing device, 210...processor, 215...storage device, 220...volatile storage device, 230...non-volatile storage device, 231...reading module, 232...inspection module, 233...UI module, 240...display unit, 250...operation unit, 260...graphics processing unit (GPU), 270...communication interface, 310...object detection model, 700...fabric, 900...conveyor device, 910...first roller, 920...second roller, 980...control panel, 981...first operation unit, 982...second operation unit, 983...third operation unit, 984...fourth operation unit, 990...control device, Pr...first position, Pv...second position
Claims
1. A program that causes a computer to implement: a detection function that sequentially executes a detection process for detecting a defect of an object using each of a plurality of read images obtained by using a reading device configured to sequentially read different parts of the object by transporting the object; and a stop function that, when a defect is detected by the detection process, executes a stop process for stopping the transport of the object after L (L is an integer of 2 or more) specific read images including a first read image that is the read image in which the defect is detected and one or more read images following the first read image are obtained by using the reading device. The detection function executes the detection process using each of M (M is an integer of 2 or more and L or less) target read images including the first read image and one or more read images other than the first read image among the L specific read images.
2. The program according to claim 1, wherein the M target read images include one or more read images following the first read image.
3. The program according to claim 1 or 2, wherein the L specific read images include normal read images that are read images in which no defect is detected by the detection process, and the last read image among the M target read images is the normal read image.
4. The program according to claim 3, wherein the stop function executes the stop process when no defect is detected by the detection process using a read image obtained after the first read image.
5. The program according to claim 1 or 2, wherein the last read image among the M target read images is the last specific read image among the L specific read images.
6. The program according to claim 5, wherein the M target read images include the L specific read images, and causes a computer to implement a function of generating a combined image by combining the L specific read images and a new read image when a defect is detected from each of the L specific read images, the transport of the object is restarted after the transport of the object is stopped by the stop process, and a defect is detected from the new read image obtained by using the reading device.
7. The program according to claim 1 or 2, wherein on the conveyance path of the object, a first position which is the position for reading by the reading device and a second position for visual inspection which is located downstream of the first position are set, and the stop function executes the stop process in a state where the target part corresponding to the first read image among the objects is read by the reading device at the first position and the target part is located at the second position. Program.
8. The program according to claim 1 or 2, wherein the detection process is a defect detection process executed in a specific case, and includes the defect detection process of detecting a defective part which is a part representing a defect among the objects as the defect, and the program further causes a computer to realize a function of executing a merging process of merging the first defective part and the second defective part as one defective part when a continuous condition indicating that the first defective part and the second defective part detected by the defect detection process are in a predetermined continuous relationship is satisfied. Program.
9. The program according to claim 8, further causing a computer to realize a function of executing a combining process of generating a combined image by combining two or more consecutive target read images among the M target read images, and the combining process includes a process of calculating an object center which is the center of the part representing the object at an end of the target read image which is connected to the adjacent target read image, and a process of combining the two target read images in an arrangement of connecting the object centers of the two target read images at the combined part of the two adjacent target read images, and the merging process includes a process of merging the first defective part and the second defective part as one defective part when the first defective part and the second defective part included in the combined image satisfy the continuous condition. Program.
10. The program according to claim 8, further causing a computer to realize a function of executing a combining process for generating a combined image by combining two or more consecutive target read images among the M target read images, wherein the combining process includes: a process of correcting the skew of the region representing the object in the target read image; and a process of combining two adjacent corrected target read images, and the merging process includes a process of merging the first defective portion and the second defective portion as one defective portion when the first defective portion and the second defective portion included in the combined image satisfy the continuity condition. Program.
11. The program according to claim 8, further causing a computer to realize a function of executing a combining process for generating a combined image by combining two or more consecutive target read images among the M target read images, wherein the combining process includes: a process of detecting an object end that is an end of the portion representing the object at an end of the target read image and connected to an adjacent target read image; and a process of combining the two target read images in an arrangement connecting the respective object ends of the two target read images at a combined portion of the two adjacent target read images, and the merging process includes a process of merging the first defective portion and the second defective portion as one defective portion when the first defective portion and the second defective portion included in the combined image satisfy the continuity condition. Program.
12. The program according to claim 8, wherein the defect detection process includes a process of detecting a linear defect portion representing a linear defect as the defective portion, the first defective portion is a first linear defect portion representing a first linear defect, the second defective portion is a second linear defect portion representing a second linear defect, and the continuity condition includes: an angle formed by a direction in which the first linear defect represented by the first linear defect portion extends and a direction in which the second linear defect represented by the second linear defect portion extends is equal to or less than an angle threshold; and a distance between the first linear defect portion and the second linear defect portion is equal to or less than a distance threshold. Program.
13. The program according to claim 8, further causing a computer to realize a function of executing a combining process for generating a combined image by combining two or more consecutive target read images among the M target read images, wherein each of the two or more consecutive target read images includes an image portion common to an adjacent target read image, the combining process includes a process of superimposing the two adjacent target read images so that the image portions common to the two adjacent target read images overlap, and the merging process includes a process of merging the first defective portion and the second defective portion as one defective portion when the first defective portion and the second defective portion included in the combined image satisfy the consecutive condition. Program.
14. The program according to claim 8, further causing a computer to realize a function of causing a display device to display the entire merged defective portion. Program.
15. The program according to claim 1 or 2, wherein the detection process is a defect detection process that is executed in a specific case, and includes the defect detection process of detecting, as the defect, a defective portion that is a portion representing a defect among the objects, the object is a fabric having ears, and the defect detection process detects a defective portion from the remaining portion of the region representing the fabric in the read image excluding the portion representing the ears. Program.
16. The program according to claim 1 or 2, wherein the object is a fabric, and the detection process includes a process of calculating the width of the fabric in the read image, a width detection process of detecting that the width of the fabric is outside an allowable width range as the defect, and a defect detection process of detecting, as the defect, a defective portion that is a portion representing a defect among the objects when the width of the fabric is within the allowable width range. Program.
17. The program according to claim 1 or 2, further causing a computer to realize a function of executing a specific image process using the first read image or an image obtained using the first read image after the stop process. Program.
18. A data processing device, comprising: a detection unit that sequentially executes a detection process for detecting a defect of an object by using each of a plurality of read images obtained by using a reading device configured to sequentially read different portions of the object by transporting the object; and a stop unit that executes a stop process for stopping the transport of the object after L specific read images (L is an integer of 2 or more) including a first read image which is a read image in which a defect is detected by the detection process and one or more read images following the first read image are acquired by using the reading device. The detection unit executes the detection process by using each of M target read images (M is an integer of 2 or more and L or less) including the first read image and one or more read images other than the first read image among the L specific read images. Data processing device.
19. A program, comprising: a function of acquiring a plurality of read images by using a reading device configured to sequentially read different portions of a fabric having ears in a direction perpendicular to the transport direction by transporting the fabric in the transport direction, wherein the reading device is configured to read the entire direction perpendicular to the transport direction of the fabric; a function of detecting P types (P is an integer of 1 or more) of detection objects including the ears of the fabric from the read images; a function of executing one or both of obtaining the width of the fabric and determining the presence or absence of a defect of the fabric when the ears are detected; and a function of executing one or both of stopping the transport of the fabric and notifying that the ears are not detected in a first case which is a specific case where the ears are not detected. Program for realizing on a computer.
20. The program according to claim 19, wherein the P types of detection objects include defects of the fabric, and the function of detecting the P types of detection objects from the read images detects the P types of detection objects including the ears and the defects from the read images by using the same trained machine learning model. Program.
21. The program according to claim 19 or 20, wherein in the first case, it is a case where the ears are not detected from Q consecutive read images (Q is an integer of 2 or more). Program.
Citation Information
Patent Citations
Stop controller for web conveyance line
JP1990038958A
Defect-detecting method and device
JP2000321214A
Fabric inspecting system
JP2003138468A
Method and device for inspecting defect
JP2006275802A
Apparatus and method for inspecting carbon fiber fabric
JP2007291535A
Cited By
Textile fabric defect detection method
CN120876494A
A method of textile defect detection
CN120876494B