Cloth detection equipment and cloth detection method

By using multiple initial wavelengths of light and the processor to select the most appropriate wavelength in the cloth detection equipment, the problem of low contrast of cloth images in the existing technology is solved, achieving higher detection accuracy and lower cost.

CN119334945APending Publication Date: 2025-01-21TAIWAN TEXTILE RESEARCH INSTITUTE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310898659.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-21
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the existing fabric detection technology, fixed wavelengths of light may require manual adjustment of the light wavelength, resulting in low contrast of fabric images, difficulty in detecting defects, and high labor costs.

Method used

The light-emitting module generates light of multiple initial wavelengths, the photography device captures the initial image, and the processor selects the initial wavelength with the highest contrast, performs fine-tuning within its wavelength range, and selects the optimal wavelength to improve image contrast.

Benefits of technology

It improves the contrast of fabric images, enhances the accuracy of defect detection, reduces labor costs, and reduces the computational load of the processor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119334945A_ABST
    Figure CN119334945A_ABST
Patent Text Reader

Abstract

A cloth detection apparatus and a cloth detection method, the cloth detection apparatus comprising: a light emitting module for generating light to irradiate cloth and for adjusting the light to a plurality of initial wavelengths; the photographing device is used for photographing the cloth to generate a plurality of initial images corresponding to the initial wavelengths; the processor is used for selecting a first initial wavelength in the initial wavelengths according to the initial image, adjusting the light in a wavelength range corresponding to the first initial wavelength to generate a plurality of first cloth images of the cloth, and selecting a first optimal wavelength in the wavelength range according to the first cloth images; wherein the first optimum wavelength corresponds to the highest first contrast in a plurality of first contrasts of the first cloth image. In this way, it can be ensured that the image of the cloth has a high enough contrast ratio during detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a fabric detection technology, and more particularly to a fabric detection device and a fabric detection method. Background Art

[0002] When detecting fabric defects, a fixed wavelength of light is used to illuminate the fabric, or the wavelength of the light needs to be adjusted manually. As a result, the contrast of the fabric image is low, so that some defects cannot be detected, resulting in misjudgment of the fabric, and the labor cost is high. Therefore, developing a technology that can overcome the above problems is an important topic in this field. Summary of the invention

[0003] The disclosed embodiment includes a fabric detection device. The fabric detection device includes: a light emitting module for generating light to illuminate fabric and for adjusting the light to a plurality of initial wavelengths; a photographing device for photographing fabric to generate a plurality of initial images corresponding to the initial wavelengths; and a processor for selecting a first initial wavelength from the initial wavelengths according to the initial image, for adjusting the light in a wavelength range corresponding to the first initial wavelength to generate a plurality of first fabric images of the fabric, and for selecting a first optimum wavelength from the wavelength range according to the first fabric image, wherein the first optimum wavelength corresponds to the highest first contrast among a plurality of first contrasts of the first fabric image.

[0004] In some embodiments, the first initial wavelength corresponds to a highest initial contrast among multiple initial contrasts of the multiple initial images, the wavelength range is between a second initial wavelength and a third initial wavelength among the multiple initial wavelengths, and the second initial wavelength is adjacent to the first initial wavelength and the third initial wavelength is adjacent to the first initial wavelength.

[0005] In some embodiments, the processor is further used to compare a first image, a second image and a third image among the plurality of first fabric images, the first image, the second image and the third image respectively corresponding to a first wavelength, a second wavelength and a third wavelength in the wavelength range, the second wavelength is between the first wavelength and the third wavelength, the second wavelength differs from the first wavelength by a wavelength interval and the second wavelength differs from the third wavelength by the wavelength interval, the first image, the second image and the third image respectively have a first contrast, a second contrast and a third contrast, and when the second contrast is greater than the first contrast and the second contrast is greater than the third contrast, the second wavelength is selected as the first optimal wavelength.

