IMAGE PROCESSOR
Patent Information
- Application Number
- VN1202603130
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-08
- Filing Date
- 2024-07-24
- Publication Date
- 2026-07-15
AI Technical Summary
Existing image processing devices struggle to accurately extract uneven areas from photographed images of dyed knitted fabrics due to variations in stitch direction, which can lead to poor accuracy in evaluating dyeing quality.
The image processing device acquires brightness information and stitch information, including the positions of needle loops, to extract uneven areas. This involves detecting edges, extracting high contrast regions, and determining the aspect ratio and continuity of these regions along the course direction of the knitted fabric.
This approach allows for more accurate extraction of uneven areas, even with variations in stitch direction, thereby improving the evaluation of dyeing quality in knitted fabrics.
Smart Images

Figure VN1202603130_0
Abstract
Description
Image processing device
[0001] The present invention relates to an image processing device that extracts an uneven area corresponding to uneven dyeing from a photographed image of a dyed knitted fabric.
[0002] Patent Document 1 describes an image processing device that extracts uneven areas corresponding to dyeing unevenness from a captured image of a dyed knitted fabric. The image processing device converts the captured image to grayscale, removes the knitted fabric's stitch pattern from the captured image, smooths the image, and then detects edges in the captured image where brightness changes suddenly. The image processing device then extracts high-contrast areas where the edge gradient (brightness gradient) is equal to or greater than a predetermined value. The image processing device then removes noise from the processed image and corrects the gradient. Specifically, the image gradient is corrected by calculating the gradients of several high-contrast areas using the least squares method and rotating the image according to the average value of the calculated gradients. The image processing device then extracts, from the high-contrast areas, areas that have the characteristic of actual dyeing unevenness, i.e., elongated strips extending in the course direction, as uneven areas. Specifically, high-contrast areas that satisfy both the conditions that "the aspect ratio, which is the ratio of the size in the course direction to the size in the wale direction, is equal to or greater than a predetermined value" and "the size in the wale direction is within a predetermined range," are extracted as uneven areas. Then, in Patent Document 1, the dyeing quality of the knitted fabric is evaluated based on the uneven areas extracted by the image processing device.
[0003] Japanese Patent Publication No. 2021-140373
[0004] In Patent Document 1, the tilt of the image is corrected as described above, and then a thin, elongated region extending in the course direction from the high contrast region is extracted as an uneven region. However, since there is some variation in stitches, even if the tilt of the image is corrected, the horizontal direction in the image after the tilt correction does not match the course direction of the actual stitches, which can result in poor accuracy in extracting the uneven region.
[0005] An object of the present invention is to provide an image processing device that can extract uneven areas with higher accuracy from a photographed image of a dyed knitted fabric.
[0006] The image processing device of the first invention is an image processing device that extracts uneven areas corresponding to dyeing unevenness from a captured image of dyed knitted fabric, and executes a brightness information acquisition process that acquires brightness information, which is information about brightness at each position in the captured image; an unevenness candidate area information acquisition process that acquires, based on the brightness information, unevenness candidate area information, which is information about the position of an unevenness candidate area that is a candidate for the uneven area; a stitch information acquisition process that acquires, based on the brightness information, stitch information, which is information about the position of the stitches in the captured image; and an uneven area extraction process that extracts the uneven area based on the unevenness candidate area information and the stitch information.
[0007] The direction in which dye unevenness extends is determined by the stitch direction of the knitted fabric. Furthermore, due to the influence of stitch variations and the like, the stitch direction may vary from region to region of the knitted fabric. In the present invention, unevenness candidate region information, which is information on the position of an unevenness candidate region that is a candidate for an uneven region, is obtained based on brightness information. Furthermore, stitch information, which is information on the position of the stitch in the captured image, is obtained based on the brightness information. Then, an uneven region is extracted based on the unevenness candidate region information and the stitch information. This makes it possible to extract an uneven region with high accuracy even if there is variation in the stitch direction.
[0008] An image processing device of a second invention is the image processing device of the first invention, wherein in the stitch information acquisition process, information on the positions of a plurality of needle loops constituting the stitch is acquired as the stitch information.
[0009] The stitch direction of a knitted fabric is determined by the direction in which multiple needle loops are arranged. Furthermore, due to factors such as variations in stitches, variations in the direction in which multiple needle loops are arranged may occur for each region of the knitted fabric. According to the present invention, an uneven region is extracted with high precision based on unevenness candidate region information and information on the positions of multiple needle loops as stitch information. This makes it possible to extract an uneven region with high precision even if there is variation in the direction in which multiple needle loops are arranged.
[0010] The image processing device of the third invention is the image processing device of the second invention, and is provided with a memory unit that stores sample image information, which is information about a sample image of the needle loop, and in the stitch information acquisition process, based on the brightness information and the sample image information, extracts multiple high-similarity areas in the captured image that have a high similarity to the sample image, and acquires information about the positions of the multiple needle loops using information about the positions of the multiple high-similarity areas.
[0011] The area in the captured image where the needle loop is located has a high similarity to the sample image. In the present invention, multiple high-similarity areas in the captured image that have a high similarity to the sample image are extracted, and information on the positions of the high-similarity areas can be used to obtain information on the position of the needle loop.
[0012] The image processing device of the fourth invention is the image processing device of the third invention, and in the stitch information acquisition process, based on the brightness information, acquires information on the position of the representative point of the needle loop for each of the plurality of high similarity regions, and acquires information on the position of the plurality of needle loops based on information on the position of the plurality of representative points for the plurality of high similarity regions.
[0013] According to the present invention, information on the position of the representative point of the needle loop in each high similarity region is obtained, and information on the position of the needle loop is obtained based on information on the position of the representative points of multiple needle loops, thereby making it possible to obtain information on the position of the needle loop with high accuracy.
[0014] The image processing device of the fifth invention is an image processing device of any of the second to fourth inventions, and in the unevenness candidate area information acquisition process, detects edges contained in the captured image based on the brightness information, extracts high-contrast areas where the gradient of the edge is equal to or greater than a first predetermined value, and extracts, from the high-contrast areas, areas where the aspect ratio, which is the ratio of the size in the course direction to the size in the wale direction, is equal to or greater than a second predetermined value as the unevenness candidate area, and in the unevenness area extraction process, extracts, from the unevenness candidate area, continuous areas that overlap with a predetermined number or more of multiple needle loops lined up consecutively along the course direction as the unevenness area.
[0015] According to the present invention, high-contrast regions having an aspect ratio, which is the ratio of the size in the course direction to the size in the wale direction, equal to or greater than a second predetermined value are extracted as candidate irregularity regions, and continuous regions of the candidate irregularity regions that overlap with a predetermined number or more of needle loops lined up consecutively along the course direction are extracted as candidate irregularity regions. As a result, high-contrast regions with high aspect ratios, i.e., high-contrast regions that have the characteristic of actual dyeing unevenness, being elongated in the course direction, are extracted as candidate irregularity regions, and continuous regions of the extracted candidate irregularity regions in the direction in which the needle loops are lined up are extracted as candidate irregularity regions. Therefore, it is possible to extract the unevenness regions with high accuracy.
[0016] The image processing device of the sixth invention is the image processing device of the fifth invention, and in the unevenness candidate area information acquisition process, an area of the high contrast area whose aspect ratio is equal to or greater than the second predetermined value and whose size in the wale direction is within a predetermined range is extracted as the unevenness candidate area.
[0017] According to the present invention, among the high contrast regions, regions having an aspect ratio equal to or greater than a second predetermined value and a size in the wale direction within a predetermined range are extracted as candidate regions for unevenness. This makes it possible to extract, as candidate regions for unevenness, high contrast regions that have a high aspect ratio and a short length in the wale direction, i.e., high contrast regions that are elongated in the course direction, which are characteristic of uneven dyeing.
[0018] The image processing device of the seventh invention is an image processing device of any of the second to fourth inventions, in which, in the stitch information acquisition process, position information of a plurality of needle loop areas in the captured image, each of which contains one of the needle loops and is lined up in the wale direction and the course direction, is acquired as position information of the plurality of needle loops; in the unevenness candidate area information acquisition process, a representative brightness, which is a representative value of the brightness of the yarn area in which the yarn is located, is calculated for each of the plurality of needle loop areas based on the brightness information and the stitch information; needle loop areas for which the representative brightness satisfies a predetermined condition are extracted as the unevenness candidate area; and in the unevenness area extraction process, an area spanning a predetermined number or more of the unevenness candidate areas lined up consecutively along the course direction is extracted as the unevenness area.
[0019] In the present invention, a representative brightness in the yarn region is calculated for each of a plurality of needle loop regions, and needle loop regions whose representative brightness satisfies a predetermined condition are extracted as irregularity candidate regions. Then, a region spanning a predetermined number or more of consecutive irregularity candidate regions along the course direction is extracted as an irregularity region. This allows for accurate extraction of irregularity regions.
[0020] According to the present invention, uneven areas can be extracted with higher accuracy.
[0021] 4(c) is a diagram illustrating an example of an image processing apparatus according to a first embodiment; FIG. 4(a) is a schematic diagram of a test facility for evaluating the dyeing quality of a knitted fabric sample; FIG. 4(b) is a schematic diagram illustrating an enlarged view of a portion of the knitted fabric sample; and FIG. 4(c) is a flowchart illustrating a series of processes performed by an image processing apparatus according to a first embodiment; FIG. 4(a) is a diagram illustrating an example of an edge detection image, FIG. 4(b) is a diagram illustrating an example of a high-contrast region extraction image, and FIG. 4(c) is a diagram illustrating an example of an unevenness candidate region extraction image. FIG. 4(a) is a diagram illustrating an example of a sample image, FIG. 4(b) is a diagram illustrating representative points of needle loops, and FIG. 4(c) is a diagram illustrating acquisition of the needle loop positions. FIG. 4(a) is a diagram illustrating an example of a detected needle loop, FIG. 4(b) is a diagram illustrating an enlarged view of a portion of FIG. 4(c), and FIG. 4(c) is a diagram obtained by superimposing FIG. 4(a) and FIG. 4(b).
[0022] First Embodiment A preferred first embodiment of the present invention will now be described with reference to the drawings.
[0023] 1 is a schematic diagram of a test facility 1 for evaluating the dyeing quality of a knitted fabric sample in the first embodiment. The test facility 1 photographs a knitted fabric sample S (knitted fabric of the present invention) with a camera 3, and processes the photographed image with an image processing device 7 to extract an uneven area corresponding to uneven dyeing from the photographed image, thereby evaluating the dyeing quality of the knitted fabric sample S.
[0024] First, the knitted fabric sample S will be described. FIG. 2 is a schematic diagram showing an enlarged portion of the knitted fabric sample S. The knitted fabric sample S is a dyed knitted fabric obtained by tubular knitting a synthetic fiber yarn Y made of, for example, polyester. The knitted fabric sample S has a structure in which a single yarn Y forms multiple needle loops N arranged along the course direction (horizontal direction), and multiple needle loops N are formed in the wale direction (vertical direction perpendicular to the course direction) by hooking the yarn Y onto each of the multiple needle loops N. In other words, the stitches of the knitted fabric sample S are composed of multiple needle loops N. Dyeing unevenness in the yarn Y generally occurs continuously in the length direction of the yarn Y. Therefore, when the knitted fabric sample S is dyed, the dyeing unevenness occurs as streaks extending along the course direction, as shown by the thick lines in FIG. 2 .
[0025] For convenience, the course direction is shown as a direction parallel to the horizontal direction of Fig. 2, and the wale direction is shown as a direction parallel to the vertical direction of Fig. 2. However, in an actual knitted fabric sample S, variations in the direction in which multiple needle loops N are arranged may occur due to the influence of variations in stitches, etc., and variations in the course direction and wale direction may occur for each region of the knitted fabric sample S.
[0026] Returning to Fig. 1, the test facility 1 will be described. The test facility 1 has a camera 3, a support stand 4, two lights 5, a reflector 6, an image processing device 7, and a monitor 8. The camera 3, the support stand 4, the two lights 5, and the reflector 6 are arranged in a darkroom 2. The knitted fabric sample S is supported by the support stand 4, which is arranged in the center of the darkroom 2, so that the opening of the tubular knitted fabric faces up and down, i.e., so that the course direction is horizontal.
[0027] The camera 3 is arranged horizontally in front of the support stand 4. With this arrangement, the camera 3 can photograph the front of the knitted fabric sample S so that the course direction of the knitted fabric sample S is approximately parallel to the horizontal axis direction of the photographed image. By photographing with the magnification ratio of the camera 3 and the distance between the camera 3 and the knitted fabric sample S set to specified values, the size of the knitted fabric sample S shown in the photographed image becomes known. In this embodiment, the size of the knitted fabric sample S in the course direction (horizontal direction) in the photographed image is set to approximately 2056 pixels.
[0028] The two lights 5 are disposed behind the support base 4, and are arranged symmetrically on either side of the support base 4. The two lights 5 are tilted at an angle of approximately 45 degrees from the line connecting the camera 3 and the support base 4, and are positioned on a line passing through the camera 3. A reflector 6 is disposed near the camera 3, and reflects light from the two lights 5 toward the knitted fabric sample S. This makes the front surface of the knitted fabric sample S bright enough for photography.
[0029] The image processing device 7 is composed of a CPU, memory, a hard disk, etc. The image processing device 7 is electrically connected to the camera 3 and is capable of importing image data of the image of the knitted fabric sample S photographed by the camera 3. The image processing device 7 extracts uneven areas corresponding to actual dyeing unevenness from the photographed image by performing predetermined image processing on the photographed image of the knitted fabric sample S photographed by the camera 3. Furthermore, the image processing device 7 evaluates the dyeing quality of the knitted fabric sample S based on the extracted uneven areas. A monitor 8 is connected to the image processing device 7. The monitor 8 can display the photographed image of the knitted fabric sample S, the evaluation results of the dyeing quality of the knitted fabric sample S, etc.
[0030] <Extraction of Uneven Regions and Evaluation of Dyeing Quality> Next, extraction of uneven regions and evaluation of dyeing quality by the image processing device 7 will be described. FIG. 3 is a flowchart showing a series of processes performed by the image processing device 7. The image processing device 7 first executes grayscaling processing (step S101). In the grayscaling processing, the image processing device 7 imports image data of the image of the knitted fabric sample S captured by the camera 3 and converts the captured image into grayscale. Performing image processing using the grayscaled captured image can speed up calculation processing. Furthermore, when performing edge detection processing in step S105, it is possible to prevent edges from becoming unclear due to the influence of hue. Furthermore, when extracting the position of the needle loop N in step S110, it is possible to prevent edges of the needle loop N from becoming unclear due to the influence of hue. However, it is possible to proceed with subsequent processing using the color image as is without performing grayscaling processing.
[0031] Next, the image processing device 7 executes a brightness information acquisition process (step S102). In the brightness information acquisition process, the image processing device 7 acquires brightness information, which is information about brightness at each position of the grayscaled captured image. Next, the image processing device 7 performs the processes of steps S103 to S107 and steps S108 to S110, which will be described below, in parallel.
[0032] In step S103, the image processing device 7 executes a stitch removal process. In the stitch removal process, the image processing device 7 removes the stitch pattern from the grayscaled captured image based on the brightness information acquired in step S102. To remove the stitch pattern, for example, the technique described in Japanese Patent Application Laid-Open No. 2015-212924 may be employed. Specifically, periodic information having a repetition number equal to or greater than a×N, which is the repetition number (known number) of needle loops N per unit length multiplied by a predetermined coefficient a, is removed using a low-pass filter. The coefficient a is, for example, an arbitrary value between 0.7 and 0.9. However, the method for removing the stitch pattern is not limited to the one described here, and other methods may also be used.
[0033] Next, the image processing device 7 performs a smoothing process (step S104). In the smoothing process, the image processing device 7 smooths the captured image from which the stitch pattern has been removed. The smoothing is performed to remove minute noise caused by remnants of the stitch pattern that were not completely removed in step S103. For example, a well-known Wiener filter can be applied for the smoothing. The filter size is, for example, approximately 5 to 25 pixels by 10 to 60 pixels. However, the type and size of the filter are not limited to these. It is also possible to perform the subsequent processes without performing the smoothing process.
[0034] Next, the image processing device 7 performs edge detection processing on the smoothed captured image (step S105). The edge detection processing is performed to detect edges, which are areas in the captured image where brightness changes suddenly. For example, a known Prewitt filter can be applied to the edge detection processing. The filter size is, for example, 3 pixels x 3 pixels. However, the type and size of the filter are not limited to these. FIG. 4(a) is an example of an edge-detected image 10A, which is a captured image in which an edge 11 has been detected by the edge detection processing. As shown in each diagram in FIG. 4, the horizontal direction of each image corresponds to the course direction, and the vertical direction corresponds to the wale direction.
[0035] Next, the image processing device 7 executes a high-contrast region extraction process (step S106). In the high-contrast region extraction process, the image processing device 7 extracts high-contrast regions 12 where the gradient (gradient of brightness) of the edge 11 is equal to or greater than a first predetermined value. Specifically, the image processing device 7 executes a binarization process on the edge-detected image 10A using the first predetermined value as a threshold value, thereby coloring pixels where the gradient of the edge 11 is equal to or greater than the threshold value as white and pixels where the gradient of the edge 11 is less than the threshold value as black. FIG. 4B shows a high-contrast region extraction image 10B in which the high-contrast regions 12 are extracted as white from the edge-detected image 10A shown in FIG. 4A. The first predetermined value may be determined, for example, in a manner similar to that described in Patent Document 1. Specifically, a histogram is created for the edge-detected image 10A, with the gradient of the edge 11 on the horizontal axis and the number of pixels on the vertical axis. Then, the upper limit U of the gradient of the edge 11 obtained from the histogram is multiplied by a predetermined coefficient b to obtain b × U, which is used as the threshold value for the binarization process. The coefficient b is an arbitrary value between 0.15 and 0.5, for example, but the upper limit may be determined by a different method.
[0036] Next, the image processing device 7 executes an unevenness candidate region extraction process (step S107). In the unevenness candidate region extraction process, a region of the high contrast region 12 that has the characteristic of actual dye unevenness, that is, that it is elongated in the course direction, is extracted as an unevenness candidate region 13 that is a candidate for an uneven region. Specifically, a high contrast region 12 that satisfies both the conditions that "the aspect ratio, which is the ratio of the size in the course direction to the size in the wale direction, is equal to or greater than a second predetermined value" and "the size in the wale direction is within a predetermined range" is extracted as the unevenness candidate region 13. In this way, information on the position of the unevenness candidate region 13 is acquired.
[0037] Fig. 4(c) shows an unevenness candidate region extracted image 10C in which unevenness candidate region 13 has been extracted from high-contrast region extracted image 10B of Fig. 4(b), i.e., an image obtained by performing the unevenness candidate region extraction process on high-contrast region extracted image 10B of Fig. 4(b). As can be seen from a comparison of Fig. 4(b) and Fig. 4(c), by performing the unevenness candidate region extraction process, short or thick high-contrast regions 12 that do not have the characteristics of actual dye unevenness are eliminated, and elongated high-contrast regions 12 that extend linearly in the course direction can be extracted as unevenness candidate regions 13.
[0038] In the unevenness candidate region extraction process, the horizontal direction of the high contrast region extraction image 10B is defined as the course direction, and the vertical direction of the high contrast region extraction image 10B is defined as the wale direction, and a region that satisfies the above two conditions is extracted as the unevenness candidate region 13. In other words, the unevenness candidate region 13 extracted in the unevenness candidate region extraction process is extracted without taking into consideration the variations in the course direction and wale direction for each region of the knitted fabric sample S described above.
[0039] In the first embodiment, the processes in steps S105 to S107 correspond to the unevenness candidate area information acquisition process of the present invention.
[0040] In step S108, the image processing device 7 executes a high-similarity region extraction process. As shown in FIG. 1 , the image processing device 7 includes a storage unit 9. The storage unit 9 stores information about a sample image P of one needle loop N, as shown in FIG. 5A , for example. In this embodiment, the information about the sample image P corresponds to the “sample image information” of the present invention. For clarity, the sample image P is enlarged in FIG. 5A . In the high-similarity region extraction process, the image processing device 7 compares each region of the captured image with the sample image P and extracts multiple high-similarity regions in the captured image that have a high similarity to the sample image P. This allows the approximate region in the captured image where each needle loop N is located to be extracted. In the high-similarity region extraction process, for example, a correlation matrix is calculated based on the brightness data of each region of the captured image and the data of the sample image P, and high-similarity regions are extracted based on the correlation coefficient values in the correlation matrix. However, the method for extracting high-similarity regions is not limited to this. Although not shown in the figure, the extracted high similarity region is a region similar to a needle loop region R (see FIG. 5C) described later. However, compared to the needle loop region R, the high similarity region has lower accuracy with respect to the position of the actual needle loop N.
[0041] Next, the image processing device 7 executes a representative point acquisition process (step S109). In the representative point acquisition process, the image processing device 7 acquires information on the position of the representative point M of the needle loop N corresponding to the high similarity region, as shown in Fig. 5(b), based on the brightness distribution in each of the multiple high similarity regions extracted in step S108. Fig. 5(b) illustrates a case in which information on the position of the lower right end of each needle loop N in the figure is acquired as information on the position of the representative point M of the needle loop N. However, information on another position of each needle loop N, such as information on the position of the lower left end of each needle loop N in Fig. 5(b) or information on the position of the upper end of each needle loop N in Fig. 5(b), may also be acquired as information on the position of the representative point M.
[0042] Next, the image processing device 7 executes a loop position extraction process (step S110). In the loop position extraction process, the image processing device 7 acquires position information of multiple needle loop regions R in the captured image, in which one needle loop N is respectively located, based on position information of the multiple representative points M acquired in the representative point acquisition process. FIG. 5C shows an example of the needle loop region R acquired in the loop position extraction process. In the loop position extraction process, position information of the needle loop region R is acquired based on position information of the multiple representative points M, so the acquired needle loop region R indicates the position of the needle loop N more accurately than the high similarity region described above. Furthermore, the multiple needle loop regions R obtained in the loop position extraction process are aligned along the course direction and the wale direction. However, due to the influence of the above-described stitch variation and the like, the direction in which the multiple needle loop regions R are aligned may be slightly tilted with respect to the course direction (horizontal direction of the captured image) shown in FIG. 2 and the wale direction (vertical direction of the captured image) shown in FIG. 2, respectively.
[0043] In addition, in the loop position extraction process, the image processing device 7 divides each needle loop region R into a thread region V where the thread Y is located and a background region W where no thread is located based on the magnitude relationship between the brightness at each position of each acquired needle loop region R and a predetermined threshold value, and generates data for an area division image 15, which is a captured image in which the thread region V and the background region W are divided by a brightness difference of a predetermined value or more, as shown in Figure 6 (a).
[0044] In the first embodiment, the processes of S108 to S110 are combined to form the stitch information acquisition process of the present invention. Also, in the first embodiment, the information on the position of the yarn region V indicated by the data of the region division image 15 as shown in Fig. 6(a) is the information on the position of the needle loop N of the present invention (stitch information of the present invention).
[0045] After the processes of steps S103 to S107 and steps S108 to S110 are completed, the image processing device 7 then executes an unevenness region extraction process (step S111). In the unevenness region extraction process, the image processing device 7 extracts, from the unevenness candidate region 13, a continuous region that overlaps with a predetermined number or more of needle loops N that are successively arranged along the course direction, as an unevenness region 14, based on the position of the unevenness candidate region 13 extracted in step S107 and the position of the needle loops N extracted in step S110.
[0046] For example, Figure 6(b) is an enlarged view of a portion of the candidate irregularity region extraction image 10C of Figure 4(c), the same size as Figure 6(a). In the unevenness region extraction process, the image processing device 7 extracts, as shown in Figure 6(c), a continuous region of the candidate irregularity region 13 that overlaps with a predetermined number or more of needle loops N arranged consecutively along the course direction when the region division image 15 of Figure 6(a) and the candidate irregularity region extraction image 10C of Figure 6(b) are superimposed. To facilitate understanding of the drawing, Figure 6(c) shows the positions of the needle loops N in Figure 6(a) and the positions of the candidate irregularity region 13 in Figure 6(b) with different densities. In the example of Figure 6(c), if the predetermined number is set to two, for example, the regions within the candidate irregularity region 13, which are located within the multiple frames indicated by the two-dot chain lines in the figure, are each extracted as the candidate irregularity region 14.
[0047] Next, the image processing device 7 evaluates the dyeing quality of the knitted fabric based on the extracted uneven regions 14 (step 112). The method for evaluating the dyeing quality of the knitted fabric is similar to that described in, for example, Patent Document 1. Specifically, the image processing device 7 connects two or more uneven regions 14 that are separated by a first distance or less in the wale direction and a second distance or less in the course direction, and regards them as a single uneven region. The image processing device 7 then creates a histogram of the width ratios of each of the connected uneven regions 14, and evaluates the dyeing quality of the knitted fabric based on the frequency of occurrence for each width ratio class. However, the dyeing quality of the knitted fabric may also be evaluated based on the extracted uneven regions 14 using a different method.
[0048] <Effects> The direction in which dye unevenness extends is determined by the stitch direction of the knitted fabric, i.e., the direction in which the multiple needle loops N are arranged. Furthermore, due to the influence of stitch variations and the like, variations in the direction in which the needle loops N are arranged may occur for each region of the knitted fabric. In the first embodiment, unevenness candidate region information, which is information on the unevenness candidate region 13 that is a candidate for the uneven region 14, is obtained based on lightness information. Furthermore, information on the positions of the multiple needle loops N is obtained as stitch information, which is information on the positions of the stitches in the captured image. Then, the uneven region 14 is extracted based on the unevenness candidate region information and the stitch information. As a result, even if there is variation in the direction in which the multiple needle loops N are arranged due to the influence of stitch variations and the like, the uneven region 14 can be extracted with high accuracy.
[0049] Furthermore, in the first embodiment, multiple high similarity regions that have a high similarity to the sample image P of the needle loop N are extracted from the captured image. Then, based on the brightness information, information on the position of the representative point M of the needle loop N is obtained for each high similarity region. Then, based on the information on the position of the representative point M for the multiple needle loops N, information on the position of the needle loop N is obtained. This makes it possible to obtain information on the position of the multiple needle loops N with high accuracy.
[0050] In the first embodiment, edges included in the captured image are detected, and high-contrast regions 12 with edge gradients equal to or greater than a first predetermined value are extracted. Of the high-contrast regions 12, high-contrast regions with an aspect ratio (the ratio of the size in the course direction to the size in the wale direction) equal to or greater than a second predetermined value and a length in the wale direction within a predetermined range are extracted as candidate irregularity regions 13. Of the candidate irregularity regions 13, continuous regions overlapping with at least a predetermined number of needle loops N arranged consecutively along the course direction are extracted as candidate irregularity regions 14. As a result, high-contrast regions 12 with a high aspect ratio and a short length in the wale direction, i.e., high-contrast regions 12 that exhibit the characteristic of dyeing unevenness, being elongated in the course direction, are extracted as candidate irregularity regions 13. Of the extracted candidate irregularity regions 13, continuous regions in the direction in which the needle loops N are arranged are extracted as candidate irregularity regions 14. Therefore, the candidate irregularity regions 14 can be extracted with high accuracy.
[0051] Second Embodiment Next, a preferred second embodiment of the present invention will be described with reference to the drawings. The second embodiment relates to a testing facility 1 similar to that of the first embodiment. In the second embodiment, an image processing device 7 extracts uneven areas by performing processing in accordance with the flowchart shown in Fig. 7, and evaluates the dyeing quality of a knitted fabric based on the extracted uneven areas.
[0052] More specifically, the image processing device 7 executes grayscale processing similar to step S101 in the first embodiment (step S201), and then executes brightness information acquisition processing similar to step S102 in the first embodiment (step S202). However, in the second embodiment, it is also possible to proceed with the processing from step S202 onward on a color image without executing grayscale processing.
[0053] Next, the image processing device 7 performs, in parallel, a stitch removal process (step S203) and a smoothing process (step S204) similar to steps S103 and S104 in the first embodiment, and a high similarity region extraction process (step S205), a representative point acquisition process (step S206), and a loop position extraction process (step S207) similar to steps S108 to S110 in the first embodiment. Also, as described in the first embodiment, the smoothing process in step S204 does not have to be performed.
[0054] Furthermore, in the second embodiment, unlike the first embodiment, in the loop position extraction process of step 207, information on the positions of multiple needle loop regions R is obtained, and information on the position of the thread region V in each needle loop region R is obtained.
[0055] In the second embodiment, the combined processing of steps S205 to S207 corresponds to the stitch information acquisition processing of the present invention. Also, in the second embodiment, information on the position of the needle loop region R and the position of the yarn region V in each needle loop region R is information on the position of the needle loop N (stitch information of the present invention).
[0056] After completing steps S203 and S204 and steps S205 to S207, the image processing device 7 then executes an irregularity candidate region information acquisition process (step S208). In the irregularity candidate region information acquisition process, the image processing device 7 calculates an average brightness, which is the average value of the brightness of the yarn region V, for each of the multiple needle loop regions R, and extracts needle loop regions R whose average brightness is less than a threshold value TH as irregularity candidate regions, thereby acquiring information on the positions of the irregularity candidate regions.
[0057] As an example, FIG. 8(b) shows the average brightness of the thread region V for each of 33 needle loop regions R, which are assigned loop numbers (1) to (33) as shown in FIG. 8(a). In this example, needle loop regions R assigned loop numbers (16), (17), (19), (21), (22), and (23) are extracted as candidate irregularity regions. In the second embodiment, the average brightness of the thread region V is the representative brightness of the present invention. Furthermore, the condition that "the average brightness of the thread region V is less than the threshold value TH" is the predetermined condition of the present invention.
[0058] Next, the image processing device 7 executes an uneven region extraction process (step S209). In the uneven region extraction process, the image processing device 7 extracts, as an uneven region, a region that includes at least a predetermined number of consecutive unevenness candidate regions aligned along the course direction.
[0059] 8(a) and 8(b), when the predetermined number is two, the area spanning two needle loop regions R with loop numbers (16) and (17) and the area spanning three needle loop regions R with loop numbers (21) to (23) are extracted as uneven regions. Also, when the predetermined number is three in the example of Figures 8(a) and 8(b), the area spanning three needle loop regions R with loop numbers (21) to (23) is extracted as uneven regions.
[0060] Next, the image processing device 7 evaluates the dyeing quality of the knitted fabric based on the extracted uneven areas, similar to step S111 in the first embodiment (step 210).
[0061] <Effect> In the second embodiment, by extracting an uneven area based on information about the candidate uneven area and information about the positions of multiple needle loops N as stitch information, the uneven area can be extracted with high accuracy even if there is variation in the direction in which the multiple needle loops N are arranged due to the influence of stitch variation, etc.
[0062] Also in the second embodiment, multiple high similarity regions are extracted from the captured image, and information on the position of the representative point M of the needle loop N is obtained for each high similarity region, and information on the position of the needle loop N is obtained based on the information on the positions of the representative points M for the multiple needle loops N. This makes it possible to obtain information on the position of the needle loop N with high accuracy.
[0063] In the second embodiment, the average brightness of the thread region V in each of the multiple needle loop regions R is calculated, and needle loop regions R where the average brightness of the thread region V is less than the threshold value TH are extracted as irregularity candidate regions. Then, an area spanning a predetermined number or more of consecutive irregularity candidate regions along the course direction is extracted as an irregularity region. This enables the irregularity region to be extracted with high accuracy.
[0064] [Modifications] Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments and various modifications are possible.
[0065] In the first embodiment, high contrast regions 12 whose aspect ratio is equal to or greater than the second predetermined value and whose length in the wale direction is within a predetermined range are extracted as candidate irregularity regions 13. However, this is not limiting. In the first embodiment, high contrast regions 12 whose aspect ratio is equal to or greater than the second predetermined value may be extracted as candidate irregularity regions 13, regardless of the length in the wale direction.
[0066] Furthermore, in the second embodiment, the average brightness of the thread regions V of the multiple needle loop regions R is calculated as the representative value of the brightness of the thread regions V of the multiple needle loop regions R, and needle loop regions R where the average brightness of the thread regions V is less than the threshold value TH are extracted as irregularity candidate regions, but this is not limited to this. For example, in the second embodiment, another value such as the median, maximum value, or minimum value of the brightness of the thread regions V may be calculated as the representative brightness that is the representative value of the brightness of the thread regions V of the multiple needle loop regions R. Furthermore, needle loop regions R that satisfy a predetermined condition other than the condition that the representative brightness of the thread region V is less than the threshold value TH may be extracted as irregularity candidate regions.
[0067] Furthermore, in the first and second embodiments, multiple high similarity regions are extracted from the captured image, information on the position of the representative point M of the needle loop N is obtained for each high similarity region, and information on the position of the needle loop N is obtained based on the information on the positions of these representative points M. However, this is not limited to this. For example, if a high similarity region can be extracted as one that accurately indicates the position of the needle loop N, information on the position of the high similarity region may be obtained as information on the position of the needle loop N. Furthermore, information on the position of multiple needle loops N may be obtained by another method.
[0068] Furthermore, the method for extracting the unevenness region 14 based on the candidate unevenness region and stitch information is not limited to the method described in the first and second embodiments. The unevenness region 14 may be extracted based on the candidate unevenness region information and stitch information using a method other than that described in the first and second embodiments.
[0069] In this case, the irregularity candidate area information may be the same as that described in the first and second embodiments, or may be information on the position of the irregularity candidate area different from that described in the first and second embodiments. Furthermore, regardless of whether the irregularity candidate area information is the same as that described in the first and second embodiments, the irregularity candidate area information may be acquired by a method different from that described above.
[0070] In this case, the stitch information may be information on the positions of a plurality of needle loops N similar to that described in the first and second embodiments, or may be information on the position of a different stitch. Regardless of whether the stitch information is information on the positions of a plurality of needle loops N similar to that described in the first and second embodiments, the stitch information may be acquired by a method different from that described above.
[0071] Furthermore, the dyeing quality of the knitted fabric may be evaluated based on the extracted uneven regions 14 by a method different from that of the first and second embodiments. Furthermore, in the first and second embodiments, the image processing device 7 extracts the uneven regions 14 and also evaluates the dyeing quality of the knitted fabric based on the extracted uneven regions 14, but this is not limiting. For example, the image processing device 7 may output histogram data relating to the width ratio of the extracted uneven regions 14, and the worker may evaluate the dyeing quality of the knitted fabric based on the output data.
[0072] 7: Image processing device 9: Storage unit 12: High contrast area 13: Possible unevenness area 14: Unevenness area M: Representative point N: Needle loop P: Sample image R: Needle loop area S: Knitted fabric sample V: Yarn area
Claims
1. An image processing device that extracts uneven areas corresponding to uneven dyeing from a captured image of a dyed knitted fabric, characterized in that the image processing device executes the following processes: a brightness information acquisition process that acquires brightness information, which is information about brightness at each position in the captured image; an unevenness candidate area information acquisition process that acquires, based on the brightness information, unevenness candidate area information, which is information about the position of an unevenness candidate area that is a candidate for the uneven area; a stitch information acquisition process that acquires, based on the brightness information, stitch information, which is information about the position of stitches in the captured image; and an unevenness area extraction process that extracts the unevenness area based on the unevenness candidate area information and the stitch information.
2. The image processing device according to claim 1, wherein, in the stitch information acquisition process, information on the positions of a plurality of needle loops constituting the stitch is acquired as the stitch information.
3. An image processing device as described in claim 2, further comprising a memory unit for storing sample image information, which is information on a sample image of the needle loop, and in the stitch information acquisition process, extracting a plurality of highly similar areas in the captured image that have a high similarity to the sample image based on the brightness information and the sample image information, and acquiring information on the positions of the plurality of needle loops using information on the positions of the plurality of highly similar areas.
4. The image processing device described in claim 3, characterized in that in the stitch information acquisition process, information on the position of the representative point of the needle loop is acquired for each of the multiple high similarity regions based on the brightness information, and information on the position of the multiple needle loops is acquired based on information on the positions of the multiple representative points for the multiple high similarity regions.
5. An image processing device as described in any one of claims 2 to 4, characterized in that in the unevenness candidate area information acquisition process, edges contained in the captured image are detected based on the brightness information, high contrast areas in which the gradient of the edge is equal to or greater than a first predetermined value are extracted, and from among the high contrast areas, areas in which the aspect ratio, which is the ratio of the size in the course direction to the size in the wale direction, is equal to or greater than a second predetermined value are extracted as the unevenness candidate area, and in the unevenness area extraction process, a continuous area portion of the unevenness candidate area that overlaps with a predetermined number or more of multiple needle loops lined up consecutively along the course direction is extracted as the unevenness area.
6. The image processing device according to claim 5, characterized in that in the unevenness candidate area information acquisition process, an area of the high contrast area in which the aspect ratio is equal to or greater than the second predetermined value and the size in the wale direction is within a predetermined range is extracted as the unevenness candidate area.
7. An image processing device as claimed in any one of claims 2 to 4, characterized in that in the stitch information acquisition process, position information of a plurality of needle loop areas in the captured image, each of which contains one of the needle loops and is lined up in the wale direction and course direction, is acquired as position information of the plurality of needle loops; in the unevenness candidate area information acquisition process, a representative brightness which is a representative value of the brightness of the yarn area in which the yarn is located is calculated for each of the plurality of needle loop areas based on the brightness information and the stitch information, and a needle loop area where the representative brightness satisfies a predetermined condition is extracted as the unevenness candidate area; and in the unevenness area extraction process, an area spanning a predetermined number or more of the unevenness candidate areas lined up consecutively along the course direction is extracted as the unevenness area.