Color difference measurement method, device, equipment and storage medium
Patent Information
- Application Number
- CN202311216712.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-09-19
AI Technical Summary
[0004]本公开提供了一种色差测量方法、装置、设备及存储介质,以解决或缓解现有技术中的一项或更多项技术问题
[0021]本公开提供的技术方案的有益效果至少包括:将目标片段经过检测部测量口的时间范围与多个采样点的采样时间点进行比较,以得到有效采样点的颜色值,有利于提高基于检测部检测待测织物的颜色的准确性。基于有效采样点的颜色值,能够使所确定的色差值更加准确,从而有利于提高检测待测织物所对应的丝锭的色差结果的准确性。
Smart Images

Figure CN117269073B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to the field of color difference measurement. Background Technology
[0002] Fabric is a flat, soft sheet-like material formed by crossing, knotting, and connecting small, flexible strands of material. Fabrics can include woven fabrics, knitted fabrics, third-dimensional fabrics, nonwoven fabrics, three-dimensional fabrics, and three-dimensional fabrics. All types of fabrics can be dyed.
[0003] However, the actual color after dyeing may deviate from the expected color. Therefore, it is necessary to inspect the dyeing results of the fabric. Summary of the Invention
[0004] This disclosure provides a color difference measurement method, apparatus, device, and storage medium to solve or alleviate one or more technical problems in the prior art.
[0005] In a first aspect, this disclosure provides a color difference measurement method, wherein the fabric to be tested is woven from multiple spindles, and each spindle has a corresponding fabric segment on the fabric to be tested, and there are dividing bands between different fabric segments. The method includes:
[0006] Each fabric segment of the fabric to be tested is sequentially transported to the measuring port of the detection unit so that the detection unit can collect color values at multiple sampling points on the fabric to be tested according to a preset sampling time point sequence.
[0007] During the sampling process at the testing department, the time range within which the target segment of the fabric to be tested passes through the measuring port of the testing department is determined; the target segment is any fabric segment of the fabric to be tested.
[0008] Based on the time range and the sampling time points of multiple sampling points, the effective sampling points of the target segment are selected from multiple sampling points;
[0009] Based on the color values and standard values of the valid sampling points, the color difference value of the target spindle corresponding to the target segment is determined.
[0010] Secondly, this disclosure provides a color difference measuring device, wherein the fabric to be tested is woven from multiple spindles, and each spindle has a corresponding fabric segment on the fabric to be tested, and there are dividing bands between different fabric segments. The device includes:
[0011] The conveying module is used to sequentially convey each fabric segment of the fabric to be tested to the measuring port of the detection unit, so that the detection unit can collect color values at multiple sampling points on the fabric to be tested according to a preset sampling time point sequence.
[0012] The first determining module is used to determine the time range during which the target segment of the fabric to be tested passes through the measuring port of the detection unit during the sampling process of the fabric being transported to the detection unit; the target segment is any fabric segment of the fabric to be tested.
[0013] The filtering module is used to filter out valid sampling points of the target segment from multiple sampling points based on the time range and the sampling time points of multiple sampling points;
[0014] The second determining module is used to determine the color difference value of the target spindle corresponding to the target segment based on the color value and standard value of the valid sampling point.
[0015] Thirdly, an electronic device is provided, comprising:
[0016] At least one processor; and
[0017] The memory is communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform any of the methods described in the present disclosure.
[0019] Fourthly, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods according to embodiments of the present disclosure.
[0020] Fifthly, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the methods according to embodiments of the present disclosure.
[0021] The beneficial effects of the technical solution provided in this disclosure include at least the following: comparing the time range of the target segment passing through the measurement port of the detection unit with the sampling time points of multiple sampling points to obtain the color value of the effective sampling point, which helps to improve the accuracy of color detection of the fabric under test based on the detection unit. Based on the color value of the effective sampling point, the determined color difference value can be more accurate, thereby helping to improve the accuracy of the color difference result of the corresponding spindle of the fabric under test.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0023] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments provided according to this disclosure and should not be construed as limiting the scope of this disclosure.
[0024] Figure 1 This is a schematic diagram of the structure of the fabric to be tested according to an embodiment of the present disclosure;
[0025] Figure 2 This is a schematic diagram of the structure of a color detector according to another embodiment of the present disclosure;
[0026] Figure 3 This is a flowchart of a color difference measurement method according to another embodiment of the present disclosure;
[0027] Figure 4 This is a schematic diagram of the structure of a color detector according to another embodiment of the present disclosure;
[0028] Figure 5 This is a schematic diagram of the structure of a color detector according to another embodiment of the present disclosure;
[0029] Figure 6 This is a schematic diagram illustrating the determination of the time range of a target segment according to another embodiment of this disclosure;
[0030] Figure 7 This is a schematic diagram illustrating sampling of a target segment according to another embodiment of this disclosure;
[0031] Figure 8 This is a schematic diagram illustrating the determination of valid sampling points for a target segment according to another embodiment of this disclosure;
[0032] Figure 9 This is a schematic diagram of the color difference measuring device according to another embodiment of the present disclosure;
[0033] Figure 10 This is a block diagram of an electronic device used to implement the color difference measurement method of the embodiments of this disclosure. Detailed Implementation
[0034] The present disclosure will now be described in further detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0035] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0036] Silk fabrics are woven from threads on spindles. In this embodiment, a colorimeter is used to detect the dyeing results of the threads on each spindle. To improve detection efficiency, in this embodiment, multiple spindles are woven into a single fabric to be tested, and each spindle has a corresponding fabric segment on the fabric, with dividing strips between different fabric segments. For example... Figure 1 The diagram shown is a schematic representation of the structure of the fabric to be tested in an embodiment of this disclosure. Figure 1 In the test fabric, the fabric segment to be tested is woven from fabric segment 1, fabric segment 2, fabric segment 3, ..., fabric segment N. There is a dividing band between fabric segment 1 and fabric segment 2, between fabric segment 2 and fabric segment 3, and between fabric segment N-1 and fabric segment N. Correspondingly, each fabric segment has a corresponding relationship with each spindle. Specifically, fabric segment 1 corresponds to spindle 1, fabric segment 2 corresponds to spindle 2, fabric segment 3 corresponds to spindle 3, and fabric segment N corresponds to spindle N. Here, N is a positive integer greater than or equal to 1.
[0037] The widths of the dividing strips can be the same or different. Therefore, multiple spindles can be tested using a single fabric sample.
[0038] like Figure 2 The diagram shown is a structural schematic of a color detector provided in an embodiment of this disclosure. Its core components include a housing 201, a detection unit 202 located inside the housing, an inlet and an outlet disposed opposite each other along a first direction, a mounting member 203, and a moving assembly 204. Wherein:
[0039] The detection unit 202 is used to detect the color of the fabric to be tested. The core component of the detection unit 202 can be a spectrometer or a colorimeter; this embodiment is not limited to either, as long as it can measure the color value of the fabric to be tested. The mounting member 203 is used to mount the fabric to be tested. A moving component 204 is connected to the mounting member 203. The moving component 204 is used to move the fabric to be tested relative to the housing 201 along a first direction, so that the fabric to be tested enters the housing 201 from the inlet and exits the housing 201 from the outlet, so that it can pass through the measuring port of the detection unit 202 during the transport of the fabric to be tested, thereby realizing color measurement at the sampling point of the fabric to be tested.
[0040] Therefore, the color detector will sample multiple sampling points on the fabric to be tested. In practice, a preset sampling time point sequence can be set, which includes multiple time points, such as sequence 1.<t1、t2……tn> The testing department samples according to this sequence.
[0041] Since it is necessary to detect the color value of each spindle, embodiments of this disclosure provide a color difference measurement method. For example... Figure 3 The diagram shown is a flowchart of a color difference measurement method in an embodiment of this disclosure, including:
[0042] S301, the various fabric segments of the fabric to be tested are sequentially transported to the measuring port of the detection unit so that the detection unit can collect color values at multiple sampling points on the fabric to be tested according to the preset sampling time point sequence.
[0043] The detection unit samples the color values of the fabric to be tested. Since the color value of a single sampling point may be limited, a sufficient number of sampling points are typically collected. This embodiment does not limit the number of sampling points.
[0044] The preset sampling time points can be determined in various ways, and multiple preset sampling time points constitute a preset sampling time point sequence. This embodiment does not limit the method for determining the preset sampling time points. For example, they can be set manually. Specifically, when setting two sampling points for each fabric segment, they can be set manually. As a sequence of sampling time points.
[0045] Furthermore, a preset sampling time point sequence can be obtained through calculation. In one possible implementation, the first sampling time point for fabric segment 1 can be set as... The sampling time span is set to t ' Based on this, for each other fabric segment, the sampling time point + t for the previous fabric segment is set as the sampling time point for the next fabric segment. That is, the sampling time point for fabric segment 1 is... The sampling time point for fabric fragment 2 is The sampling time point of fabric fragment 3 is The preset sampling time point sequence is as follows: For this calculation method, with three sampling points set for each fabric segment, the first sampling time point for fabric segment 1 is set as... The sampling time span is set to "t". For each other fabric segment, the sampling time point for the previous fabric segment + "t" is set as the sampling time point for the next fabric segment. Therefore, the sampling time point for fabric segment 1 is... The sampling time point for fabric fragment 2 is The sampling time point of fabric fragment 3 is The preset sampling time point sequence is as follows: Similarly, the same applies to cases where four or more sampling points are set for each fabric segment.
[0046] In another possible implementation, if two sampling points are set for each fabric segment, the sampling time point for the first part of the fabric segment can be set to... Based on this, for the other fabric segments, the sampling time point of the first fabric segment + t is set as the sampling time point for the next fabric segment; that is, the sampling time point of the second fabric segment is... The sampling time points for the fabric fragments in the third part are: The preset sampling time point sequence is as follows: Similarly, the same applies to setting three or more sampling points for each fabric segment.
[0047] However, during the use of the testing unit, the condition of the fabric under test may affect the color difference detection results. For example, during the process of fitting the fabric under test onto the mounting device, the fabric is usually inevitably stretched. If the stretching tension is uneven, the width of a local area of the fabric (i.e., the width along the direction of the continuous fabric segments) will deviate from the expected width. Therefore, when the testing unit samples the fabric, the sampling points obtained will be inaccurate. For example, the sampling points may deviate from the parts of the fabric that need to be sampled, resulting in a difference between the measured color of the fabric and the expected color, thus affecting the detection results of the spindle color difference analyzed based on the measured fabric color. However, under the limitations of hardware facilities, it is usually difficult to fundamentally avoid stretching of the fabric under test. Therefore, if the problem of potentially inaccurate sampling by the testing unit can be overcome even when the fabric under test is stretched, the problem of potentially inaccurate spindle color difference measurements by the testing unit can be effectively solved.
[0048] Therefore, in S302, during the process of transporting the fabric to be tested to the detection unit for sampling via the mounting component and the moving assembly, the time range of the target segment of the fabric to be tested passing through the measurement port of the detection unit can be determined.
[0049] The target segment is any fabric segment in the fabric to be tested. The time range during which the target segment of the fabric to be tested passes through the measuring port of the detection unit can be understood as the time interval between the moment when the target segment first arrives at the measuring port of the detection unit and the moment when the target segment leaves the measuring port of the detection unit.
[0050] S303, based on the above time range and the sampling time points of multiple sampling points, select the valid sampling points of the target segment from the multiple sampling points.
[0051] For the target segment, not all sampling points collected on the fabric under test are valid. That is, if the sampling time point is within the aforementioned time range, the corresponding sampling point is a valid sampling point for the target segment. Conversely, if the sampling time point is outside the aforementioned time range, the corresponding sampling point is an invalid sampling point for the target segment and must be discarded.
[0052] S304, based on the color values and standard values of the valid sampling points, determine the color difference value of the target spindle corresponding to the target segment.
[0053] The standard value can be customized, meaning any color value can be set as the standard value (i.e., the expected value) according to actual needs. The color difference value can be obtained from the color value and the standard value.
[0054] In this embodiment, by comparing the time range of the target segment passing through the measurement port of the detection unit with the sampling time points of multiple sampling points, valid sampling points of the target segment are selected, thereby obtaining the color values of the valid sampling points. This improves the accuracy of color detection of the fabric under test based on the detection unit. Compared to directly determining the color difference value of the target spindle corresponding to the target segment based on the color values of multiple sampling points, determining the color difference value based on the color values of the valid sampling points is more accurate, thus improving the accuracy of the color difference results of the spindle corresponding to the fabric under test.
[0055] In some embodiments, valid sampling points are sampling points that are not on the segmentation band of the target segment.
[0056] Since the segmentation band of the target segment may occupy a certain width in the fabric to be tested, the sampling points for the target segment may also fall on the segmentation band of the target segment. The sampling points that fall on the segmentation band of the target segment should also be discarded. That is, the effective sampling points do not include the sampling points that fall on the segmentation band of the target segment.
[0057] In this embodiment of the disclosure, since there are also differences in color values between the target segments and the segmentation bands of the target segments, and the segmentation bands are not strictly equivalent to the spindles corresponding to the target segments, the sampling points on the segmentation bands of the target segments are not taken as valid sampling points. This helps to avoid the color values of the sampling points on the segmentation bands affecting the color values of the target segments, thereby improving the accuracy of the color values and color difference values of the target segments measured based on the valid sampling points.
[0058] In some embodiments, determining the time range within which the target segment of the fabric passes through the measuring port of the detection unit can be achieved in the following two ways:
[0059] Method 1:
[0060] Step A1: If the tension fluctuation of the fabric under test is less than the fluctuation threshold during the entire conveying process, obtain the total time taken for the fabric under test to completely pass through the measurement port.
[0061] The tension fluctuation of the fabric under test during the entire conveying process can be measured by a tension sensor, and the fluctuation threshold is the standard used to measure the amplitude of the tension fluctuation. When the tension fluctuation of the fabric under test is less than the fluctuation threshold during the entire conveying process, that is, when the tension is balanced, the width of each fabric segment in the entire fabric under test can be considered the same. The tension fluctuation of the fabric under test during the entire conveying process can be controlled by a PID (proportional, integral, derivative) control algorithm.
[0062] Step A2: Based on the total time taken, determine the required transport time for the target segment to obtain the time range.
[0063] In this embodiment, if the width of each fabric segment is the same throughout the entire fabric under test, and the total number of fabric segments is known, the transport time required for any fabric segment can be obtained by dividing the total transport time by the total number of fabric segments. Since the transport time required for each fabric segment is the same, the transport time required for the target segment can be determined. This embodiment uses the transport time required for the target segment as the time range within which the target segment passes through the measuring port of the detection unit.
[0064] In this embodiment of the present disclosure, when the tension of the fabric under test is balanced throughout the entire conveying process, the time range of the target segment passing through the measurement port of the detection unit can be determined directly based on the total number of fabric segments in the fabric under test and the total time taken to convey the fabric under test to the measurement port, which is beneficial to improving the efficiency of determining the time range.
[0065] Method 2:
[0066] Step B1: When the tension fluctuation of the fabric under test is greater than the fluctuation threshold during the entire conveying process, acquire an image of the conveying process of the fabric under test being conveyed to the measurement port of the detection unit.
[0067] In cases where the tension sensor detects tension fluctuations exceeding a threshold (i.e., tension imbalance), the widths of different fabric segments within the entire fabric under test are generally not the same. In such situations, it is difficult to determine the time range of the target segment passing through the measurement port of the detection unit using the method described above. Therefore, during the process of transporting the fabric to the detection unit for sampling, images of the fabric's transport process can be simultaneously acquired using a line scan camera.
[0068] Line scan cameras acquire single-line pixel lines by scanning an object passing through their camera. Software on the vision processor or image acquisition card stores these single-line pixel lines and then reconstructs them into a final two-dimensional image of the scanned object. Line scan cameras typically require shorter exposure times than area scan cameras and are less expensive to acquire images. Therefore, line scan cameras are suitable for acquiring high-resolution images of fast-moving objects, such as rapidly moving fabrics.
[0069] In this embodiment of the disclosure, since the fabric to be tested moves in the detection unit and the moving speed is generally relatively fast, a line scan camera can be used to scan a single row of pixel lines of the fabric to be tested in the order of passing through, so as to construct an image of the conveying process of the fabric to be tested being conveyed to the measurement port of the detection unit.
[0070] Figure 4 This is a schematic diagram of the structure of a color detector including a line scan camera 205 according to an embodiment of this disclosure. Figure 4 As shown, the line scan camera 205 is located inside the color detector housing 201. It and the detection unit 202 need to scan and sample the fabric to be tested at the same location at the same time point so as to facilitate direct comparison at the time point.
[0071] Figure 5 This is a schematic diagram of another color detector including a line scan camera 205 in an embodiment of this disclosure. Figure 5 As shown, the line scan camera 205 is located outside the color detector housing 201, and performs scanning of the fabric to be tested to obtain images of the transport process. This disclosure does not limit the specific location of the line scan camera. At this time, it is possible to calculate and align the scanning time point of the line scan camera 205 at the target position on the fabric to be tested with the sampling time point of the detection unit 202 at the target position, and then compare the two time points.
[0072] Step B2 involves performing image analysis on the transport process image to determine the time range within which the target segment passes through the measurement port of the detection unit.
[0073] In this embodiment of the disclosure, when tension fluctuations have a significant impact, a line scan camera is used to scan the fabric to be tested to obtain images of the fabric being transported to the measurement port of the detection unit. Compared with area scan cameras, this method is less expensive and can obtain higher quality images of the transport process, which is beneficial for determining the time range of the target garter passing through the measurement port of the detection unit based on the images of the transport process.
[0074] In practice, image analysis can be achieved in the following two ways:
[0075] Method 1) Image analysis using the color values of row pixels
[0076] Step C1 involves analyzing the color values of the row pixels in the conveying process image to identify the segmentation zones of different fabric segments.
[0077] Because the dividing bands have color values, and the color values of the fabric segments and the dividing bands are different, and adjacent fabric segments are separated by the dividing bands, the dividing bands between each fabric segment can be identified in the fabric being tested. For example, using... Figure 1 Taking the fabric under test as an example, the actual color of the segmented band in the fabric under test has a significant color difference from the surrounding area. Based on this, if the color difference between the previous row of pixels and the next row of pixels in the fabric under test is greater than the color difference threshold, then the previous row of pixels or the next row of pixels can be determined as the junction of a segmented band and a fabric segment. This allows the determination of the start and end rows of the segmented band.
[0078] Step C2: Based on the scanning time of the segmentation band of the target segment, determine the time range of the target segment passing through the measurement port of the detection unit.
[0079] The dividing band may have a certain width in the fabric being tested; that is, the dividing band may be composed of multiple rows of pixels. Therefore, when determining the time range of the target segment passing through the measurement aperture based on the scanning time of the dividing band, the influence of the scanning time range of the dividing band on the time range of the target segment passing through the measurement aperture should be ignored. For example, such as... Figure 6 The diagram shown illustrates the determination of the time range of the target segment. Figure 6 In the process, the scanning time range of the segment is t1~t2 and t3~t4. At this time, the time range of the target segment passing through the measurement port is determined based on the scanning time of the segment, and this time range is t2~t3.
[0080] In this embodiment of the disclosure, by performing image analysis on the color values of the row pixels of the conveying process image, the segmentation band can be identified based on different color values, and the time range of the target garter passing through the measurement port of the detection unit can be confirmed by the scanning time of the segmentation band, which is beneficial to accurately identify the time range of the target segment passing through the measurement port of the detection unit.
[0081] Method 2) Image analysis using segmentation band recognition networks
[0082] Step D1: Input the transport process image into a pre-trained segmentation recognition network to identify the segmentation bands of the target segment.
[0083] Among them, a well-trained segmentation recognition network is used to automatically identify segmentation bands in images during the transport process, thereby identifying the segmentation bands of the target segment.
[0084] Step D2: Based on the scanning time of the segmentation band of the target segment, determine the time range of the target segment passing through the measurement port of the detection unit.
[0085] In this embodiment of the disclosure, by analyzing the images of the conveying process using a segmentation recognition network, the segmentation of the target segment can be automatically identified, which helps to improve the efficiency of segmentation recognition. By confirming the scanning time of the segmentation to determine the time range within which the target sock band passes the measurement port of the detection unit, it is beneficial to accurately identify the time range within which the target segment passes the measurement port of the detection unit.
[0086] Because tension fluctuations can cause variations in the width of different fabric segments within the tested fabric, sampling the target segment may result in sampling points that do not all belong to that segment. For example, a sampling point might fall on a dividing strip or another fabric segment, leading to a deviation in the color value calculated based on that sampling point, thus affecting the color difference value of the target segment. Therefore, it is necessary to filter out the truly valid sampling points belonging to the target segment from multiple sampling points. For example, in Figure 7 In this scenario, there are a target segment, fabric segment 1, and fabric segment 2. Sampling of the target segment is required, but sampling point 1 falls on fabric segment 1, sampling point 2 falls on the dividing strip, and sampling point 5 falls on fabric segment 2. In this case, sampling points 3 and 4 are valid sampling points for the target garter. Sampling point 5 is determined as a valid sampling point for fabric segment 2 following the target segment, and sampling point 1 is determined as a valid sampling point for fabric segment 1 preceding the target segment.
[0087] In some embodiments, valid sampling points for the target segment can be selected from multiple sampling points based on a time range and the sampling time points of multiple sampling points, including:
[0088] Step E1: Determine the sampling time of the target segment from the preset sampling time point sequence.
[0089] exist Figure 7 In the sample, the time from t1 corresponding to sampling point 1 to t5 corresponding to sampling point 5 is the sampling time of the target segment.
[0090] Step E2: Based on the sampling time of the target segment, select sampling points whose sampling time points are within the time range as valid sampling points of the target segment.
[0091] In this context, all valid sampling points of the target segment originate from the target segment itself; that is, all valid sampling points of the target segment are located on the target segment.
[0092] To better understand how to determine the effective sampling points of the target segment from a preset sampling time point sequence, the following will combine... Figure 8 Please explain the process. For example... Figure 8 The diagram shown is a schematic diagram of determining the effective sampling points of the target segment in an embodiment of this disclosure. Figure 8 In the sample, the preset sampling time points are 1.07s and 1.11s, but the time range corresponding to the target segment is 1.05s to 1.09s. The preset sampling time point within the range of 1.05s to 1.09s is 1.07s. Therefore, the sampling point corresponding to 1.07s is the valid sampling point in the target segment.
[0093] In this embodiment of the disclosure, by selecting the effective sampling points of the target segment from multiple sampling points, it is possible to avoid the sampling points falling on other fabric segments, which would affect the calculated color value and color difference value of the target segment. This is beneficial to improving the accuracy of the color value and color difference value of the target segment measured by the colorimeter.
[0094] In some embodiments, when it is necessary to acquire images of the fabric being tested during its transport process based on a line scan camera and to sample the fabric being tested based on a detection unit to obtain effective sampling points for the target segment, the system time of the line scan camera and the system time of the detection unit can be synchronized to make the system time of the line scan camera consistent with the system time of the detection unit, thereby facilitating direct comparison of the sampling time point and the time range of the target segment.
[0095] In some embodiments, the average color value of multiple valid sampling points of the target segment can be calculated and used as the color value of the target segment. This helps to reflect the average level of the color value of the target segment, thereby improving the accuracy of determining the color value of the target segment.
[0096] In addition, after filtering out sampling points whose sampling time points are within the time range as valid sampling points of the target segment, sampling points whose sampling time points belong to the target segment but are determined to be invalid sampling points can be merged into the set of points to be processed. For each point to be processed in this set of points to be processed, the following operations are performed:
[0097] Step F1: Determine the row pixel whose acquisition time point is closest to the sampling time point of the image to be processed.
[0098] Step F2: If the row of pixels does not belong to the dividing band, determine the fabric segment in which the row of pixels is located.
[0099] Step F3 determines the point to be processed as the valid sampling point of the fabric segment where the pixel in that row is located.
[0100] Continue with Figure 7 For example, Figure 7 In the sampling process, sampling points 1, 2, and 5 exceed the time range of the target segment and are therefore invalid sampling points. These points are merged into the set of points to be processed. For sampling point 1 in the set of points to be processed, the row pixel closest to its sampling time point belongs to fabric segment 1; therefore, sampling point 1 is a valid sampling point for fabric segment 1. For sampling point 2 in the set of points to be processed, the row pixel closest to its sampling time point belongs to a segmentation zone; therefore, sampling point 2 is still considered an invalid sampling point. For sampling point 5 in the set of points to be processed, the row pixel closest to its sampling time point belongs to fabric segment 2; therefore, sampling point 5 is a valid sampling point for fabric segment 2.
[0101] In this embodiment of the disclosure, after selecting the effective sampling points of the target segment, other sampling points within the sampling time of the target segment, excluding the effective sampling points of the target segment, are used as points to be processed for further judgment to determine whether the points to be processed can be used as effective sampling points of other fabric segments, which helps to improve the utilization rate of sampling points.
[0102] Based on the same technical concept, this disclosure provides a color difference measuring device 900, wherein the fabric to be tested is woven from multiple spindles, and each spindle has a corresponding fabric segment on the fabric to be tested, and there are dividing bands between different fabric segments, such as... Figure 9 As shown, the device includes:
[0103] The conveying module 901 is used to sequentially convey each fabric segment of the fabric to be tested to the measuring port of the detection unit, so that the detection unit can collect color values at multiple sampling points on the fabric to be tested according to a preset sampling time point sequence.
[0104] The first determining module 902 is used to determine the time range of the target segment of the fabric to be tested passing through the measuring port of the detection unit during the sampling process of the fabric being transported to the detection unit; the target segment is any fabric segment of the fabric to be tested.
[0105] The filtering module 903 is used to filter out the valid sampling points of the target segment from multiple sampling points based on the time range and the sampling time points of multiple sampling points;
[0106] The second determining module 904 is used to determine the color difference value of the target spindle corresponding to the target segment based on the color value and standard value of the effective sampling point.
[0107] In some embodiments, the first determining module includes:
[0108] The first acquisition unit is used to acquire the total time taken for the fabric under test to completely pass through the measurement port when the tension fluctuation of the fabric under test is less than the fluctuation threshold during the entire conveying process.
[0109] The first determining unit is used to determine the required transmission time of the target segment based on the total transmission time, thereby obtaining the time range.
[0110] In some embodiments, the first determining module includes:
[0111] The second acquisition unit is used to acquire images of the fabric being transported to the measurement port of the detection unit when the tension fluctuation of the fabric being transported during the entire transport process is greater than the fluctuation threshold; wherein, during the sampling process in the detection unit, images of the transport process are acquired based on a line scan camera.
[0112] The analysis unit is used to perform image analysis on the transport process images to determine the time range of the target segment passing through the measurement port of the detection unit.
[0113] In some embodiments, the analysis unit is specifically used for:
[0114] The color values of row pixels in the conveying process image are analyzed to identify the segmentation zones of different fabric segments;
[0115] Based on the scanning time of the segmentation band of the target fragment, the time range of the target fragment passing through the measurement port of the detection unit is determined.
[0116] In some embodiments, the analysis unit is specifically used for:
[0117] The images of the transport process are input into a pre-trained segmentation recognition network to identify the segmentation bands of the target segment;
[0118] Based on the scanning time of the segmentation band of the target fragment, the time range of the target fragment passing through the measurement port of the detection unit is determined.
[0119] In some embodiments, the filtering module includes:
[0120] The second determining unit is used to determine the sampling time of the target segment determined from the preset sampling time point sequence;
[0121] The filtering unit is used to filter out sampling points whose sampling time points are within the time range based on the sampling time of the target segment, and use them as valid sampling points of the target segment.
[0122] In some embodiments, the filtering unit is specifically used for:
[0123] Merge sampling points whose sampling time points belong to the target segment but are determined to be invalid sampling points into the set of points to be processed. For each point to be processed in this set of points to be processed, perform the following operations:
[0124] The row pixel whose acquisition time point is closest to the sampling time point of the point to be processed in the image of the conveying process is determined; wherein, during the process of conveying the fabric to be tested to the detection department for sampling, the image of the conveying process is acquired based on the line scan camera;
[0125] If a row pixel does not belong to a segmentation zone, determine the fabric segment in which the row pixel is located;
[0126] The point to be processed is determined as the valid sampling point of the fabric segment where the row pixel is located.
[0127] In some embodiments, valid sampling points are sampling points that are not on the segmentation band of the target segment.
[0128] The specific functions and examples of each module and submodule of the apparatus in this disclosure can be found in the relevant descriptions of the corresponding steps in the above method embodiments, and will not be repeated here.
[0129] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0130] Figure 10 This is a structural block diagram of an electronic device according to an embodiment of the present disclosure. Figure 10 As shown, the electronic device includes a memory 1010 and a processor 1020. The memory 1010 stores a computer program that can run on the processor 1020. The number of memories 1010 and processors 1020 can be one or more. The memory 1010 can store one or more computer programs, which, when executed by the electronic device, cause the electronic device to perform the methods provided in the above-described method embodiments. The electronic device may also include a communication interface 1030 for communicating with external devices and performing data exchange and transmission.
[0131] If the memory 1010, processor 1020, and communication interface 1030 are implemented independently, they can be interconnected via a bus to communicate with each other. This bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0132] Optionally, in a specific implementation, if the memory 1010, processor 1020 and communication interface 1030 are integrated on a single chip, then the memory 1010, processor 1020 and communication interface 1030 can communicate with each other through an internal interface.
[0133] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. General-purpose processors can be microprocessors or any conventional processor. It is worth noting that the processor can be a processor supporting Advanced Reduced Instruction Set Machines (ARM) architecture.
[0134] Further, optionally, the aforementioned memory may include read-only memory and random access memory, and may also include non-volatile random access memory. The memory may be volatile or non-volatile, or may include both. Non-volatile memory may include read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may include random access memory (RAM), which serves as an external cache. Many forms of RAM are available by way of example, but not limitation. Examples include Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAMBUS RAM (DR RAM).
[0135] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line, DSL) or wireless (e.g., infrared, Bluetooth, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer, or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)). It is worth noting that the computer-readable storage media mentioned in this disclosure can be non-volatile storage media; in other words, it can be non-transient storage media.
[0136] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0137] In the description of the embodiments of this disclosure, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0138] In the description of the embodiments disclosed herein, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0139] In the description of embodiments of this disclosure, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0140] The above description is merely an exemplary embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for measuring color difference, characterized in that, The fabric to be tested is woven from multiple spindles, and each spindle has a corresponding fabric segment on the fabric, with dividing strips between different fabric segments. The method includes: Each fabric segment of the fabric to be tested is sequentially fed to the measuring port of the detection unit, so that the detection unit collects color values at multiple sampling points on the fabric to be tested according to a preset sampling time point sequence. During the sampling process at the detection unit, the time range within which the target segment of the fabric to be tested passes through the measurement port of the detection unit is determined; the target segment is any fabric segment of the fabric to be tested. Based on the time range and the sampling time points of the plurality of sampling points, the effective sampling points of the target segment are selected from the plurality of sampling points; Based on the color values and standard values of the effective sampling points, the color difference value of the target spindle corresponding to the target segment is determined; Determining the time range within which the target segment of the fabric to be tested passes through the measuring port of the detection unit includes: If the tension fluctuation of the fabric under test is less than the fluctuation threshold during the entire conveying process, the total time taken to convey the fabric under test completely through the measuring port is obtained. Based on the total time consumed, the required transport time for the target segment is determined, and the time range is obtained; When the tension fluctuation of the fabric under test is greater than the fluctuation threshold during the entire transport process, an image of the transport process of the fabric under test being transported to the measurement port of the detection unit is acquired; wherein, during the sampling process at the detection unit, the transport process image is acquired based on a line scan camera. Image analysis is performed on the transport process image to determine the time range in which the target segment passes through the measurement port of the detection unit.
2. The method according to claim 1, characterized in that, The step of performing image analysis on the transport process image to determine the time range of the target segment passing through the measurement port of the detection unit includes: The color values of the row pixels in the conveying process image are analyzed to identify the segmentation zones of different fabric segments; Based on the scanning time of the segmentation band of the target segment, the time range of the target segment passing through the measurement port of the detection unit is determined.
3. The method according to claim 1, characterized in that, The step of performing image analysis on the transport process image to determine the time range of the target segment passing through the measurement port of the detection unit includes: The transport process image is input into a pre-trained segmentation recognition network to identify the segmentation bands of the target segment; Based on the scanning time of the segmentation band of the target segment, the time range of the target segment passing through the measurement port of the detection unit is determined.
4. The method according to any one of claims 1-3, characterized in that, The step of selecting valid sampling points for the target segment from the plurality of sampling points based on the time range and the sampling time points of the plurality of sampling points includes: The sampling time of the target segment is determined from the preset sampling time point sequence; Based on the sampling time of the target segment, sampling points within the time range are selected as valid sampling points of the target segment.
5. The method according to claim 4, characterized in that, After selecting sampling points whose sampling time points are within the time range as valid sampling points for the target segment, the process further includes: Sampling points whose sampling time points belong to the target segment but are determined to be invalid sampling points are merged into the set of points to be processed. For each point to be processed in the set of points to be processed, the following operations are performed: Sampling points that exceed the time range of the target segment within the sampling time of the target segment are invalid sampling points of the target segment. The row pixel whose acquisition time point of the row pixel in the transport process image is closest to the sampling time point of the point to be processed is determined; wherein, during the process of transporting the fabric to be tested to the detection unit for sampling, the transport process image is acquired based on a line scan camera; If the row pixel does not belong to the segmentation zone, determine the fabric segment in which the row pixel is located; The point to be processed is determined as the valid sampling point of the fabric segment where the row pixel is located.
6. The method according to any one of claims 1-3, wherein, The valid sampling points are those that are not on the segmentation band of the target segment.
7. A color difference measuring device, characterized in that, The fabric to be tested is woven from multiple spindles, and each spindle has a corresponding fabric segment on the fabric, with dividing strips between different fabric segments. The device includes: The conveying module is used to sequentially convey each fabric segment of the fabric to be tested to the measuring port of the detection unit, so that the detection unit can collect color values at multiple sampling points on the fabric to be tested according to a preset sampling time point sequence. The first determining module is used to determine the time range during which the target segment of the fabric to be tested passes through the measuring port of the detection unit during the sampling process of the fabric being transported to the detection unit; the target segment is any fabric segment of the fabric to be tested. The filtering module is used to filter out valid sampling points of the target segment from the multiple sampling points based on the time range and the sampling time points of the multiple sampling points; The second determining module is used to determine the color difference value of the target spindle corresponding to the target segment based on the color value and standard value of the effective sampling point; The first determining module includes: The first acquisition unit is used to acquire the total time taken for the fabric under test to completely pass through the measurement port when the tension fluctuation of the fabric under test is less than the fluctuation threshold during the entire conveying process. The first determining unit is used to determine the required transmission time of the target segment based on the total transmission time, and to obtain the time range. The second acquisition unit is used to acquire a transport process image of the fabric to be tested being transported to the measurement port of the detection unit when the tension fluctuation of the fabric to be tested is greater than the fluctuation threshold during the entire transport process; wherein, during the process of transporting the fabric to the detection unit for sampling, the transport process image is acquired based on a line scan camera. An analysis unit is used to perform image analysis on the transport process image to determine the time range in which the target segment passes through the measurement port of the detection unit.
8. The apparatus according to claim 7, characterized in that, The analysis unit is specifically used for: The color values of the row pixels in the conveying process image are analyzed to identify the segmentation zones of different fabric segments; Based on the scanning time of the segmentation band of the target segment, the time range of the target segment passing through the measurement port of the detection unit is determined.
9. The apparatus according to claim 7, characterized in that, The analysis unit is specifically used for: The transport process image is input into a pre-trained segmentation recognition network to identify the segmentation bands of the target segment; Based on the scanning time of the segmentation band of the target segment, the time range of the target segment passing through the measurement port of the detection unit is determined.
10. The apparatus according to any one of claims 7-9, characterized in that, The filtering module includes: The second determining unit is used to determine the sampling time of the target segment determined from the preset sampling time point sequence; The filtering unit is used to filter out sampling points whose sampling time points are within the time range based on the sampling time of the target segment, and use them as valid sampling points of the target segment.
11. The apparatus according to claim 10, characterized in that, The filtering unit is specifically used for: Sampling points whose sampling time points belong to the target segment but are determined to be invalid sampling points are merged into the set of points to be processed. For each point to be processed in the set of points to be processed, the following operations are performed: Sampling points that exceed the time range of the target segment within the sampling time of the target segment are invalid sampling points of the target segment. The row pixel whose acquisition time point of the row pixel in the transport process image is closest to the sampling time point of the point to be processed is determined; wherein, during the process of transporting the fabric to be tested to the detection unit for sampling, the transport process image is acquired based on a line scan camera; If the row pixel does not belong to the segmentation zone, determine the fabric segment in which the row pixel is located; The point to be processed is determined as the valid sampling point of the fabric segment where the row pixel is located.
12. The apparatus according to any one of claims 7-9, characterized in that, The valid sampling points are those that are not on the segmentation band of the target segment.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
Citation Information
Patent Citations
Analyte concentration by quantifying and interpreting color
CN106068449A
Cloth color difference detection method and system based on camera
CN111508040A