[0006] In some embodiments, when the second contrast is less than the third contrast, the processor is further configured to adjust the light to a fourth wavelength in the wavelength range to generate a fourth image among the plurality of first fabric images, and the processor is further configured to compare the second contrast, the third contrast, and a fourth contrast of the fourth image, and to select the third wavelength as the first optimal wavelength when the third contrast is greater than the second contrast and the third contrast is greater than the fourth contrast, and the fourth wavelength differs from the third wavelength by the wavelength interval.

[0007] The disclosed embodiment includes a fabric detection method. The fabric detection method includes: irradiating light onto fabric; adjusting the light to multiple initial wavelengths to generate multiple initial images of the fabric; comparing multiple initial contrasts of the initial images to obtain the highest initial contrast among the initial contrasts; selecting a first initial wavelength corresponding to the highest initial contrast among the initial wavelengths; adjusting the light according to the wavelength interval in a wavelength range corresponding to the first initial wavelength to generate multiple first fabric images of the fabric; comparing multiple first contrasts of the first fabric images to obtain the highest first contrast among the first contrasts; selecting a first optimal wavelength corresponding to the highest first contrast in the wavelength range; and detecting the fabric under light having the first optimal wavelength.

[0008] In some embodiments, the fabric detection method further includes: comparing the highest first contrast with a preset contrast; when the highest first contrast is less than the preset contrast, reducing the wavelength interval; adjusting the light with the reduced wavelength interval in the wavelength range to generate a plurality of second fabric images of the fabric; comparing a plurality of second contrasts of the plurality of second fabric images to obtain a second highest contrast among the plurality of second contrasts; selecting a second optimal wavelength corresponding to the second highest contrast in the wavelength range; and detecting the fabric under the light having the second optimal wavelength.

[0009] In some embodiments, the fabric detection method further includes: comparing a first contrast, a second contrast, and a third contrast among the plurality of first contrasts, wherein the first contrast, the second contrast, and the third contrast correspond to a first wavelength, a second wavelength, and a third wavelength in the wavelength range, respectively; when the second contrast is greater than the first contrast and the second contrast is greater than the third contrast, selecting the second wavelength as the first optimal wavelength; and when the second contrast is less than the third contrast, adjusting the light to a fourth wavelength in the wavelength range to generate a fourth contrast corresponding to the fourth wavelength, wherein the first wavelength, the second wavelength, the third wavelength, and the fourth wavelength are arranged in sequence, and two adjacent ones of the first wavelength, the second wavelength, the third wavelength, and the fourth wavelength differ by the wavelength interval.

[0010] In some embodiments, the fabric detection method further includes: when the second contrast is less than the third contrast, comparing the second contrast, the third contrast and the fourth contrast; and when the third contrast is greater than the second contrast and the third contrast is greater than the fourth contrast, selecting the third wavelength as the first optimal wavelength.

[0011] In some embodiments, the fabric detection method further includes: performing an initial operation on the multiple initial images to generate the multiple initial contrasts; performing a first operation on the multiple first fabric images to generate the multiple first contrasts; generating a total calculation amount based on the initial operation and the first operation; and when the total calculation amount is greater than a preset calculation amount, adjusting at least one of a number of the multiple initial wavelengths and the wavelength interval to reduce the total calculation amount.

[0012] In some embodiments, adjusting at least one of the number of the plurality of initial wavelengths and the wavelength interval further comprises: reducing the number of the plurality of initial wavelengths; and increasing the wavelength interval. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 is a schematic diagram of a cloth detection device according to some embodiments of the present disclosure;

[0014] Figure 2 is a graph showing the relationship between contrast and wavelength according to some embodiments of the present disclosure;

[0015] Figure 3 is a graph showing the relationship between contrast and wavelength according to some embodiments of the present disclosure;

[0016] Figure 4 is a flow chart of a cloth detection method according to some embodiments of the present disclosure;

[0017] Figure 5 is a flow chart of other operations of the cloth detection method according to some embodiments of the present disclosure;

[0018] Figure 6 is a flow chart of other operations of the cloth detection method according to some embodiments of the present disclosure;

[0019] Figure 7 is a flow chart of other operations of the cloth detection method according to one embodiment of the present disclosure;

[0020] Figure 8 is a flow chart of other operations of the cloth detection method according to one embodiment of the present disclosure;

