Program, and data processing device
By implementing a detection function that skips redundant processes on already inspected areas, the inspection workflow is optimized, reducing burdens and improving efficiency when restarting conveyance after defect detection.
Patent Information
- Application Number
- PCT/JP2024/043553
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-11
- Filing Date
- 2024-12-10
- Publication Date
- 2025-07-17
AI Technical Summary
Existing techniques for inspecting objects, such as fabrics, face challenges in efficiently restarting the conveyance process after stopping due to detected defects, leading to increased processing burdens.
A detection function that skips redundant detection processes on already inspected portions of the object when conveyance is restarted, utilizing a program that executes detection functions only on new areas, reducing processing burdens by optimizing the inspection workflow.
This approach reduces processing burdens by ensuring that detection processes are only executed on new areas, thereby enhancing the efficiency of the inspection process and minimizing redundant operations.
Smart Images

Figure JP2024043553_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 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 when restarting the transport of an object after the transport has been stopped.
[0005] This specification discloses a new technique for resuming the transport of an 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 for detecting defects in an object, using each of the read images acquired using a reading device configured to sequentially read different parts of the object as the object is transported in the transport direction, and in a first specific case in which the transport of the object in the transport direction is resumed after the object is returned upstream in the transport direction, the program does not execute a new detection process on parts of the object on which the detection process has already been executed.
[0008] According to this configuration, in the first specific case where the object is returned upstream in the conveying direction and then conveying of the object in the conveying direction is resumed, a new detection process is not performed on the part of the object on which the detection process has already been performed, thereby reducing the processing burden in the first specific case where conveying is resumed.
[0009] 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.
[0010] 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) shows 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)-(D) 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 diagram showing another example of conveying the fabric 700. A flowchart showing an example of a process including a change of the inspection mode. A diagram showing an example of conveying the fabric 700. A flowchart showing another embodiment of the inspection process. A flowchart showing an example of a process including a change of the inspection mode. A diagram showing an example of conveying the fabric 700. A flowchart showing an example of a process when a second instruction reception event occurs in the UI control process. A diagram showing an example of a warning screen. A flowchart showing another embodiment of a process when a second instruction reception event occurs in the UI control process. A diagram showing an example of a warning screen. A flowchart showing another embodiment of a process when a second instruction reception event occurs in the UI control process.
[0011] 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.
[0012] The data processing device 200 includes a processor 210, a storage device 215, a display unit 240, an operation unit 250, a graphics processing unit 260 (referred to as GPU 260), and a communication interface 270. These elements are connected to each other via a bus. The storage device 215 includes a volatile storage device 220 and a non-volatile storage device 230.
[0013] The processor 210 is a device configured to process data, 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.
[0014] The display unit 240 is a device configured to display images, such as a liquid crystal display or an organic EL display. The operation unit 250 is a device configured to receive 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.
[0015] The GPU 260 is a computing device configured to perform various numerical calculations such as image processing and machine learning. The GPU 260 performs various calculations in accordance with instructions from the processor 210. A driver program (not shown) for controlling the GPU 260 may be provided by the manufacturer of the GPU 260.
[0016] The communication interface 270 is an interface for communicating with other devices (for example, it includes one or more of a USB interface, a wired LAN interface, an IEEE802.11 wireless interface, and an industrial camera interface (for example, CameraLink, CoaXPress, etc.)). In this embodiment, the communication interface 270 is connected to the 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).
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] 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.
[0022] 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).
[0023] 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)).
[0024] 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 .
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] 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.
[0035] 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).
[0036] 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.
[0037] 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.).
[0038] 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.
[0039] 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.
[0040] If the fabric 700 has been read at the current relative position (S130: No), the processor 210 proceeds to S110.
[0041] 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).
[0042] 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.
[0043] 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.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] 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.
[0053] 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)).
[0054] 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.
[0055] 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.
[0056] 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.
[0057] 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.
[0058] 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).
[0059] 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.
[0060] 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.
[0061] 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.
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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.
[0066] 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.
[0067] 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.
[0068] 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).
[0069] 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.
[0070] 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.
[0071] 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.
[0072] 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.
[0073] 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).
[0074] 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.
[0075] 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.
[0076] 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 four events: reception of a combined texture image including the oldest defect-free band texture image (referred to as a normal reception event); reception of a combined texture image including the oldest defect-containing band texture image (referred to as a defect reception event); reception of an instruction to change the inspection mode from the second mode to the first mode (referred to as a first instruction reception event); and reception of an instruction to change the inspection mode from the first mode to the second mode (referred to as a second instruction 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 retrieves the data from the second buffer area BF2. Because the retrieved data does not include data of defect information, which will be described later, the processor 210 determines that a normal reception event has occurred.
[0077] 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(D) 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] 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.
[0085] 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.
[0086] 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.
[0087] 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.
[0088] 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).
[0089] 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.
[0090] 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.
[0091] 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.
[0092] 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.
[0093] If the determination result in S550 is No or if the determination result in S560 is No, the processor 210 proceeds to S575.
[0094] 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).
[0095] 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.
[0096] 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.
[0097] 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).
[0098] 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.
[0099] 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).
[0100] 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.
[0101] 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 proceeding with the process, a button Bt22 for editing information representing the defect, a change button Bt23 for switching the inspection mode to the first mode, and a character 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 character string representing the defect type, and a character string representing the defect length. The defect information DFDq indicating the hole defect FDq does not include the display of the defect length.
[0102] 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.
[0103] If an error in the detection results is found during 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 an instruction to proceed with the process by operating the progress button Bt21. In addition, the worker can input an instruction to change the inspection mode by operating the change button Bt23.
[0104] After S835 (FIG. 12), in S838, the processor 210 determines whether or not an instruction to change the inspection mode has been received. After the conveyance has stopped, the operator may change the inspection mode to the first visual mode in order to visually inspect the fabric 700 (i.e., the operator may operate the change button Bt23). If the change button Bt23 has been operated (S838: Yes), the processor 210 proceeds to S810. Then, the processor 210 determines that a first instruction reception event has occurred. The processing in this case will be described later.
[0105] If the change button Bt23 is not operated (S838: No), in S840 the processor 210 determines whether or not a proceed instruction has been received. If the proceed button Bt21 ( FIG. 13(B) ) is operated (S840: Yes), in S845 the processor 210 sets the window size N to 1. Then, the processor 210 proceeds to S810. If the proceed button Bt21 is not operated (S840: No), the processor 210 proceeds to S838. The following description will be given assuming that the proceed button Bt21 is operated.
[0106] After inputting the proceeding instruction, the worker controls 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.
[0107] 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. When the button Bt1 is operated, the processor 210 determines that a first instruction reception event has occurred in S810 of FIG. 12. In this case, in S852, the processor 210 sets the inspection mode to the first mode. The processor 210 then proceeds to S810. The operator may 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 reading 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 in 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 for a combined texture image to be displayed is generated). The processes of S393 and S395 are the same as the processes of S265 and S270 (FIG. 7A), respectively (data for 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, in S398, 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) to the first mode. After S398, the processor 210 proceeds to S215 (FIG. 6).
[0108] 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.
[0109] 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 change 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 change button Bt32 is operated, the processor 210 sets the inspection mode to the first mode (details will be described later). When button Bt33 is operated, the processor 210 terminates the inspection process.
[0110] After the conveyance is stopped due to the detection of a defect, the worker may convey the fabric 700 in the reverse direction Db to investigate the detected defect. For example, the fabric 700 may have a long defect FD1, such as the defect FD1 in the fifth combined fabric image IMrN5 in FIG. 11(B). In this case, the worker can easily investigate the entire defect FD1 by conveying the fabric 700 in the reverse direction Db.
[0111] A2-3. Another example of conveyance: Fig. 16 is a diagram showing another example of conveyance of the fabric 700. As described above, conveyance of the fabric 700 in the forward direction Df executes the reading process of Fig. 3 and the acquisition inspection process SR starting from S215 of Figs. 6 and 7(A)-7(C). Fig. 16 shows the relationship between the reading inspection processes SGa and SGb, which are processes including the reading process and the acquisition inspection process SR, and the reading relative position Ps, which indicates the current relative position when the reading inspection processes SGa and SGb are executed.
[0112] The figure shows an upstream direction PD1 and a downstream direction PD2 relative to the fabric 700. The upstream direction PD1 is the direction from the current relative position toward an unprocessed portion of the fabric 700. The upstream direction PD1 is the direction in which the current relative position changes due to transport in the transport direction Df. In this embodiment, the upstream direction PD1 is the direction in which the relative position value increases. The downstream direction PD2 is the direction from the current relative position toward a processed portion of the fabric 700. The downstream direction PD2 is the direction in which the current relative position changes due to transport in the reverse direction Db. In this embodiment, the downstream direction PD2 is the direction in which the relative position value decreases.
[0113] In the figure, dotted lines are shown corresponding to a plurality of reading relative positions Ps (here, 200-600). Boxes indicating reading inspection processes SGa and SGb are arranged on the dotted lines of the corresponding reading relative positions Ps. For example, reading inspection process SGa is associated with reading relative position Ps of 500. In S220 (FIG. 6) of reading inspection process SGa, a band fabric image IMrc5 (FIG. 11B) is generated using the read image obtained at reading relative position Ps of 500.
[0114] The reading and inspection process SGa is a reading and inspection process that generates a fifth combined texture image IMrN5 ( FIG. 11B ). Similar to the example of FIG. 11B , in S835 ( FIG. 12 ), the screen DP2 ( FIG. 13B ) is displayed on the display unit 240. In the example of FIG. 16 , in the subsequent Sua, the operator manually transports the defect in the reverse direction Db before operating the proceed button Bt21. In the example of FIG. 16 , the current relative position moves from 500 to a position between 300 and 200. This allows the operator to easily inspect the entire defect FD1. Upon completion of the inspection, the operator operates the proceed button Bt21 ( FIG. 13B ). The determination result of S840 in FIG. 12 is Yes, and the window size N is set to 1 in S845. The operator starts automatic transport by operating the third operation unit 983 ( FIG. 2 ). The processor 210 proceeds with the process in the second mode, which is the current inspection mode.
[0115] In the example of FIG. 16 , the current relative position changes in the order of 300, 400, 500, and 600 as the sheet is conveyed in the forward direction Df. The read flags F1 ( FIG. 4 ) for the read relative positions Ps of 300, 400, and 500 are set to YES. That is, the fabric 700 has been read at these read relative positions Ps ( FIG. 3 : 130: No). Therefore, a new read image is not generated, and the read inspection process is not performed. The read flag F1 for the read relative position Ps of 600 is NO. Therefore, the read inspection process SGb is performed using the new read image. Here, the determination result of S130 ( FIG. 3 ) is YES, the fabric 700 is read at S140, and the determination result of S225 ( FIG. 6 ) is YES.
[0116] The operator may change the inspection mode in various situations. FIG. 17 is a flowchart showing an example of a process including changing the inspection mode. In S710, the inspection process proceeds in the second mode, and in S715, transport is stopped due to the detection of a defect. For example, processes corresponding to process numbers NP 1 to 5 in FIGS. 11(A) and 11(B) proceed. In S835 (FIG. 12) for the fifth step (NP=3), screen DP2 (FIG. 13(B)) is displayed on the display unit 240.
[0117] After a defect is detected, the operator may perform a visual inspection, taking into account the possibility of detecting a new defect. In S720 ( FIG. 17 ), the inspection mode is changed from the second mode to the first mode for visual inspection. The operator operates the change button Bt23 on the screen DP2 ( FIG. 13(B) ). In this case, the determination result in S838 ( FIG. 12 ) is Yes. The processor 210 proceeds to S810 and determines that a first instruction reception event has occurred. In S852, the processor 210 changes the inspection mode to the first mode for visual inspection. Then, the processor 210 proceeds to S810. Note that when changing the inspection mode to the first mode, the processor 210 may set the window size N to 1 or the standard size Nstd.
[0118] In S725 (FIG. 17), the inspection process in the first mode proceeds. Here, the operator manually transports the fabric 700. FIG. 18A is a diagram showing an example of transporting the fabric 700. FIG. 18A shows the relationship between the reading inspection processes SG1-SG4 and the reading relative position Ps, which indicates the current relative position when the reading inspection processes SG1-SG4 are being executed. The reading inspection processes SG1-SG4 are executed in this order.
[0119] In S725 (FIG. 17), the worker manually conveys the fabric 700 in the forward direction Df and visually inspects it. This results in the reading and inspection processes SG1-SG3 (FIG. 18A). In each of the reading and inspection processes SG1-SG3, the determination result in S130 (FIG. 3) is Yes, the fabric 700 is read in S140, and the determination result in S225 (FIG. 6) is No. Furthermore, in each of the reading and inspection processes SG1-SG3, the process in S393 (FIG. 7C) and S825 (FIG. 12) causes the screen DP3 in FIG. 13C to be displayed on the display unit 240. If a defect is detected visually, the worker operates the button Bt31 to input information indicating the detected defect into the data processing device 200. The processor 210 adds the input information to the result data D2 (FIG. 8).
[0120] After the visual inspection, the operator may change the inspection mode to a second mode for automatic inspection. Here, the operator may convey the fabric 700 in the reverse direction Db and then change the inspection mode. For example, the operator may convey the fabric 700 in the reverse direction Db to review any defects detected visually. Furthermore, even if no defects are detected, the operator may convey the fabric 700 in the reverse direction Db so as to prevent a gap from occurring between the portion of the fabric 700 that has been visually inspected and the portion to be automatically inspected.
[0121] In S730 (FIG. 17), the worker manually transports the sheet in the reverse direction Db. In the example of FIG. 18(A), the current relative position has moved from 800 to a position before 600. In S735, the worker operates the change button Bt32 (FIG. 13(C)). When the change button Bt32 is operated, the processor 210 determines in S810 (FIG. 12) that a second instruction reception event has occurred. In S862, the processor 210 sets the inspection mode to the second mode. In S890, the processor 210 displays an input screen on the display unit 240 and accepts instructions on how to process the inspected portion.
[0122] 13(D) is a diagram showing an example of an input screen. The input screen DP4 displays a message Msg4, a first button Bt41, and a second button Bt42. The message Msg4 prompts the user to input an instruction as to whether or not to re-inspect the inspected portion by automatic inspection. The first button Bt41 is a button for performing a re-inspection, and the second button Bt42 is a button for not performing a re-inspection.
[0123] In S892 (FIG. 12), the processor 210 determines whether the input instruction indicates execution of a retest. If the second button Bt42 is operated (S892: No), in S960, 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 third operation unit 983 (FIG. 2). In S740 (FIG. 17), the processor 210 proceeds with processing in the second mode for automatic inspection. In the example of FIG. 18(A), transport in the forward direction Df causes the current relative position to change in the order 600, 700, 800, and 900. Here, the read-completed flags F1 (FIG. 4) for the read relative positions Ps of 600, 700, and 800 are set to YES by the read inspection processes SG1-SG3. That is, the fabric 700 has already been read at these reading relative positions Ps (FIG. 3: S130: No). Therefore, a new read image is not generated, and the reading inspection process is not executed. At the reading relative position Ps of 900, the read completion flag F1 is NO. Therefore, the reading inspection process SG4 is executed using the new read image. Here, the determination result of S130 is Yes, the fabric 700 is read at S140, and the determination result of S225 (FIG. 6) is Yes.
[0124] In S890 (FIG. 12), the operator may operate the first button Bt41 (FIG. 13(D)). FIG. 18(B) is a diagram illustrating an example of the transport of the fabric 700 when the first button Bt41 is operated. The processes of S710-S725 in FIG. 17 are the same as those in the example of FIG. 18(A). The reading and inspection processes SG1-SG3 in FIG. 18(B) are the same as the reading and inspection processes SG1-SG3 in FIG. 18(A), respectively. In S730 (FIG. 17) after the reading and inspection process SG3, the current relative position moves from 800 to a position between 700 and 600. In S735 (FIG. 17), the operator operates the change button Bt32 (FIG. 13(C)). In S810 (FIG. 12), the processor 210 determines that a second instruction reception event has occurred. As a result, S862 and S890 are executed, and the input screen DP4 (FIG. 13D) is displayed on the display unit 240.
[0125] If the first button Bt41 ( FIG. 13(D)) is operated ( FIG. 12 : S892: Yes), in S950, the processor 210 deletes the set data after the current relative position from the flag data D1 ( FIG. 4 ), result data D2 ( FIG. 8 ), and merged data D3 ( FIG. 1). In this embodiment, the processor 210 sets the read flag F1 of all read relative positions Ps after the current relative position in the flag data D1 to NO. The processor 210 deletes the data associated with read relative positions Ps after the current relative position from the result data D2. The processor 210 deletes the data associated with read relative positions Ps after the current relative position from the merged data D3. Then, in S960, the processor 210 sets the window size N to 1, and proceeds to S810.
[0126] The operator starts automatic transport by operating the third operation unit 983 (FIG. 2). In S740 (FIG. 17), the processor 210 proceeds with processing in the second mode for automatic inspection. In the example of FIG. 18(B), transport in the forward direction Df causes the current relative position to change in the order of 700, 800, and 900. The reading relative positions Ps of 700 and 800 have already been processed in the first mode (reading inspection processes SG2 and SG3). However, the read completion flag F1 (FIG. 4) for the reading relative positions Ps of 700 and 800 was set to NO in S950 (FIG. 12). As a result, reading inspection processes SG4b, SG5b, and SG6b corresponding to the reading relative positions Ps of 700, 800, and 900 are performed. Here, the determination result in S130 is Yes, the fabric 700 is read in S140, and the determination result in S225 (FIG. 6) is Yes.
[0127] 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, an example of an object, as the fabric 700 is conveyed in the conveying direction Df. The processor 210 executes the following processes in accordance with the program (modules 231-233). In steps S235, S245, and S250 (FIG. 6), the processor 210 executes a detection process to detect defects in the fabric 700 (the processes in steps 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 the multiple scanned images (here, multiple band fabric images IMrc) acquired using the digital cameras 111-114. In the example of FIG. 16, at Sua, the fabric 700 is returned upstream in the conveying direction Df (i.e., toward the reverse direction Db) (FIG. 17: S730). After the fabric 700 is returned, conveyance of the fabric 700 in the conveying direction Df is resumed ( FIG. 17 : S740). In this manner, in a specific case (referred to as the first specific case) in which conveyance of the fabric 700 in the conveying direction Df is resumed after the fabric 700 is returned upstream in the conveying direction Df, the processor 210 does not execute a new detection process SS on the portion of the fabric 700 for which the detection process SS has already been executed (here, the portion corresponding to the reading relative positions Ps of 300, 400, and 500). With this configuration, execution of a new detection process SS for the portion of the fabric 700 for which the detection process SS has already been executed is omitted, thereby reducing the processing burden when conveyance is resumed.
[0128] Various methods may be used to determine whether the detection process SS has been executed. In this embodiment, as described in S215 ( FIG. 6 ), when a scanned image is provided by the reading module 231, the processor 210 executes the detection process SS using the provided scanned image. If 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 executing the detection process SS. That is, 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 been executed. As described in FIG. 16 , when a scanned image is not provided by the reading module 231 during the progress of conveyance in the conveying direction Df, the processor 210 determines that the detection process SS using the scanned image at the scanning relative position Ps has been executed, even if the current relative position is the scanning relative position Ps.
[0129] 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 does not execute a new detection process SS, since the detection process SS using the read image at that read relative position Ps has already been executed (for example, the read relative positions Ps of 300, 400, and 500 in FIG. 16). The reading 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 on the fabric 700 in the conveyance direction Df of a portion of the fabric 700 for which the detection process SS has been executed. 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).
[0130] 16 , in a first specific case where the fabric 700 is returned to the opposite direction Db of the conveying direction Df and then conveyance of the fabric 700 in the conveying direction Df is resumed, no read images are provided at the reading relative positions Ps of 300, 400, and 500, but a read image is provided at the reading relative position Ps of 600. In this way, the processor 210 does not execute the detection process SS at the reading relative positions Ps of 300, 400, and 500, but resumes the detection process SS at the reading relative position Ps of 600. The reading relative position Ps of 600 is the next reading relative position Ps after the processed position (reading relative position Ps of 500) on the most upstream side (i.e., on the upstream direction PD1 side) in the conveying direction Df when viewed from the relative position where conveyance is resumed (here, between 300 and 200). The read image associated with the relative reading position Ps (relative reading position Ps of 600) where the detection process SS is resumed represents a portion of the fabric 700 upstream of the most upstream processed position (relative reading position Ps of 500). Therefore, the processor 210 can appropriately execute the detection process SS while reducing the processing load for the first specific case.
[0131] In this embodiment, the detection process SS ( FIG. 6 ) includes a process of S235. The process of 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 of 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 of S370 will also be referred to as merging process S370). As shown in FIG. 14 , the processor 210 merges the first and second defect portions into a single defect portion (e.g., the first and second bounding boxes BBa and BBb in FIG. 15D are merged to form a bounding box BBab). 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 contiguous relationship if they may represent different portions of the same defect. The contiguous condition CC may be various conditions for such a determination. 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.
[0132] 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 and mask MD1 representing the defect FD in FIG. 5D). The merging process S370 (FIG. 7B) includes a process for merging two linear defect portions into a single defect portion (e.g., the bounding boxes BBa and BBb representing the defects FDa and FDb in FIG. 15A are merged into a single bounding box BBab). As described with reference to FIG. 14, in this embodiment, the continuity condition CC includes a condition where both the determination results in S550 and S560 are Yes. 15(C), the condition of S560 is that the angle Ad formed by the respective extension directions of two linear defects represented by two linear defect portions is equal to or less than the angle threshold Adth (the angle Ad formed by the respective extension directions DDa and DDb of two linear defects FDa and FDb represented by two linear defect portions BBa and BBb is an example of the angle Ad). The condition of S550 is that the distance DBb between the two linear defect portions is equal to or less than the first threshold Th1 (the distance DBb between the bounding boxes BBa and 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.
[0133] In this embodiment, in S852 and S862 of FIG. 12 , the processor 210 selects a mode from multiple modes, including a first mode and a second mode, in accordance with a user instruction. As shown in S225 of FIG. 6 and FIG. 7C , if the inspection mode is the first mode (S225: No), the processor 210 does not execute the detection process SS. As shown in S225, S235, S245, and S250 of FIG. 6 , if the inspection mode is the second mode (S225: Yes), the processor 210 executes the detection process SS. As shown in FIG. 12 , if the inspection mode is changed from the first mode to the second mode (S862) and the determination result in S892 is Yes, the processor 210 executes S950. In S950, the processor 210 sets the read flags F1 of all read relative positions Ps following the current relative position of the flag data D1 to NO. In the example of FIG. 18(B), the read completion flag F1 corresponding to the read relative position Ps (700, 800) processed in the first mode (visually inspected in this embodiment) is set to NO. The read relative position Ps processed in the first mode indicates a read relative position Ps not yet inspected by the detection process SS. The processor 210 executes read inspection processes SG4b and SG5b corresponding to the read relative position Ps not yet inspected by the detection process SS. The read inspection processes SG4b and SG5b include a detection process SS that uses a read image representing a portion of the fabric 700 not yet inspected by the detection process SS. In this way, the processor 210 can provide the user with multiple modes, including a first mode in which the detection process SS is not executed and a second mode in which the detection process SS is executed. Furthermore, in the specific case where the inspection mode is changed from the first mode to the second mode (in this embodiment, when the judgment result of S892 is Yes), the processor 210 can inspect the portion of the fabric 700 that has been processed in the first mode but has not been inspected by the detection process SS by the detection process SS.
[0134] B. Second Embodiment: After processing in the first mode, the inspection mode may be changed from the first mode to the second mode. In this embodiment, when the inspection mode is changed in this manner, the inspection process and UI control process are configured so that the results of the automatic inspection can be used without having to re-inspect the parts inspected in the first mode by automatic inspection.
[0135] FIG. 19 is a flowchart illustrating another embodiment of the inspection process. The only difference from the inspection process of FIGS. 6 and 7(A)-7(C) is that S225 has been deleted and, instead, S257 has been added between S255 and S260. In this embodiment, the processor 210 proceeds from S220 to S235 regardless of the inspection mode, and executes the processes of S235-S255. After S255, in S257, the processor 210 determines whether the inspection mode is the second mode. If the inspection mode is the second mode (S257: Yes), the processor 210 proceeds to S260. The processes from S260 onward are the same as the corresponding processes in FIGS. 6 and 7(A)-7(C). If the inspection mode is the first mode (S257: No), the processor 210 executes the process of FIG. 7(C), just as if the determination result of S225 in FIG. 6 was No.
[0136] When the inspection mode is the first mode, in addition to the visual inspection by the operator, automatic inspection is performed by the data processing device 200 in S235-S255. However, in S250, the processor 210 sets the inspection mode MD to the first mode rather than the second mode. The operator can also edit the result data D2 and merged data D3 based on the visual inspection results by operating button Bt31 in FIG. 13(C). The processor 210 records both the results of the operator's inspection (i.e., the results of the first mode) and the results of S235-S255 (i.e., the results of the second mode) in the data D2 and D3. For example, the box information BB may represent the bounding box added by the operator and the bounding box detected in S235. The results of the automatic inspection may be used when the inspection mode is changed from the first mode to the second mode. In this embodiment, the process of the UI control process (FIG. 12) when a second instruction reception event occurs is different from the process of FIG. 12 (details will be described later).
[0137] FIG. 20 is a flowchart showing an example of processing including a change in inspection mode. The only differences from the processing example of FIG. 17 are that S725 is replaced with S725c and S730 is omitted. FIG. 21 is a diagram showing an example of conveyance of fabric 700. Reading inspection processes SG1c-SG3c, like the reading inspection processes SG1-SG3 of FIG. 18A, show reading inspection processes in the first mode at reading relative positions Ps of 600, 700, and 800. Unlike the example of FIG. 18A, reading inspection processes SG1c-SG3c also perform automatic inspection processes S235-S255. Reading inspection process SG4 is the same as reading inspection process SG4 of FIG. 18A. The process between the reading inspection process SG3c and the reading inspection process SG4 is different from the process between the reading inspection process SG3 and the reading inspection process SG4 in FIG. 18A.
[0138] The processes of S710-S720 in Fig. 20 are the same as the processes of S710-S720 in Fig. 17. In S725c, reading inspection processes SG1c-SG3c (Fig. 21) are performed. The difference from S725 in Fig. 17 is that the automatic inspection processes of S235-S255 (Fig. 19) are also performed.
[0139] In the processing example of Fig. 20, after visual inspection (S725c), the operator changes the inspection mode to the second mode for automatic inspection without conveying the fabric 700 in the reverse direction Db (S735). In the example of Fig. 21, in S825 (Fig. 12) of the reading inspection process SG3, the screen DP3 (Fig. 13(C)) is displayed. The operator operates the change button Bt32 (S735 (Figs. 20 and 21)). In S810 (Fig. 12), the processor 210 determines that a second instruction reception event has occurred.
[0140] Fig. 22 is a flowchart showing an example of the processing when a second instruction reception event occurs in the UI control processing. In this embodiment, the processing (S863-S883) in Fig. 22 is added between S862 and S890 in the UI control processing in Fig. 12. The other parts of the processing in the UI control processing are the same as the corresponding parts in Fig. 12.
[0141] After S862, in S863, the processor 210 references the result data D2 ( FIG. 8 ) and determines whether a first-mode inspection mode MD is recorded in the first downstream range (including the current relative position), which is the range of reading relative positions Ps downstream from the current relative position (i.e., toward the downstream direction PD2). In this embodiment, the processor 210 determines whether K inspection modes MD corresponding to K consecutive reading relative positions Ps (K is an integer greater than or equal to 1), including the reading relative position Ps closest to the current relative position within the first downstream range, are set to the first mode. The multiple consecutive reading relative positions Ps indicate multiple reading relative positions Ps arranged in conveyance order without missing any reading relative positions Ps. The processor 210 determines that the condition of S863 is met if the maximum number K is 1 or greater. For example, the processor 210 may determine that the condition of S863 is met if the inspection mode MD for the closest reading relative position Ps is the first mode. If the determination result in S863 is No, the processor 210 proceeds to S890 (FIG. 21). The processing from S890 onwards is the same as the processing in the embodiment of FIG.
[0142] In the example of FIG. 21 , the current relative position is 800. In this case, the first downstream range is the range below 800. The reading relative position Ps closest to the current relative position within the first downstream range is 800. The processor 210 references the inspection modes MD associated with the reading relative positions Ps in the order of 800, 700, and 600. At the reading relative positions Ps of 800, 700, and 600, the reading inspection process SG3c-SG1c in the first mode has been executed, and the inspection mode MD is the first mode. The inspection mode MD of the reading relative position Ps (here, 800) closest to the current relative position is the first mode, and the determination result in S863 ( FIG. 22 ) is Yes. In this case, in S867, the processor 210 displays a warning.
[0143] 23 shows an example of the warning screen displayed in S867. The warning screen DP5 includes a message Msg5, a first button Bt51, and a second button Bt52. The message Msg5 indicates that first-mode (visual inspection) data is recorded downstream (i.e., downstream in the PD2 direction) and prompts the user to input an instruction indicating whether or not to replace the first-mode data on the downstream side with second-mode (automated inspection) data. The first button Bt51 is used to perform the replacement, and the second button Bt52 is used to cancel the replacement.
[0144] In S870 (FIG. 22), the processor 210 receives an instruction for a processing method. In S873, the processor 210 determines whether the input instruction indicates execution of a replacement. If the second button Bt52 is operated (S873: No), the processor 210 proceeds to S890.
[0145] If the first button Bt51 is operated (S873: Yes), in S877, the processor 210 deletes the first-mode data downstream from the current relative position (i.e., in the downstream direction PD2). In this embodiment, the processor 210 selects the range of first-mode reading relative positions Ps contiguous with the current relative position, detected in S863, as the processing range. In other words, the processing range is the range of reading relative positions Ps processed in the first mode. In the example of FIG. 21, the processing range is the range 800-600. The processor 210 deletes data associated with the first mode within the processing range from the resultant data D2 (FIG. 8) and the merged data D3. For example, the processor 210 deletes data associated with the first mode within the processing range from the resultant data D2 (e.g., data in box information BB). The processor 210 deletes data associated with the first mode within the processing range from the merged data D3.
[0146] In S880 (FIG. 22), the processor 210 switches the data within the processing range of the result data D2 and the merged data D3 to data that can be associated with the second mode. For example, the band mask image IMmc, box information BB, width Wf, inspection mode MD, and defect flag F2 within the processing range of the result data D2 (FIG. 8) are set to the data recorded in S235-S250 (FIG. 19). The inspection mode MD is set to the second mode. The data within the processing range of the merged data D3 is set to the data recorded in S255 (FIG. 19). After S880, the processor 210 proceeds to S890.
[0147] In the example of FIG. 21, the operator operates the first button Bt51 in FIG. 23 (S873: Yes). In S877 and S880, the processor 210 switches the data associated with the reading relative positions Ps of 800, 700, and 600 of the result data D2 and merged data D3 to the second mode data. Thereafter, the processor 210 proceeds to S890 (FIG. 12). The processing of S890-S960 is the same as the processing of the above embodiment. In S960, the processor 210 sets the window size N to 1 and proceeds to S810.
[0148] The operator starts automatic transport by operating the third operation unit 983 (FIG. 2). In S740 (FIG. 20), the processor 210 proceeds with processing in the second mode for automatic inspection. In the example of FIG. 21, transport in the forward direction Df causes the current relative position to change from 800 to 900. At the reading relative position Ps of 900, the read completion flag F1 is NO. Therefore, a new read image is used to execute the reading inspection process SG4. Here, the determination result in S130 is Yes, the fabric 700 is read in S140, and the determination result in S225 (FIG. 6) is Yes.
[0149] As described above, in this embodiment, in S852 and S862 of FIG. 12 , the processor 210 selects a mode from multiple modes, including a first mode and a second mode, in accordance with a user instruction. In the first mode of this embodiment, the results of the detection process SS are not used in the inspection process ( FIG. 19 : S257: No, FIG. 7(C)). The first mode of this embodiment is an example of a first mode in which the results of the detection process SS are not required. In the second mode of this embodiment, the results of the detection process SS are used in the inspection process ( FIG. 19 : S257: Yes, S260, FIGS. 7(A) and 7(B)). The second mode of this embodiment is an example of a second mode in which the results of the detection process are required.
[0150] 19, the processor 210 executes a detection process SS (S235, S245, S250) when the inspection mode is the first mode and when the inspection mode is the second mode, and executes a process (S250) of storing data representing the result of the detection process SS in the storage device 215. In this embodiment, the result of the detection process SS is represented by result data D2 stored in the non-volatile storage device 230.
[0151] When the inspection mode is changed from the first mode to the second mode (S862 ( FIG. 12 ), S735 ( FIG. 20 )), the processor 210 executes the processing of FIG. 22 following S862 of FIG. 12 . In S877, the processor 210 deletes data associated with the first mode within the processing target range from the result data D2. The processing target range is the range of reading relative positions Ps processed in the first mode. In this embodiment, the processing target range is a range continuing downstream from the current relative position (i.e., toward the downstream direction PD2). The reading relative positions Ps of 600, 700, and 800 in FIG. 21 are examples of the processing target range. In S880, the processor 210 switches the data within the processing target range from the result data D2 to data associated with the second mode. That is, the processor 210 uses the result of the detection process SS executed in the first mode as the result of the detection process SS for the portion of the fabric 700 processed in the first mode.
[0152] In this way, in a specific case where the inspection mode is changed from the first mode to the second mode (here, S863: Yes and S873: Yes in FIG. 22 ), the processor 210 uses the result of the detection process SS executed in the first mode as the result of the detection process SS for the portion of the fabric 700 that has been processed in the first mode. According to this configuration, the processor 210 can use the result of the detection process SS for the portion that has been processed in the first mode without transporting the fabric 700 in the reverse direction Db.
[0153] Furthermore, in this embodiment, the reading process ( FIG. 3 ) is the same as the reading process in the first embodiment. The inspection process ( FIG. 19 , FIGS. 7(A)-7(C)) is the same as the inspection process in the first embodiment ( FIG. 6 , FIGS. 7(A)-7(C)) except for the deletion of S225 and the addition of S257. The UI control process is the UI control process ( FIG. 12 ) in the first embodiment with the addition of the process in FIG. 22. As such, in this embodiment, the processor 210 executes various processes similar to those in the first embodiment. For example, the processor 210 may execute processes similar to those in FIGS. 11(A), 11(B), 16, 18(A), and 18(B) for the portion of the fabric 700 upstream from the current relative position (i.e., in the upstream direction PD1). As such, this embodiment can provide the same various advantages as those provided by the first embodiment.
[0154] C. Third Embodiment: Figure 24 is a flowchart showing another embodiment of the processing when a second instruction reception event occurs in the UI control processing. In this embodiment, the processing of Figure 23 (S910-S935) is added between S892 and S950 of the UI control processing of Figure 12. The other parts of the processing of the UI control processing are the same as the corresponding parts of the processing of Figure 12.
[0155] In this embodiment, when the inspection mode is changed from the first mode to the second mode, the processor 210 determines whether the inspection mode MD for the first mode is recorded downstream (i.e., toward the downstream direction PD2) from the current relative position, as in S863 of FIG. 22 . If the inspection mode MD for the first mode is recorded, the processor 210 outputs a warning. For example, in the example of FIG. 18(B) , the inspection mode is changed from the first mode to the second mode in S735. The current relative position is between 700 and 600. At the reading relative position Ps of 600 downstream of the current relative position, the reading inspection process SG1 in the first mode has been executed, and the inspection mode MD is the first mode. Such a downstream reading relative position Ps for the first mode may be a position where the detection process in the second mode is desired. For example, the conveyance in the reverse direction Db (S730) before the change of the inspection mode (S735) may be performed to re-inspect in the second mode the portion of the fabric 700 that has been processed in the first mode. When the conveyance amount in the reverse direction Db is insufficient, the inspection mode MD at the downstream reading relative position Ps may be the first mode.
[0156] In the example of FIG. 18(B), a second instruction reception event occurs in S735. When a second instruction reception event occurs, the processor 210 executes S862-S892 of FIG. 12. When the instruction input in S890 does not indicate execution of a retest (S892: No), the processor 210 sets the window size N to 1 in S960 and proceeds to S810. The processing in this case is the same as the processing in the embodiment of FIG. 12. For example, at the reading relative positions Ps that have been processed in the first mode, such as the reading relative positions Ps of 600, 700, and 800 in the example of FIG. 18(A), the reading inspection processing is omitted.
[0157] If the instruction input in S890 (FIG. 12) indicates execution of a retest (S892: Yes), in S910 (FIG. 24), the processor 210 determines whether an inspection mode MD of the first mode is recorded downstream of the current relative position (i.e., toward the downstream direction PD2) or not. In S910, the processor 210 determines whether an inspection mode MD of the first mode is recorded in a second downstream range (excluding the current relative position), which is a range of reading relative positions Ps downstream of the current relative position. The difference from the determination method in S863 (FIG. 22) is that the second downstream range does not include the current relative position, unlike the first downstream range referenced in S863. The processor 210 determines whether L inspection modes MD corresponding to L consecutive reading relative positions Ps (L is an integer greater than or equal to 1) including the reading relative position Ps closest to the current relative position within the second downstream range are set to the first mode. If the maximum number L is equal to or greater than 1, the processor 210 determines that the result of the determination in S910 is Yes. For example, the processor 210 may determine that the condition in S910 is satisfied if the inspection mode MD of the closest reading relative position Ps is the first mode. If the result of the determination in S910 is No, the processor 210 proceeds to S950 ( FIG. 12 ). The processing following S950 is the same as the processing in the embodiment of FIG. 12 .
[0158] In the example of FIG. 18B , the current relative position at the time of the change of inspection mode (S735) is between 700 and 600. The reading relative position Ps closest to the current relative position within the second downstream range downstream of the current relative position (i.e., toward the downstream direction PD2) is 600. At the reading relative position Ps of 600, the reading inspection process SG1 in the first mode has been executed, and the inspection mode MD is the first mode. Therefore, the determination result in S910 is Yes. In this case, in S915, the processor 210 displays a warning.
[0159] 25 is a diagram showing an example of a warning screen displayed in S915. The warning screen DP6 includes a message Msg6, a first button Bt61, and a second button Bt62. The message Msg6 indicates that data in the first mode (visual inspection) is recorded on the downstream side (i.e., the downstream direction PD2 side) and prompts the user to input an instruction indicating whether or not to perform transport in the reverse direction Db. The first button Bt61 is a button for performing transport in the reverse direction Db, and the second button Bt62 is a button for not performing transport in the reverse direction Db.
[0160] In S920 (FIG. 24), the processor 210 receives an instruction for a processing method. In S925, the processor 210 determines whether the input instruction indicates the execution of transport in the reverse direction Db. If the second button Bt62 is operated (S925: No), the processor 210 proceeds to S950.
[0161] If the first button Bt61 is operated (S925: Yes), the operator operates the control panel 980 (FIG. 2) to transport the fabric 700 in the reverse direction Db (Su1). In this embodiment, the operator transports the fabric 700 until the current relative position becomes the starting position (i.e., the first relative reading position Ps) of the L consecutive reading positions Ps (inspection mode MD = first mode) described in S910. For example, when the inspection mode is changed in S735 of FIG. 18(B), the L consecutive reading relative positions Ps becomes one relative reading position Ps (600). The starting position, i.e., the first relative reading position Ps, is 600. The operator transports the fabric 700 in the reverse direction Db until the current relative position becomes 600.
[0162] In S935 (FIG. 24), the processor 210 determines whether the inspection mode MD of the first mode is recorded downstream of the current relative position (i.e., toward the downstream direction PD2). The determination method in S935 is the same as the determination method in S910. If the determination result in S910 is Yes, the processor 210 repeats S935 until the determination result changes to No. As described above, as the transport (Su1) in the reverse direction Db progresses, the current relative position moves to the start position of L consecutive reading relative positions Ps (inspection mode MD = first mode). As a result, the determination result in S935 becomes No. The processor 210 then proceeds to S950.
[0163] The processing from S950 onwards is the same as the processing in the embodiment of Fig. 12. The operator starts automatic transport by operating the third operation unit 983 (Fig. 2). The processor 210 executes the inspection processing in the second mode at each reading relative position Ps, as in the reading inspection processing SG4b-SG6b in Fig. 18(B).
[0164] As described above, in this embodiment, similar to the first embodiment, the processor 210 can provide the user with multiple modes, including a first mode in which the detection process SS is not performed and a second mode in which the detection process SS is performed. In this embodiment, the process of FIG. 24 is executed between S892 and S950 of FIG. 12 . When the inspection mode is changed from the first mode to the second mode ( S862 of FIG. 12 ), the determination result of S892 ( FIG. 12 ) is Yes, and the determination results of S910 and S925 ( FIG. 24 ) are Yes, the operator conveys the fabric 700 in the reverse direction Db ( Su1 of FIG. 24 ). The processor 210 also executes S950 of FIG. 12 . As described above, similar to the first embodiment, the processor 210 executes the detection process SS using a scanned image representing a portion of the fabric 700 that has been processed in the first mode but has not yet been inspected by the detection process SS. In this way, in the specific case where the inspection mode is changed from the first mode to the second mode (in this embodiment, S892: Yes, S910: Yes, S925: Yes), the processor 210 can inspect the portions of the fabric 700 that have been processed in the first mode but have not yet been inspected by the detection process SS.
[0165] In this embodiment, as described with reference to FIG. 2, a first position Pr is 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 data. In this embodiment, when the inspection mode is changed from the first mode to the second mode (FIG. 12: S862), the determination result in S892 is Yes, and the determination result in S910 (FIG. 24) is Yes, the processor 210 displays a warning in S915. The condition in S910 is that L inspection modes MD corresponding to L consecutive read relative positions Ps (L is an integer equal to or greater than 1) including the read relative position Ps closest to the current relative position downstream of the current relative position (i.e., toward the downstream direction PD2) are set to the first mode. When the inspection mode is changed in S735 of FIG. 18B , the L consecutive relative reading positions Ps are one relative reading position Ps (600). The relative reading position Ps, and therefore the relative position of the fabric 700, indicates a position on the fabric 700 that indicates a portion located at the first position Pr ( FIG. 2 ). Therefore, the condition in S910 indicates that a portion of the fabric 700 that has been processed in the first mode but has not yet been inspected in the detection process SS is located downstream of the first position Pr (i.e., in the conveying direction Df). In this specific case where the inspection mode is changed from the first mode to the second mode and the uninspected portion is located downstream of the first position Pr (in this embodiment, S892: Yes and S910: Yes), the processor 210 outputs a warning in S915 (in this embodiment, a warning screen DP6 ( FIG. 25 ) is displayed on the display unit 240). By outputting such a warning, the processor 210 can notify the operator that the transport amount of the fabric 700 transported in the reverse direction Db is insufficient.
[0166] Furthermore, in this embodiment, the reading process (FIG. 3) and the inspection process (FIGS. 6, 7A-7C) are the same as those in the first embodiment. The UI control process is the same as that in FIG. 12, except that the processes in FIG. 23 (S910-S935) are added between S892 and S950 in FIG. 12. As such, in this embodiment, the processor 210 executes various processes similar to those in the first embodiment. For example, the processor 210 may execute processes similar to those in FIGS. 11A, 11B, 16, 18A, and 18B for the portion of the fabric 700 upstream from the current relative position (i.e., the upstream direction PD1 side). As such, this embodiment can provide the same various advantages as those provided by the first embodiment. Note that this embodiment may be applied to the second embodiment described above.
[0167] D. Fourth Embodiment: FIG. 26 is a flowchart illustrating another embodiment of the UI control processing when a second instruction reception event occurs. The only difference from the UI control processing of FIG. 24 is that, if the determination result of S925 is Yes, S930d (FIG. 26) is executed instead of Su1 and S935 (FIG. 24). Unlike the embodiment of FIG. 24, in S930d, the processor 210 conveys the fabric 700 in the reverse direction Db. In this embodiment, the processor 210 conveys the fabric 700 in the reverse direction Db until the condition described in S910 of FIG. 24 is no longer satisfied. As a result, the current relative position moves to the start position (i.e., the first read relative position Ps) of the L consecutive read relative positions Ps (inspection mode MD = first mode) described in S910. For example, if S930d is executed instead of S730 of FIG. 18(B), the current relative position is 800. The L consecutive relative reading positions Ps are three relative reading positions Ps (800, 700, 600). The starting position, i.e., the first relative reading position Ps, is 600. Therefore, the processor 210 transports the fabric 700 in the reverse direction Db so that the current relative position becomes 600. With this transport, the portions of the fabric 700 corresponding to the relative reading positions Ps of 800, 700, and 600 move to the first position Pr ( FIG. 2 ) or a position upstream of the first position Pr in the transport direction Df. The portions of the fabric 700 corresponding to the relative reading positions Ps of 800, 700, and 600 are portions of the fabric 700 that have been processed in the first mode but have not yet been inspected in the detection process SS. After S930d, the processor 210 proceeds to S950 ( FIG. 12 ).
[0168] The processing from S950 onwards is the same as the processing in the embodiment of Fig. 12. The operator starts automatic transport by operating the third operation unit 983 (Fig. 2). The processor 210 executes the inspection processing in the second mode at each reading relative position Ps, as in the reading inspection processing SG4b-SG6b in Fig. 18(B).
[0169] As described above, in this embodiment, Su1 and S935 in the embodiment of Fig. 24 are replaced with S930d. When the inspection mode is changed from the first mode to the second mode (Fig. 12: S862), the determination result of S892 (Fig. 12) is Yes, and the determination results of S910 and S925 (Fig. 24) are Yes, the processor 210 conveys the fabric 700 in the reverse direction Db in S930d (Fig. 26). As described above, the condition of S910 indicates that the portion of the fabric 700 that has been processed in the first mode but has not yet been inspected by the detection process SS is located downstream of the first position Pr (i.e., in the conveying direction Df). In this way, in a specific case where the inspection mode is changed from the first mode to the second mode and the uninspected portion is located downstream of the first position Pr (in this embodiment, S892: Yes, S910: Yes, S925: Yes), the processor 210 conveys the fabric 700 upstream in the conveying direction Df (i.e., the reverse direction Db) in S930d. The processor 210 moves the uninspected portion to the first position Pr or a position upstream of the first position Pr in the conveying direction Df. As a result, the processor 210 can eliminate the need for the operator to convey the fabric in the reverse direction Db. Furthermore, the processor 210 can inspect, by the detection process SS, portions of the fabric 700 that have been processed in the first mode but have not yet been inspected by the detection process SS.
[0170] E. Modifications: (1) In each of the above embodiments, the processor 210 (FIG. 1) executes the following processing in accordance with the program (inspection module 232). As shown in FIG. 6 , the processor 210 executes a detection process SS (including S235, S245, and S250) which is a process for detecting defects in the fabric 700 using a scanned image of the fabric 700 (here, the band fabric image IMrc ( FIG. 5(B) )). If a defect is detected by the detection process SS, the processor 210 executes a stop process at S350 in FIG. 7(B) 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 for executing the stop process S350 may be various conditions including the detection of a defect by the detection process. For example, the condition for S260 may be that the latest band fabric image has a defect, i.e., that a defect is detected by the detection process SS from the band fabric image newly acquired in S220. In this way, the processor 210 may execute the stop process S350 in various specific cases in which a defect is detected by the detection process.
[0171] 3 and the flag data D1 (FIG. 4) may be omitted. That is, if the determination result in S120 is Yes, the processor 210 may execute S140 and S160. In this manner, when the current relative position passes the reading relative position Ps, the processor 210 may execute reading of the fabric 700 (FIG. 3: S140), regardless of whether the fabric 700 has already been read at the same reading relative position Ps as the current relative position. Furthermore, if the inspection mode is the second mode (FIG. 6: S225: Yes), the processor 210 may execute the detection process SS using a newly read image at the reading relative position Ps, regardless of whether the detection process SS associated with the reading relative position Ps has already been executed. In S250 and S255, the processor 210 may use the results of the new detection process SS to update the result data D2 (FIG. 8) and the merged data D3 (FIG. 1) to the latest information. When the detection process SS is performed multiple times at the same reading relative position Ps, the processor 210 may record a history of information obtained from the multiple results of the multiple detection processes SS in the result data D2 and the merged data D3.
[0172] As described with reference to FIGS. 16 , 18A, and 18B, the fabric 700 may be returned to the upstream side of the conveying direction Df (i.e., the reverse direction Db), and then conveyance of the fabric 700 in the conveying direction Df may be resumed. For example, when conveyance is stopped in response to the detection of a defect by the detection process SS, the operator may convey the fabric 700 in the reverse direction Db. Then, the operator may resume conveyance of the fabric 700 in the conveying direction Df. In this case, the defective portion of the fabric 700 passes again through the first position Pr for reading by the digital camera 111-114 ( FIG. 2 ). Then, the same defect may be detected by a new detection process SS. Another stop of conveyance due to the detection of the same defect may be cumbersome for the operator. Therefore, when the defective portion of the fabric 700 passes again through the first position Pr, the processor 210 may not execute the stop process S350, even if a defect is detected by the new detection process SS. For example, the conditions for executing the stop process S350 may include that a defect is detected by the detection process and that this detection process is the first detection process performed on a portion of the fabric 700 that has a defect.
[0173] (2) In the example of FIG. 16 , after the fabric 700 is returned to the upstream side in the conveying direction Df at Sua, if the determination result in S838 is No and the determination result in S840 is Yes, a new detection process SS for the processed portion of the detection process SS is omitted. The conditions for omitting a new detection process SS for the processed portion are not limited to the conditions in FIG. 16 , and various conditions may be satisfied, including a situation in which conveyance of the fabric 700 in the conveying direction Df is resumed after the fabric 700 is returned to the upstream side in the conveying direction Df. For example, S838 ( FIG. 12 ) may be omitted. That is, after S835, the processor 210 may proceed to S840. Thus, the first specific case in which a new detection process SS is not executed for the portion of the fabric 700 for which a detection process SS has already been executed may be various specific cases in which conveyance of the fabric 700 in the conveying direction Df is resumed after the fabric 700 is returned to the upstream side in the conveying direction Df.
[0174] (3) In the embodiment of FIG. 12 , if the determination result in S892 is Yes, the processor 210 can set the read-completed flag F1 corresponding to the read relative position Ps not yet inspected by the detection process SS to No in S950 (e.g., the read relative positions Ps of 700 and 800 in FIG. 18B ). The processor 210 then executes the detection process SS using the read image representing the portion of the fabric 700 not yet inspected by the detection process SS at these read relative positions Ps (e.g., the read inspection processes SG4b and SG5b in FIG. 18B ). The conditions for executing such a detection process SS may be various, including a change in the inspection mode from the first mode to the second mode. For example, as in the embodiment of FIG. 24 , S910: Yes and S925: Yes may be added to the conditions. Furthermore, S890 and S892 in FIG. 12 may be omitted. That is, after S862, the processor 210 may proceed to S950 or S910 in Fig. 24. In this way, in various specific cases (referred to as third specific cases) in which the inspection mode is changed from the first mode to the second mode, the processor 210 may execute the detection process SS using a read image representing a portion of the fabric 700 that has not been inspected by the detection process SS.
[0175] (4) In the example of FIG. 24 , if the inspection mode is changed from the first mode to the second mode ( FIG. 12 : S862), the determination result of S892 is Yes, and the determination result of S910 ( FIG. 24 ) is Yes, the processor 210 displays a warning in S915. The conditions for outputting such a warning may be various, including the inspection mode being changed from the first mode to the second mode, and a portion of the fabric 700 that has been processed in the first mode but has not yet been inspected by the detection process SS being located downstream of the first position. For example, S890 and S892 in FIG. 12 may be omitted. That is, after S862, the processor 210 may proceed to S910 ( FIG. 24 ). In this way, the processor 210 may output a warning in various specific cases (called the fourth specific case) when the inspection mode is changed from the first mode to the second mode and a portion of the fabric 700 that has been processed in the first mode but has not been inspected by the detection process SS is located downstream of the first position.
[0176] Here, the processor 210 may search for the uninspected portion from a search range downstream of the first position Pr (i.e., toward the forward direction Df) to determine the conditions for outputting a warning. The search range may be various ranges downstream of the first position. For example, as in the example of FIG. 24 , the search range may be one or more consecutive read relative positions including the read relative position closest to the first position Pr (e.g., read relative position Ps). Alternatively, the search range may be a predetermined consecutive range starting from the first position Pr.
[0177] (5) In the example shown in FIG. 26 , if the inspection mode is changed from the first mode to the second mode ( S862 in FIG. 12 ), the determination result in S892 is Yes, and the determination results in S910 and S925 ( FIG. 24 ) are Yes, then in S930d ( FIG. 26 ), the processor 210 conveys the fabric 700 upstream in the conveying direction Df (i.e., toward the reverse direction Db). The conditions for conveying the fabric 700 in the reverse direction Db may be various, including that the inspection mode is changed from the first mode to the second mode and that a portion of the fabric 700 that has been processed in the first mode but has not yet been inspected by the detection process SS is located downstream of the first position Pr. For example, S890 and S892 in FIG. 12 may be omitted. That is, after S862, the processor 210 may proceed to S910 ( FIG. 24 ). Furthermore, S920 and S925 in FIG. 24 may be omitted. That is, after S915, the processor 210 may proceed to S930d in Fig. 26. Also, the warning display (S915 in Fig. 24) may be omitted. In this way, in various specific cases (referred to as fifth specific cases) in which the inspection mode is changed from the first mode to the second mode and a portion of the fabric 700 that has been processed in the first mode but has not been inspected by the detection process SS is located downstream of the first position Pr, the processor 210 may perform conveyance in the reverse direction Db (e.g., S930d).
[0178] (6) In the example of FIG. 22 , when the inspection mode is changed from the first mode to the second mode, the process of FIG. 22 is executed following S862 of FIG. 12 . Then, if S863: Yes and S873: Yes, the processor 210 uses the results of the detection process SS executed in the first mode as the results of the detection process SS for the portion of the fabric 700 processed in the first mode in S877 and S880. The conditions for using the results of the detection process SS executed in the first mode may be various, including the inspection mode being changed from the first mode to the second mode. For example, S870 and S873 of FIG. 22 may be omitted. That is, after S867, the processor 210 may proceed to S877. Thus, in various specific cases (referred to as the sixth specific case) in which the inspection mode is changed from the first mode to the second mode, the processor 210 may use the results of the detection process SS performed in the first mode as the result of the detection process SS of the portion of the fabric 700 that has been processed in the first mode.
[0179] (7) The method of acquiring the relative position of the fabric 700 with respect to the conveying device 900 may be various methods other than the method using information from the encoder 120 ( FIG. 2 ). For example, a marker for alignment may be attached to the fabric 700. The attributes (color, shape, size, etc.) of the marker may differ depending on the position on the fabric 700 in a direction parallel to the forward direction Df. The processor 210 may acquire the attributes of the marker included in the scanned image by analyzing the scanned image (e.g., the striped fabric image IMrc ( FIG. 5(B))), and acquire the relative position associated with the scanned image according to the attributes. The scanned relative position Ps ( FIGS. 4 and 8 ) may be represented by the relative position acquired in this manner.
[0180] (8) As shown in the example of FIG. 16 , when the fabric 700 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 preferably does not execute a new detection process SS on a portion of the fabric 700 for which the detection process SS has already been executed (e.g., relative reading positions Ps of 300, 400, and 500). The processor 210 preferably resumes the detection process SS at the next reading position after the most upstream processed position in the conveying direction Df (e.g., relative reading position Ps of 600). Here, various methods may be used to determine whether the portion of the fabric 700 represented by the scanned image has already been subjected to the detection process SS, instead of using the flag data D1 ( FIG. 4 ). For example, the processor 210 may refer to the inspection mode MD ( FIG. 8 ). When the inspection mode MD associated with the scanned image is set to the second mode, the processor 210 may determine that the detection process SS for the scanned image has been executed. When the inspection mode MD is set to the first mode or is not set, the processor 210 may determine that the detection process SS for the scanned image has not been executed. The processor 210 may use the inspection mode MD to determine the next scanning position after the processed position on the most upstream side in the conveying direction Df.
[0181] The processor 210 may also store the scanned image processed by the detection process SS in the storage device 215 (e.g., the non-volatile storage device 230). If a new scanned image includes an image portion not included in the scanned image processed by the detection process SS, the processor 210 may determine that the detection process SS has not yet been performed on the new scanned image. Based on the results of this determination, the processor 210 may then determine the next scanning position of the processed position furthest upstream in the conveying direction Df. For example, steps S130 and S150 in FIG. 3 and the flag data D1 (FIG. 4) may be omitted. Then, by resuming conveyance in the conveying direction Df, scanned images may be sequentially acquired. Here, the processor 210 may resume the detection process SS if the newly acquired scanned image includes an image portion not included in the scanned image processed by the detection process SS.
[0182] (9) The first mode may be, instead of a mode for visual inspection, various modes in which processing can proceed even without the results of the detection process SS. For example, the first mode may be a mode for displaying a scanned image (e.g., screen DP3 (FIG. 13C)) on the display unit 240. The second mode may be various modes that use the results of the detection process SS. For example, the second mode may be a mode in which an acquisition inspection process (e.g., acquisition inspection process SR in FIGS. 6, 7A-7C) is repeated without displaying a scanned image on the display unit 240.
[0183] (10) 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, various conditions may be set for executing the defect detection process. For example, the processor 210 may execute the defect detection process when "an unprocessed scanned image (e.g., a band fabric image IMrc ( FIG. 5B )) is acquired by the defect detection process," or when "an unprocessed scanned image is acquired and the width Wf is within the allowable width range." In this way, the processor 210 may execute the defect detection process in various specific cases (referred to as second specific cases). Furthermore, defects detected by the detection process (e.g., the detection process SS ( FIG. 6 )) are not limited to defects in the width Wf and defective portions, but may also include various other defects such as incorrect colors. Defects detected by the detection process may include, for example, one or more types of defects including defective portions.
[0184] (11) The defect portion merging process S370 ( FIG. 7(B) ) 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 parts 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. 15(A))) is equal to or less than a second threshold, regardless of the angle Ad ( FIG. 15(C)). 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. 15(A))) is equal to or less than a third threshold, regardless of the angle Ad ( FIG. 15(C)). 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.
[0185] 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.
[0186] (12) In S930d of Fig. 26, the portion of the fabric 700 that has been processed in the first mode but has not yet been inspected by the detection process SS may be transported to the first position Pr for reading or to various positions upstream of the first position Pr. For example, the uninspected portion may be transported to a position a predetermined distance upstream of the first position Pr.
[0187] (13) In the process of FIG. 24 , the process of outputting a warning may be various processes instead of displaying the warning screen DP6 ( FIG. 25 ) (S915). For example, the processor 210 may output a warning sound. Furthermore, the condition of S935 may be that a proceed instruction is input by the operator. In response to the input of the proceed instruction, the processor 210 may proceed to S950.
[0188] (14) 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.
[0189] (15) The processing 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 (Figure 5 (F)) of the fabric. The processing object is not limited to fabric, but may be various types of sheet-like objects (e.g., paper, resin film, etc.). The processing 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 object may be various types suitable for transporting the processing object. The configuration of the reading device may be various types suitable for the processing object and the transport device.
[0190] (16) 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 ).
[0191] (17) 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.
[0192] (18) 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).
[0193] (19) 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).
[0194] 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.
[0195] 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.
[0196] DESCRIPTION OF THE REFERENCE NUMERALS 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...textile, 900...conveying 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, Db...reverse direction, Df...forward direction (conveying direction), S235...defect detection process, S350...stop process, S370...merging process, SS...detection process
Claims
1. A program that realizes on a computer a detection function for sequentially executing detection processing for detecting a defect of an object by using each of read images obtained by using a reading device configured to sequentially read different parts of the object by conveyance in the conveyance direction of the object, and in a first specific case where the conveyance of the object in the conveyance direction is restarted after the object is returned to the upstream side in the conveyance direction, the detection function does not execute new detection processing on the part of the object for which the detection processing has already been executed.
2. The program according to claim 1, further realizing on a computer a function of storing in a storage device data representing a processed position associated with the position in the conveyance direction on the object of the part of the object for which the detection processing has been executed, and in the first specific case, the detection function restarts the detection processing from a read image representing a part of the object upstream of the most upstream processed position in the conveyance direction.
3. The program according to claim 1 or 2, wherein the detection processing is defect detection processing executed in a second specific case, and includes the defect detection processing for detecting as the defect a defective part that is a part of the object representing a defect, and the program further realizes on a computer a function of executing a merging process for merging two defective parts as one defective part when a continuous condition indicating that the two defective parts detected by the defect detection processing are in a predetermined continuous relationship is satisfied.
4. The program according to claim 3, wherein the defect detection processing includes processing for detecting a linear defect part representing a linear defect as the defective part, the merging process includes processing for merging two linear defect parts as one defective part, and the continuous condition includes that the angle formed by the extending directions of the two linear defects represented by the two linear defect parts is equal to or less than an angle threshold, and the distance between the two linear defect parts is equal to or less than a distance threshold.
5. The program according to claim 1 or 2, further causing a computer to implement a function of selecting a mode from a plurality of modes including a first mode and a second mode according to a user's instruction, wherein the detection function does not execute the detection process when the mode is the first mode, executes the detection process when the mode is the second mode, and when the mode is changed from the first mode to the second mode in a third specific case, executes the detection process using a reading image representing an unexamined part of the part of the object that has been processed in the first mode and that has not been examined by the detection process. Program.
6. The program according to claim 5, wherein a first position, which is a position for reading by the reading device, is set on the path of conveyance of the object, and the program further causes a computer to implement a function of outputting a warning when the mode is changed from the first mode to the second mode and the unexamined part is located downstream of the first position in the conveyance direction. Program.
7. The program according to claim 5, wherein a first position, which is a position for reading by the reading device, is set on the path of conveyance of the object, and the program further causes a computer to implement a function of moving the unexamined part to the first position or a position upstream of the first position in the conveyance direction by conveying the object upstream in the conveyance direction when the mode is changed from the first mode to the second mode and the unexamined part is located downstream of the first position in the conveyance direction. Program.
8. A program according to claim 1 or 2, further causing a computer to implement a function of selecting a mode from a plurality of modes including a first mode that does not require the result of the detection process and a second mode that requires the result of the detection process according to a user's instruction, wherein the detection function executes the detection process and a process of storing data representing the result of the detection process in a storage device in each case where the mode is the first mode and where the mode is the second mode, and in a sixth specific case where the mode is changed from the first mode to the second mode, uses the result of the detection process that has been executed in the first mode as the result of the detection process for the portion of the object that has been processed in the first mode.
9. A data processing apparatus comprising a detection unit that sequentially executes a detection process for detecting a defect of an object using each of read images obtained using a reading device configured to sequentially read different portions of the object by transporting the object in a transport direction, and the detection unit does not execute a new detection process on a portion of the object on which the detection process has already been executed in a first specific case where the transport of the object in the transport direction is restarted after the object has been returned to the upstream side in the transport direction.
10. A program causing a computer to implement a detection function that sequentially executes a detection process for detecting a defect of an object using each of read images obtained using a reading device configured to sequentially read different portions of the object by transporting the object in a transport direction, and a stop function that executes a stop process for stopping the transport of the object in a specific case where a defect is detected by the detection process, wherein the stop function does not execute the stop process when the object is returned to the upstream side in the transport direction and then the transport of the object in the transport direction is restarted and the portion of the object having the defect passes through the reading position by the reading device again.
Citation Information
Patent Citations
Mark seal printing / inspection device, printed mark seal inspecting method and mark seal printing control method
JP2004160981A
printer
JP2020166571A
Printer and image inspection device
JP2022117129A
Flaw identification method and flaw identification system used for flaw identification method
JP2023120029A