[0021] Fig. 9The flowchart is a flowchart illustrating further details of operations according to one embodiment of the present disclosure.

[0022]

Explanation of symbols

[0023] 100: Cloth detection equipment 110: Light emitting module

[0024] 120: Photographic device 130: Processor

[0025] LT: Light

[0026] FB1: Cloth

[0027] OM1: initial image FM1: first fabric image FM2: second fabric image 122: sensing element 124: lens

[0028] ED1: first light emitting device ED2: second light emitting device L1: first light portion L2: second light portion X, Y: axis 200: relationship diagram CV2, CV3: curve WLR1: wavelength range WL1: first wavelength WL2: second wavelength WL3: third wavelength CT1: first contrast CT2: second contrast CT3: third contrast IV1: wavelength interval WL4: fourth wavelength CT4: fourth contrast 400: fabric detection method

[0029] Operation: OP41~OP48、OP51~OP56、OP61~OP63、OP71~OP72、OP81~OP84、OP91~OP92 DETAILED DESCRIPTION

[0030] In this document, although the terms "first", "second", etc. are used to describe different components, the terms are only used to distinguish components or operations described with the same technical terms. Unless the context clearly indicates otherwise, the terms do not specifically refer to or imply an order or sequence, nor are they used to limit the present disclosure.

[0031] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology and the present disclosure, and will not be interpreted as an idealized or overly formal meaning unless explicitly defined as such herein.

[0032] The terms used herein are only for the purpose of describing specific embodiments and are not restrictive. As used herein, unless the content clearly indicates, the singular forms "one", "an" and "the" are intended to include plural forms, including "at least one". "Or" means "and / or". As used herein, the term "and / or" includes any and all combinations of one or more related listed items. It should also be understood that when used in this specification, the terms "include" and / or "comprise" specify the presence and / or parts of the features, regions, entireties, steps, operations, elements, but do not exclude the presence or addition of one or more other features, regions, entireties, steps, operations, elements, parts and / or their combinations.

[0033] The following will disclose multiple embodiments of the present disclosure with the accompanying drawings. For the purpose of clear description, many practical details will be described together in the following description. However, it should be understood that these practical details should not be used to limit the present disclosure. In other words, in some embodiments of the present disclosure, these practical details are not necessary. In addition, in order to simplify the drawings, some conventional structures and elements will be depicted in a simple schematic manner in the drawings.

[0034] Figure 1 FIG. 1 is a schematic diagram of a cloth detection device 100 according to some embodiments of the present disclosure. In some embodiments, the cloth detection device 100 includes a light emitting module 110 , a photographing device 120 , and a processor 130 .

[0035] In some embodiments, the light emitting module 110 is used to generate light LT to illuminate the fabric FB1, and to adjust the light LT to multiple initial wavelengths (eg, the seven initial wavelengths shown in Table 1 below). The seven initial wavelengths shown in Table 1 correspond to seven different colors respectively.

[0036]

[0037] Table 1 (Unit: nanometer)

[0038] In some embodiments, the photographing device 120 is used to photograph the fabric FB1 to generate a plurality of initial images OM1 corresponding to the initial wavelengths. For example, the seven initial images OM1 photographed by the photographing device 120 correspond to the seven initial wavelengths shown in Table 1. In some embodiments, the photographing device 120 is further used to photograph the fabric FB1 to generate a plurality of first fabric images FM1 and a plurality of second fabric images FM2. The details of the first fabric image FM1 and the second fabric image FM2 are further described below.

[0039] In some embodiments, the processor 130 is configured to select a first initial wavelength from the initial wavelengths according to the initial image OM1. For example, the processor 130 calculates the contrast of the initial image OM1 and selects a wavelength corresponding to a wavelength with the highest contrast in the initial image OM1 as the first initial wavelength.

[0040] In some embodiments, the processor 130 is further configured to generate a signal in a wavelength range corresponding to the first initial wavelength (eg Figure 2 The light LT is adjusted in the wavelength range WLR1 to generate a plurality of first fabric images FM1 of the fabric FB1, and is used to select a first optimum wavelength in the wavelength range according to the plurality of first fabric images FM1. The first optimum wavelength corresponds to the highest first contrast among the plurality of first contrasts of the plurality of first fabric images FM1.

[0041] For example, referring to Table 1, after selecting 530 nanometers as the first initial wavelength, the processor 130 can adjust the light LT in the wavelength range of 495 to 570 nanometers corresponding to 530 nanometers to generate a plurality of first fabric images FM1 corresponding to different wavelengths in the range of 495 to 570 nanometers, and select the wavelength corresponding to one of the plurality of first fabric images FM1 having the highest contrast as the first optimal wavelength.

[0042] In some embodiments, the first initial wavelength corresponds to a highest initial contrast among multiple initial contrasts of the initial image OM1. For example, when the first initial wavelength is 530 nanometers, among the seven initial contrasts of the seven initial images OM1, the initial contrast of the initial image corresponding to 530 nanometers is the highest.

[0043] In some embodiments, the wavelength range is between the second initial wavelength and the third initial wavelength in the initial wavelength, the second initial wavelength is adjacent to the first initial wavelength, and the third initial wavelength is adjacent to the first initial wavelength. For example, the wavelength range of 495-570 nanometers corresponding to 530 nanometers is between 580 nanometers and 485 nanometers in the initial wavelength. As shown in Table 1, 580 nanometers is adjacent to 530 nanometers, and 485 nanometers is adjacent to 530 nanometers.

[0044] like Figure 1 As shown, the photographing device 120 may include a sensing element 122 and a lens 124. In some embodiments, the sensing element 122 may be implemented as a charge-coupled device (CCD), and receives the light reflected by the fabric FB1 through the lens 124 to take pictures.

[0045] like Figure 1As shown, the light emitting module 110 may include a first light emitting device ED1 and a second light emitting device ED2. On the X-axis, the photographing device 120 may be located between the first light emitting device ED1 and the second light emitting device ED2 to photograph the fabric FB1 through the space between the first light emitting device ED1 and the second light emitting device ED2. The first light emitting device ED1 is used to generate a first light portion L1 having an angle of forty-five degrees with the Y-axis. The second light emitting device ED2 is used to generate a second light portion L2 having an angle of forty-five degrees with the Y-axis. The light LT may include a first light portion L1 and a second light portion L2. In some embodiments, the Y-axis and the X-axis are perpendicular to each other, and the first light portion L1 and the second light portion L2 are perpendicular to each other.

[0046] Figure 2 FIG200 is a graph 200 showing a relationship between contrast and wavelength according to some embodiments of the present disclosure. The horizontal axis of the graph 200 corresponds to wavelength and the vertical axis corresponds to contrast. Figure 2 As shown, the relationship diagram 200 includes a curve CV2. The curve CV2 represents the relationship between the wavelength of the light LT and the contrast of the first fabric image FM1.

[0047] In some embodiments, the processor 130 is further configured to compare contrasts of a first image, a second image, and a third image in the plurality of first fabric images FM1. The first image, the second image, and the third image correspond to a first wavelength WL1, a second wavelength WL2, and a third wavelength WL3 in the wavelength range WLR1, respectively. The first image, the second image, and the third image have a first contrast CT1, a second contrast CT2, and a third contrast CT3, respectively.

[0048] like Figure 2 As shown, the second wavelength WL2 is between the first wavelength WL1 and the third wavelength WL3. The second wavelength WL2 differs from the first wavelength by a wavelength interval IV1 and the second wavelength WL2 also differs from the third wavelength WL3 by a wavelength interval IV1. In some embodiments, the wavelength interval IV1 is approximately 5 nanometers.

[0049] exist Figure 2 In the illustrated scenario, the second contrast CT2 is greater than the first contrast CT1 and the second contrast CT2 is greater than the third contrast CT3. Correspondingly, the processor 130 selects the second wavelength WL2 as the first optimal wavelength.

[0050] Figure 3 FIG. 3 is a graph 300 showing a relationship between contrast and wavelength according to some embodiments of the present disclosure. The horizontal axis of the graph 300 corresponds to wavelength and the vertical axis corresponds to contrast. Figure 3 As shown, the relationship diagram 300 includes a curve CV3. The curve CV3 represents the relationship between the wavelength of the light LT and the contrast of the first fabric image FM1. Figure 3In the illustrated scenario, the second contrast ratio CT2 corresponding to the second wavelength WL2 is smaller than the third contrast ratio CT3 corresponding to the third wavelength WL3.

[0051] In some embodiments, when the second contrast CT2 is less than the third contrast CT3, the processor 130 is further configured to adjust the light LT to a fourth wavelength WL4 in the wavelength range WLR1 to generate a fourth image in the first fabric image FM1.

[0052] In some embodiments, the processor 130 is further used to compare the second contrast CT2, the third contrast CT3, and the fourth contrast CT4 of the fourth image, and to select the third wavelength WL3 as the first optimal wavelength when the third contrast CT3 is greater than the second contrast CT2 and the third contrast CT3 is greater than the fourth contrast CT4. In some embodiments, the fourth wavelength WL4 and the third wavelength WL3 are also separated by a wavelength interval IV1.

[0053] Please refer to Figure 2 and Figure 3 In some embodiments, if WL2 is selected as the first optimal wavelength, the processor 130 does not need to generate the fourth contrast CT4 of the fourth image. In this way, the amount of calculation of the processor 130 can be saved.

[0054] Figure 4 FIG. 4 is a flow chart of a cloth detection method 400 according to some embodiments of the present disclosure. Figure 4 As shown, the cloth detection method 400 includes operations OP41 to OP48. In some embodiments, the cloth detection method 400 may be performed by Figure 1 The cloth detection system 100 is shown to perform, but the disclosure is not limited thereto.

[0055] In operation OP41 , the light emitting module 110 irradiates the light LT onto the fabric FB1 .

[0056] In operation OP42, the processor 130 adjusts the light LT to a plurality of initial wavelengths to generate a plurality of initial images OM1 of the fabric FB1. For example, seven initial images OM1 corresponding to the seven initial wavelengths shown in Table 1 are generated.

[0057] In operation OP43, the processor 130 compares the initial contrasts of the initial images OM1 to obtain the highest initial contrast among the initial contrasts. For example, when the contrast of the initial image corresponding to 530 nanometers is higher than the contrasts of the other six initial images, the contrast of 530 nanometers is selected as the highest initial contrast.

[0058] In operation OP44, the processor 130 selects a first initial wavelength corresponding to the highest initial contrast ratio from among the initial wavelengths. For example, 530 nanometers is selected as the first initial wavelength.

[0059] In operation OP45, the processor 130 adjusts the light LT according to the wavelength interval IV1 in the wavelength range WLR1 corresponding to the first initial wavelength to generate a plurality of first fabric images FM1 of the fabric EB1. For example, in the wavelength range 495-570 nanometers corresponding to 530 nanometers, the light LT is adjusted with a wavelength interval of 5 nanometers, such as adjusting to wavelengths of 530 nanometers, 535 nanometers, 525 nanometers, etc., to generate a plurality of corresponding first fabric images FM1.

[0060] In operation OP46, the processor 130 compares the first contrast ratios of the first fabric images to obtain the highest first contrast ratio among the first contrast ratios. Figure 2 The first contrast CT1 , the second contrast CT2 , and the third contrast CT3 are shown so as to obtain the highest second contrast CT2 as the highest first contrast.

[0061] In operation OP47, the processor 130 selects a first optimal wavelength corresponding to the highest first contrast in the wavelength range WLR1. Figure 2 The second wavelength WL2 shown is the first optimum wavelength.

[0062] In operation OP48, the processor 130 detects the fabric FB1 under the light LT having the first optimum wavelength. For example, the processor 130 detects defects of the fabric FB1 under the light LT having the second wavelength WL2.

[0063] In some methods, when detecting fabric defects, a fixed wavelength of light is used to illuminate the fabric, or the wavelength of the light needs to be adjusted manually. As a result, the contrast of the fabric image is low, making some defects undetectable and leading to misjudgment, and the labor cost is high.

[0064] Compared with the above approach, in the embodiment of the present invention, the first initial wavelength with the highest initial contrast is first selected from the initial wavelengths, and then fine-tuning is performed from the wavelength range WLR1 of the first initial wavelength to obtain the first optimal wavelength with the highest first contrast, and the cloth FB1 is detected with the first optimal wavelength. In this way, it can be ensured that the image of the cloth FB1 has a sufficiently high contrast during detection, so that the image of the cloth FB1 is clear, and no manual labor is required.

[0065] Figure 5 FIG. 4 is a flow chart of other operations of the cloth detection method 400 according to some embodiments of the present disclosure. Figure 5As shown, the cloth detection method 400 may further include operations OP51 to OP56. In some embodiments, the operations OP51 to OP56 correspond to a situation where a second highest contrast ratio higher than the first highest contrast ratio is required for detection.

[0066] At operation OP51, the processor 130 compares the highest first contrast with a preset contrast.

[0067] At operation OP52, when the highest first contrast is less than the preset contrast, the processor 130 reduces the wavelength interval IV1.

[0068] In operation OP53 , the processor 130 adjusts the light LT with the reduced wavelength interval IV1 in the wavelength range WLR1 to generate a plurality of second fabric images FM2 of the fabric FB1 .

[0069] In operation OP54 , the processor 130 compares the second contrasts of the second fabric images FM2 to obtain the second highest contrast among the second contrasts.

[0070] At operation OP55, the processor 130 selects a second optimum wavelength corresponding to a second highest contrast ratio in the wavelength range WLR1.

[0071] For example, the image of the fabric FB1 may have an actual highest contrast at 531 nanometers. However, since the wavelength interval IV1 is 5 nanometers, the highest first contrast may correspond to 530 nanometers instead of 531 nanometers. In this case, the processor 130 can reduce the wavelength interval IV1 to 1 nanometer, so that the light LT can be adjusted from 530 nanometers to 531 nanometers to generate an image corresponding to 531 nanometers, and the processor 130 can select 531 nanometers as the second optimal wavelength.

[0072] In operation OP56 , the processor 130 detects the fabric FB1 under the light LT having the second optimal wavelength, for example, detects defects of the fabric FB1 .

[0073] Figure 6 FIG. 4 is a flow chart of other operations of the cloth detection method 400 according to some embodiments of the present disclosure. Figure 6 As shown, the cloth detection method 400 may further include operations OP61 - OP63 .

[0074] In operation OP61 , the processor 130 compares a first contrast CT1 , a second contrast CT2 , and a third contrast CT3 among a plurality of first contrasts, wherein the first contrast CT1 , the second contrast CT2 , and the third contrast CT3 correspond to the first wavelength WL1 , the second wavelength WL2 , and the third wavelength WL3 in the wavelength range WLR1 , respectively.

[0075] In operation OP62 , when the second contrast CT2 is greater than the first contrast CT1 and the second contrast CT2 is greater than the third contrast CT3 , the processor 130 selects the second wavelength WL2 as the first optimum wavelength.

[0076] In operation OP63 , when the second contrast CT2 is less than the third contrast CT3 , the processor 130 adjusts the light LT to a fourth wavelength WL4 in the wavelength range WLR1 to generate a fourth contrast CT4 corresponding to the fourth wavelength WL4 .

[0077] Please refer to Figure 2 , Figure 3 and Figure 6 , operation OP62 corresponds to Figure 2 The situation shown, and the operation OP63 corresponds to Figure 3 The situation shown.

[0078] In some embodiments, the first wavelength WL1, the second wavelength WL2, the third wavelength WL3 and the fourth wavelength WL4 are arranged in sequence. The difference between two adjacent wavelengths among the first wavelength WL1, the second wavelength WL2, the third wavelength WL3 and the fourth wavelength WL4 is a wavelength interval IV1.

[0079] Figure 7 FIG. 4 is a flow chart of other operations of the cloth detection method 400 according to an embodiment of the present disclosure. Figure 7 As shown, the cloth detection method 400 may further include operations OP71-OP72. Figure 3 and Figure 7 , operation OP71~OP72 corresponds Figure 3 The situation shown.

[0080] At operation OP71 , when the second contrast CT2 is less than the third contrast CT3 , the processor 130 compares the second contrast CT2 , the third contrast CT3 , and the fourth contrast CT4 .

[0081] In operation OP72 , when the third contrast CT3 is greater than the second contrast CT2 and the third contrast CT3 is greater than the fourth contrast CT4 , the processor 130 selects the third wavelength WL3 as the first optimum wavelength.

[0082] Figure 8 FIG. 4 is a flow chart of other operations of the cloth detection method 400 according to an embodiment of the present disclosure. Figure 8 As shown, the cloth detection method 400 may further include operations OP81 ˜ OP84 . In some embodiments, the operations OP81 ˜ OP84 correspond to the situation where the total computational load of the processor 130 needs to be reduced.

[0083] In operation OP81 , the processor 130 performs initial operations on the plurality of initial images OM1 to generate a plurality of initial contrasts.

[0084] In operation OP82 , the processor 130 performs a first operation on the plurality of first fabric images FM1 to generate a plurality of first contrasts.

[0085] In operation OP83, the processor 130 generates a total operation amount according to the initial operation and the first operation. For example, the total operation amount is the operation amount of the initial operation plus the operation amount of the first operation.

[0086] In operation OP84, when the total computation amount is greater than the preset computation amount, the processor 130 adjusts at least one of the number of initial wavelengths and the wavelength interval IV1 to reduce the total computation amount.

[0087] Fig. 9 FIG. 8 is a flowchart illustrating further details of operation OP84 according to one embodiment of the present disclosure. Fig. 9 As shown, operation OP84 may include operations OP91-OP92.

[0088] In operation OP91, the processor 130 reduces the number of initial wavelengths. For example, the processor 130 adjusts seven initial wavelengths to six initial wavelengths.

[0089] In operation OP92, the processor 130 increases the wavelength interval IV1. For example, the processor 130 adjusts the wavelength interval IV1 from 5 nanometers to 6 nanometers.

[0090] In summary, the fabric detection method 400 can first select a first initial wavelength with the highest initial contrast from the initial wavelengths, and then fine-tune from the wavelength range WLR1 of the first initial wavelength to obtain a first optimal wavelength with the highest first contrast. Compared to the conventional method, the present disclosure can enhance the contrast of the image of the fabric FB1 for detection and reduce the amount of computation of the processor 130.

[0091] Although the present disclosure has been disclosed as above in the form of implementation methods, it is not intended to limit the present disclosure. Anyone with ordinary knowledge in the technical field may make slight changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the scope of protection of the present disclosure shall be determined by the definition of the attached claims.

Claims

1. A cloth detection device, characterized in that: Include: A light emitting module, for generating a light to illuminate a fabric, and for adjusting the light to a plurality of initial wavelengths; a photographing device for photographing the fabric to generate a plurality of initial images corresponding to the plurality of initial wavelengths; as well as a processor for selecting a first initial wavelength from among the plurality of initial wavelengths according to the plurality of initial images, for adjusting the light in a wavelength range corresponding to the first initial wavelength to generate a plurality of first fabric images of the fabric, and for selecting a first optimum wavelength in the wavelength range according to the plurality of first fabric images, The first optimum wavelength corresponds to a highest first contrast among a plurality of first contrasts of the plurality of first cloth images.

2. The cloth detection device according to claim 1, characterized in that: The first initial wavelength corresponds to a highest initial contrast among a plurality of initial contrasts of the plurality of initial images, The wavelength range is between a second initial wavelength and a third initial wavelength among the plurality of initial wavelengths, and The second initial wavelength is adjacent to the first initial wavelength and the third initial wavelength is adjacent to the first initial wavelength.

3. The cloth detection device according to claim 1, characterized in that: The processor is further used to compare a first image, a second image and a third image among the plurality of first fabric images. The first image, the second image and the third image correspond to a first wavelength, a second wavelength and a third wavelength in the wavelength range, respectively. The second wavelength is between the first wavelength and the third wavelength, The second wavelength differs from the first wavelength by a wavelength interval and the second wavelength differs from the third wavelength by the wavelength interval, The first image, the second image and the third image have a first contrast, a second contrast and a third contrast respectively, and When the second contrast is greater than the first contrast and the second contrast is greater than the third contrast, the second wavelength is selected as the first optimum wavelength.

4. The cloth detection device according to claim 3, characterized in that: When the second contrast is less than the third contrast, the processor is further configured to adjust the light to a fourth wavelength in the wavelength range to generate a fourth image among the plurality of first fabric images. The processor is further configured to compare the second contrast, the third contrast, and a fourth contrast of the fourth image, and to select the third wavelength as the first optimal wavelength when the third contrast is greater than the second contrast and the third contrast is greater than the fourth contrast. The fourth wavelength differs from the third wavelength by the wavelength interval.

5. A cloth detection method, characterized in that: Include: Shining a light on a piece of fabric; Adjusting the light to a plurality of initial wavelengths to generate a plurality of initial images of the fabric; Comparing a plurality of initial contrasts of the plurality of initial images to obtain a highest initial contrast among the plurality of initial contrasts; Selecting a first initial wavelength corresponding to the highest initial contrast ratio among the plurality of initial wavelengths; In a wavelength range corresponding to the first initial wavelength, adjusting the light according to a wavelength interval to generate a plurality of first fabric images of the fabric; comparing a plurality of first contrasts of the plurality of first cloth images to obtain a highest first contrast among the plurality of first contrasts; In the wavelength range, selecting a first optimum wavelength corresponding to the highest first contrast; as well as The cloth is inspected under the light having the first optimum wavelength.

6. The cloth detection method according to claim 5, characterized in that: Also includes: comparing the highest first contrast ratio with a preset contrast ratio; When the highest first contrast is less than the preset contrast, reducing the wavelength interval; Modulating the light at reduced wavelength intervals within the wavelength range to generate a plurality of second fabric images of the fabric; comparing a plurality of second contrasts of the plurality of second fabric images to obtain a second highest contrast among the plurality of second contrasts; In the wavelength range, selecting a second optimum wavelength corresponding to the second highest contrast; as well as The cloth is inspected under the light having the second optimum wavelength.

7. The cloth detection method according to claim 5, characterized in that: Also includes: comparing a first contrast, a second contrast, and a third contrast among the plurality of first contrasts, wherein the first contrast, the second contrast, and the third contrast correspond to a first wavelength, a second wavelength, and a third wavelength in the wavelength range, respectively; When the second contrast is greater than the first contrast and the second contrast is greater than the third contrast, selecting the second wavelength as the first optimal wavelength; as well as When the second contrast is smaller than the third contrast, adjusting the light to a fourth wavelength in the wavelength range to generate a fourth contrast corresponding to the fourth wavelength, wherein the first wavelength, the second wavelength, the third wavelength and the fourth wavelength are arranged in sequence, and Two adjacent ones of the first wavelength, the second wavelength, the third wavelength and the fourth wavelength are separated by the wavelength interval.

8. The cloth detection method according to claim 7, characterized in that: Also includes: When the second contrast ratio is smaller than the third contrast ratio, comparing the second contrast ratio, the third contrast ratio and the fourth contrast ratio; and When the third contrast is greater than the second contrast and the third contrast is greater than the fourth contrast, the third wavelength is selected as the first optimum wavelength.

9. The cloth detection method according to claim 6, characterized in that: Also includes: Performing an initial operation on the plurality of initial images to generate the plurality of initial contrasts; Performing a first operation on the plurality of first fabric images to generate the plurality of first contrasts; generating a total amount of computation according to the initial computation and the first computation; and When the total computational load is greater than a preset computational load, at least one of a number of the plurality of initial wavelengths and the wavelength interval is adjusted to reduce the total computational load.

10. The cloth detection method according to claim 9, characterized in that: Wherein adjusting at least one of the number of the plurality of initial wavelengths and the wavelength interval further comprises: reducing the number of the plurality of initial wavelengths; and Increase the wavelength interval.