Chromatic aberration detection method and system based on cloth inspecting machine, medium and electronic equipment

By utilizing the color difference detection method of the fabric inspection machine and employing the conversion and data processing from RGB to LAB color space, the problem of inaccurate fabric color difference detection has been solved, achieving high-precision color difference detection and improving the color consistency and production efficiency of textiles.

CN120894281APending Publication Date: 2025-11-04JACK SEWING MASCH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510892981.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Current technologies for detecting fabric color differences are not accurate enough, making it difficult to guarantee the color consistency of textiles, which increases rework costs and customer complaints.

Method used

A color difference detection method based on a fabric inspection machine is adopted. By acquiring fabric images, color space conversion from RGB to LAB is performed, including linearization, normalization and nonlinear transformation processing, to obtain LAB color data of the fabric area, and the difference is compared to obtain the color difference detection results.

Benefits of technology

It improves the accuracy of fabric color difference detection, reduces the influence of human factors, ensures the consistency and objectivity of test results, reduces the defect rate, and improves the overall quality of textiles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894281A_ABST
    Figure CN120894281A_ABST
Patent Text Reader

Abstract

The invention provides a color difference detection method and system based on a cloth inspecting machine, a medium and electronic equipment. The color difference detection method comprises the following steps: acquiring a cloth image of a cloth inspecting machine; processing the cloth image to obtain a cloth area color; performing color space conversion on the color of the cloth area to obtain LAB color data of the color of the cloth area; performing difference comparison on the plurality of LAB color data to obtain a color difference detection result; wherein the process of obtaining the LAB color data of the color of the cloth area comprises the following steps: performing linearization processing on the color of the cloth area to obtain linearized color data; and performing normalization and nonlinear transformation processing on the linearized color data to obtain LAB color data of the color of the cloth area. The color difference detection method has high color difference detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of cloth inspection machines, and relates to a color difference detection method and system based on a cloth inspection machine, a medium and an electronic device. BACKGROUND

[0002] In the textile industry, the color consistency of textiles is a key indicator that determines the product grade and brand value. According to statistics of the International Textile Manufacturers Federation (ITMF), the global textile industry incurs more than 1.7 billion US dollars in rework costs annually due to color difference problems, and 63% of customer complaints about high-end fabric orders are related to color difference. Therefore, color difference detection of cloth is particularly important. Therefore, how to provide an accurate cloth color difference detection has become one of the problems to be solved at present. SUMMARY

[0003] The application aims to provide a color difference detection method and system based on a cloth inspection machine, a medium and an electronic device, to improve the accuracy of color difference detection.

[0004] In a first aspect, the application provides a color difference detection method based on a cloth inspection machine, which comprises: acquiring a cloth image of a cloth inspection machine; processing the cloth image to obtain a cloth region color; performing color space conversion on the cloth region color to obtain LAB color data of the cloth region color; performing difference comparison on a plurality of LAB color data to obtain a color difference detection result; wherein the process of obtaining the LAB color data of the cloth region color comprises: performing linearization processing on the cloth region color to obtain linearized color data; performing normalization and nonlinear transformation processing on the linearized color data to obtain the LAB color data of the cloth region color.

[0005] In an implementation manner of the first aspect, the process of processing the cloth image to obtain the cloth region color comprises: processing the cloth image to obtain a cloth scaling picture; and performing color extraction on the cloth scaling picture to obtain the main color of the cloth scaling picture.

[0006] In an implementation manner of the first aspect, the process of processing the cloth image to obtain the cloth region color further comprises: eliminating cloth selvage and non-cloth region color in the process of performing color extraction on the cloth scaling picture.

[0007] In an implementation manner of the first aspect, the formula for linearization processing of the cloth region color is as follows: Clinear=(1.055C+0.055)2.4, C>0.04045; wherein Clinear is a linear cloth region color component value, and C is a cloth region color value.

[0008] In an implementation form of the first aspect, the normalizing and non-linear transforming the linearized color data comprises: normalizing the linearized color data by using D65 white point normalization to obtain normalized fabric region color data; and non-linear transforming the normalized fabric region color data to obtain the LAB color data of the fabric region color; wherein a formula of the non-linear transformation is as follows: f(t)=t1 / 3, t>0.008856; L*=116f(Y / Yn)-16; a*=500[f(X / Xn)-f(Y / Yn)]; b*=200[f(Y / Yn)-f(Z / Zn)]; wherein t is a color input value of the non-linear transformation, Xn, Yn, Zn are the normalized fabric region color data, and X, Y, Z are component values of the fabric region color in a color space.

[0009] In an implementation form of the first aspect, the difference comparison of the plurality of LAB color data comprises: performing difference processing on the front and back LAB color data of the same camera to obtain a difference result; and judging the difference result to obtain the color difference detection result.

[0010] In an implementation form of the first aspect, the color difference detection method further comprises: grouping the fabric images according to camera sources, and assigning the same number to the fabric images obtained by the same camera.

[0011] In a second aspect, the present application provides a color difference detection system based on a cloth inspection machine, the color difference detection system comprising: a fabric image acquisition module configured to acquire fabric images of the cloth inspection machine; a fabric region color acquisition module configured to process the fabric images to obtain fabric region colors; a LAB color data acquisition module configured to perform color space conversion on the fabric region colors to obtain LAB color data of the fabric region colors; perform linearization processing on the fabric region colors to obtain linearized color data; perform normalizing and non-linear transforming on the linearized color data to obtain the LAB color data of the fabric region colors; and a color difference detection result acquisition module configured to perform difference comparison on a plurality of LAB color data to obtain a color difference detection result.

[0012] In a third aspect, the present application provides an electronic device, comprising: a memory having a computer program stored thereon; and a processor in communication with the memory, configured to execute the computer program to implement the color difference detection method described above.

[0013] In a fourth aspect, the present application provides a computer readable storage medium having a computer program stored thereon, the program being executed by an electronic device to implement the color difference detection method described above.

[0014] As described above, the cloth inspection machine-based color difference detection method, system, medium and electronic device provided by the present application have the following beneficial effects:

[0015] The color difference detection method provided by the present application can process the cloth image obtained by the camera, obtain the cloth region color, perform linearization processing, normalization and nonlinear transformation processing on the cloth region color, convert the cloth region color from the RGB color space to the LAB color space, and obtain the color difference degree of the cloth color by comparing a plurality of LAB color data. The color difference detection method provided by the present application can improve the accuracy of cloth color difference detection. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 A schematic diagram of an application scenario of the cloth inspection machine-based color difference detection method described in the embodiments of the present application is shown.

[0017] Figure 2 A process schematic diagram of the cloth inspection machine-based color difference detection method described in the embodiments of the present application is shown.

[0018] Figure 3 A process schematic diagram of the LAB color data of the cloth region color described in the embodiments of the present application is shown.

[0019] Figure 4 A flowchart of the cloth inspection machine-based color difference detection method described in the embodiments of the present application is shown.

[0020] Figure 5 A structure schematic diagram of the cloth inspection machine-based color difference detection system described in the embodiments of the present application is shown.

[0021] Figure 6 A structure schematic diagram of the electronic device described in the embodiments of the present application is shown.

[0022] REFERENCE SIGNS

[0023] 100 cloth inspection machine

[0024] 101 cloth conveying module

[0025] 102 illumination module

[0026] 103 image acquisition module

[0027] 104 image analysis module

[0028] 1 cloth inspection machine-based color difference detection system

[0029] 11 cloth image acquisition module

[0030] 12 cloth region color acquisition module

[0031] 13 LAB color data acquisition module

[0032] 14 color difference detection result acquisition module

[0033] 2 electronic device

[0034] 21 memory

[0035] 22 processor

[0036] 23 display

[0037] S11-S14 steps

[0038] S131-S132 steps

[0039] S51-S57 steps DETAILED DESCRIPTION

[0040] The present application will be described in detail below with specific embodiments. Other advantages and effects of the present application can be easily understood by those skilled in the art from the disclosure of the present specification. The present application can also be implemented or applied by other different specific embodiments, and various modifications or changes can be made to the details in the present specification based on different views and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0041] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present application in a schematic manner, and only the components related to the present application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The actual implementation of each component may be a random change in type, number and proportion, and the component layout pattern may be more complex.

[0042] The following embodiments of the present application provide a color difference detection method based on a cloth inspection machine. The technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0043] Figure 1 The application scenario diagram of the color difference detection method of the present application is shown. As shown in FIG. 1, the color difference detection method of the present application is applied to a cloth inspection machine. Figure 1As shown, the cloth inspection machine 100 includes a cloth conveying module 101, an illumination module 102, an image acquisition module 103, and an image analysis module 104. The cloth conveying module 101 conveys the cloth flatly to the detection area of the cloth inspection machine. The illumination module 102 is arranged above the detection area and uses fixed light sources to uniformly light on the cloth from different angles. Through the uniform lighting of the fixed light sources in the illumination module, the color difference caused by multiple angles can be reduced, and the influence of the change of bright and dark environment can be reduced. The image acquisition module 103 includes a plurality of line scan cameras for photographing the surface of the cloth. The image analysis module 104 is used for processing and analyzing the cloth image obtained by the image acquisition module 103 to obtain the color difference detection result of the cloth.

[0044] Figure 2 The process diagram of the color difference detection method in an embodiment of the present application is shown. As shown in Figure 2 The color difference detection method includes the following steps S11 to S14.

[0045] In step S11, the cloth image of the cloth inspection machine is obtained. The cloth image of the cloth inspection machine is obtained by photographing the cloth by a plurality of line scan cameras arranged on the cloth inspection machine. The cloth image obtained by the line scan camera is the imaging of a moving object without distortion. When the length of the cloth is long, a plurality of line scan cameras are arranged to photograph the entire cloth. The line scan camera can reduce the uneven imaging phenomenon of the cloth inspection machine when rolling in the scene with uneven lighting. For example, the number of line scan cameras can be set to two according to the length of the cloth, and the specific number can be set according to the actual situation. The present application is not limited thereto.

[0046] In step S12, the cloth image is processed to obtain the cloth region color.

[0047] In step S13, the cloth region color is converted in color space to obtain the LAB color data of the cloth region color. The cloth region color is converted from RGB color space to LAB color space. Since the color corresponding characteristics of different devices are different, the color displayed on different devices for the same cloth region color can be quite different. The LAB color data is standardized color description data. In the LAB color space, equal numerical changes indicate that the color difference perceived by the human eye is also similar. Therefore, converting the RGB color data of the cloth region color to the LAB color data can improve the accuracy of color difference detection.

[0048] Referring to Figure 3 The process of obtaining the LAB color data of the cloth region color includes the following steps S131 to S132.

[0049] Step S131, linearize the cloth region color to obtain linearized color data. Linearize the cloth region color to remove the influence of non-linear compression of the cloth image, and convert the cloth region color from the RFB color space to the XYZ linear color space.

[0050] Step S132, normalize and non-linearly transform the linearized color data to obtain the LAB color data of the cloth region color.

[0051] Step S14, difference comparison of multiple LAB color data to obtain a color difference detection result. The color difference detection result reflects the color deviation degree of the cloth color.

[0052] According to the above description, the color difference detection method provided by the present application can process the cloth image obtained by the camera, obtain the cloth region color, linearize the cloth region color, normalize and non-linearly transform the cloth region color, convert the cloth region color from the RGB color space to the LAB color space, and obtain the color difference degree of the cloth color by comparing multiple LAB color data. The color difference detection method of the present application can improve the accuracy of cloth color difference detection.

[0053] In an embodiment of the present application, the process of processing the cloth image to obtain the cloth region color includes the following steps S21 to S22.

[0054] Step S21, process the cloth image to obtain a cloth scaling picture. The cloth image is cropped to obtain a cloth scaling picture, and the size of the cloth scaling picture is, for example, 1000*1000.

[0055] Step S22, color extraction of the cloth scaling picture to obtain the main color of the cloth scaling picture.

[0056] In an embodiment of the present application, the process of processing the cloth image to obtain the cloth region color further comprises: eliminating the cloth selvage and non-cloth region color in the process of color extraction of the cloth zoom picture. Since the non-cloth region color is different from the target cloth color, by shielding the color of the non-cloth region and the color of the cloth selvage, the interference and noise of the target cloth, i.e. the cloth region, are reduced, and the accuracy of color extraction is improved. The non-cloth region is, for example, the background color, the clamp of the fixed cloth, the sewing thread, the label, etc. At the same time, since the cloth selvage is different from the main color of the target cloth due to edge effect, different light angles, and different processing processes, eliminating the color of the cloth selvage can accurately reflect the true color of the main body of the cloth. In addition, there are non-uniform illumination areas in the process of camera shooting, and the illumination intensity and angle of the cloth region, the cloth selvage region and the background region are different, which leads to color deviation. Eliminating the background region and the cloth selvage region which are greatly affected by light can reduce the color error introduced by non-uniform light, so that the extracted color is closer to the true color of the cloth under standard light.

[0057] Exemplarily, the color in the cloth zoom picture is quantized and extracted by a color octree algorithm. The RGB color space of the cloth zoom picture is divided into multiple hierarchical subspaces to form a tree structure, and each leaf node represents a color. After color quantization by the color octree algorithm, the cloth selvage and non-cloth region color are removed, and the main color in the cloth zoom picture is retained.

[0058] In an embodiment of the present application, the formula for linearizing the cloth region color is as follows:

[0059] Clinear=(1.055C+0.055)2.4, C>0.04045;

[0060] Wherein, Clinear is the linear cloth region color component value, and C is the cloth region color value.

[0061] By linearizing the cloth region color, the RGB value of the cloth region can be converted back to the corresponding linear light intensity value Clinear. According to the linear cloth region color component value Clinear, the cloth region color is further converted from the RGB color space to the XYZ linear color space.

[0062] In an embodiment of the present application, the normalization and nonlinear transformation processing of the linearized color data comprises the following steps S31 to S32.

[0063] Step S31, normalize the linearized color data using D65 white point normalization to obtain normalized fabric region color data. D65 is a reference white point, which is a standard color under a specific lighting condition. The specific lighting condition is, for example, daylight condition. The color space conversion using the reference white point converts the (X, Y, Z) value in the XYZ linear color space to a new (Xn, Yn, Zn) value corresponding to daylight. The (Xn, Yn, Zn) value represents the fabric region color data under the reference white point, which is the normalized coordinate of the fabric region color relative to the reference white point.

[0064] Step S32, perform non-linear transformation on the normalized fabric region color data to obtain LAB color data of the fabric region color.

[0065] The formula of the non-linear transformation is as follows:

[0066] f(t) = t1 / 3, t > 0.008856;

[0067] L* = 116f(Y / Yn) - 16;

[0068] a* = 500[f(X / Xn) - f(Y / Yn)];

[0069] b* = 200[f(Y / Yn) - f(Z / Zn)];

[0070] Wherein, t is the color input value of the non-linear transformation, Xn, Yn, Zn are the normalized fabric region color data, X, Y, Z are the component values of the fabric region color in the color space.

[0071] Specifically, X is used to simulate the response of the human eye to long waves, Y directly corresponds to the brightness or luminance, which is consistent with the brightness perception of human cone cells, and Z is used to simulate the response of short wavelengths. Xn, Yn, Zn are the three stimulus values of the reference white point, that is, the value of the ideal white color in XYZ.

[0072] By comparing the fabric region color (X, Y, Z) with the fabric region color under the reference white point (Xn, Yn, Zn), the deviation of the fabric region color relative to the standard color is obtained by calculating (X / Xn, Y / Yn, Z / Zn).

[0073] The cloth image is cropped to obtain a cloth zoom picture, the cloth selvage and non-cloth area color in the cloth zoom picture are removed, the main color of the cloth area in the cloth zoom picture is extracted, the main color of the cloth area is converted in color space, the main color of the cloth area is linearized, the RGB data of the main color of the cloth area is converted into linearized color data in XYZ linear color space, and the color of the cloth area is converted from XYZ linear color space to LAB color data through normalization and nonlinear conversion processing of the linearized color data.

[0074] In some embodiments, the camera on the cloth inspection machine captures the cloth to obtain a cloth image, crops the cloth image to obtain a cloth zoom picture, removes the cloth selvage and non-cloth area color in the cloth zoom picture, and extracts the main color of the cloth area in the cloth zoom picture. The main color of the cloth area is converted in color space. The color space conversion converts the RGB data of the main color of the cloth area into linearized color data in XYZ linear color space through linearization processing of the main color of the cloth area. The color of the cloth area is converted from XYZ linear color space to LAB color data through normalization and nonlinear conversion processing of the linearized color data.

[0075] In an embodiment of the present application, the color difference detection method further comprises: after the color space conversion of the main color of the cloth area, grouping the cloth images obtained by different cameras to calculate the color difference. Wherein, the cloth images are grouped according to the camera source, and the cloth images obtained by the same camera are assigned the same number.

[0076] For example, the cameras provided on the cloth inspection machine include two left and right line scan cameras, i.e. left line scan camera A and right line scan camera B. The cloth images captured by the left line scan camera A are numbered 0 and grouped into group 0, and the cloth images captured by the right line scan camera are numbered 1 and grouped into group 1. After cropping, extracting and color conversion of the cloth images, the LAB color data values of the two cloth images with the same number are processed by difference.

[0077] In an embodiment of the present application, the process of comparing the difference values of a plurality of LAB color data includes the following steps S41 to S42.

[0078] Step S41, difference processing of the front and rear LAB color data of the same camera is performed to obtain a difference result.

[0079] For example, the cloth images captured by the left line scan camera A before and after are A10 and A20, after cropping, extracting and color conversion, the LAB color data values of A10 and A20 are subtracted to compare the difference values, and the difference result is output.

[0080] Step S42, judging the difference value to obtain the color difference detection result.

[0081] Exemplarily, the LAB color difference value of the cloth images photographed before and after is less than 1, which means that the human eye cannot see obvious difference, and the color difference is small; the LAB color difference value of the cloth images photographed before and after is greater than 3, which means that the main color of the cloth region has obvious difference, and the color difference is large.

[0082] Next, the color difference detection method provided by the embodiment of the present application will be described in detail through a specific example. It should be noted that the content in the example is only used to explain and describe the color difference detection method provided by the embodiment of the present application, and is not used to limit the protection scope of the present application. In specific applications, corresponding steps can be added or deleted on the basis of the example according to actual needs. Figure 4 The flowchart of the color difference detection method in this example is shown in FIG. 5. Figure 4 As shown in FIG. 5, the color difference detection in this example includes the following steps 51 to 57.

[0083] Step 51, placing the cloth to be detected on the cloth inspection machine, and photographing the cloth to be detected by the line-scan camera A and the line-scan camera B on the cloth inspection machine to obtain cloth images.

[0084] Step 52, numbering the cloth images obtained by the line-scan camera A as 0, i.e. A10, A20…; and numbering the cloth images obtained by the line-scan camera B as 1, i.e. B10, B20…

[0085] Step 53, cropping the cloth images to obtain 1000*1000 cloth scaling pictures.

[0086] Step 54, removing the cloth selvedge and non-cloth region color in the cloth scaling picture, and extracting the main color of the cloth region.

[0087] Step 55, performing color space conversion on the main color of the cloth region by using linearization, normalization and non-linear conversion to obtain the LAB value of the main color of the cloth region.

[0088] Step 56, comparing the LAB values of the cloth images photographed before and after with the same number to output the difference value.

[0089] Step 57, judging whether the cloth has color difference according to the difference value.

[0090] In summary, the color difference detection method provided by the application accurately extracts the target fabric region from the fabric image captured by the line scan camera, linearizes the color of the extracted fabric region, effectively correcting the deviation that may be introduced due to uneven illumination or differences in sensor characteristics; then performs normalization operation to unify the color data to a standard scale, eliminating the interference caused by differences in dimension and range; and then performs nonlinear transformation processing, further optimizing the distribution characteristics of the color data. By linearizing, normalizing and nonlinearly transforming the color of the fabric region, a solid foundation is laid for subsequent color space conversion, and the carefully processed fabric region color is accurately converted from the widely used RGB color space to the LAB color space that is more consistent with human visual perception. The LAB color space separates the brightness (L) from the two chrominance components (A and B), making the calculation of color difference more intuitive and accurate. By comparing the LAB color data of the fabric region, the color difference of the fabric color can be accurately quantified and evaluated, whether it is a subtle gradient or a obvious patch can be effectively identified. Through the color difference detection method of the application, not only the accuracy of fabric color difference detection is significantly improved, but also the degree of automation is high, greatly improving the detection efficiency, reducing the influence of human factors (such as subjective judgment difference, fatigue, etc.) on the detection result, and ensuring the consistency and objectivity of the detection result. In addition, the application of the method is helpful to find and correct color difference problems in the production process, effectively reduce the rate of defective products, and improve the overall product quality. For the textile industry that pursues high-precision color control, it has significant economic benefits and important technical value.

[0091] The color difference detection method described in the embodiments of the application is not limited to the order of steps listed in the embodiments, and any scheme achieved by adding, replacing or changing steps of the prior art according to the principles of the application is included in the protection scope of the application.

[0092] The embodiments of the application also provide a color difference detection system based on a cloth inspection machine, which can implement the color difference detection method described in the application. However, the implementation device of the color difference detection method described in the application includes but is not limited to the structure of the color difference detection system listed in the embodiments, and any structure deformation and replacement of the prior art according to the principles of the application is included in the protection scope of the application.

[0093] Figure 5 The structure diagram of the color difference detection system in an embodiment of the application is shown. As Figure 5As shown, the color difference detection system 1 comprises a cloth image acquisition module 11, a cloth region color acquisition module 12, a LAB color data acquisition module 13 and a color difference detection result acquisition module 14. The cloth image acquisition module 11 is configured to acquire a cloth image of a cloth inspection machine. The cloth region color acquisition module 12 is configured to process the cloth image to acquire a cloth region color. The LAB color data acquisition module 13 is configured to perform color space conversion on the cloth region color to acquire LAB color data of the cloth region color; perform linearization processing on the cloth region color to acquire linearized color data; and perform normalization and non-linear transformation processing on the linearized color data to acquire the LAB color data of the cloth region color. The color difference detection result acquisition module 14 is configured to perform difference comparison on a plurality of LAB color data to acquire a color difference detection result.

[0094] It should be noted that, Figure 5 The modules in the color difference detection system 1 shown above and Figure 2 The steps in the color difference detection method correspond one by one, and will not be repeated here.

[0095] In several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules / units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of modules or units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be indirect coupling or communication connection through some interfaces, devices or modules or units, and can be electrical, mechanical or other forms.

[0096] The modules / units described as separate components can or can not be physically separated, and the components shown as modules / units can or can not be physical modules, i.e. can be located in one place or distributed on a plurality of network units. Part or all of the modules / units can be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in each embodiment of the present application can be integrated in one processing module, or each module / unit can be physically separated, or two or more modules / units can be integrated in one module / unit.

[0097] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0098] This application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the color difference detection method provided in this application. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The above 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 medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0099] This application embodiment may also provide an electronic device. Figure 6 The diagram shown is a structural schematic of an electronic device 2 according to an embodiment of this application. Figure 6 As shown, in this embodiment, the electronic device 2 includes a memory 21 and a processor 22.

[0100] The memory 21 is used to store computer programs. In some possible implementations, the memory 21 may include various media capable of storing program code, such as ROM, RAM, magnetic disk, USB flash drive, memory card, or optical disk.

[0101] In the embodiments of the present application, the memory 21 can include a computer system readable medium in the form of volatile memory, such as RAM and / or cache memory. The electronic device 2 can further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 21 can include at least one program product having a set (for example, at least one) of program modules configured to perform the functions of the embodiments of the present application.

[0102] The processor 22 is connected with the memory 21, and is configured to execute the computer program stored in the memory 21, so that the electronic device 2 performs the color difference detection method.

[0103] Exemplarily, the processor 22 can be a general purpose processor, including a central processing unit (CPU), a network processor (NP), etc. In other embodiments, the processor 22 can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0104] In some implementations, the electronic device 2 provided by the embodiments of the present application can further include a display 23. The display 23 is connected in communication with the memory 21 and the processor 22, and is configured to display a related graphical user interface (GUI) of the color difference detection method.

[0105] In the embodiments of the present application, the display 23 can include a display screen (display panel). In some implementations, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In addition, the display 23 can also be a touch panel (touch screen, touch screen), which can include a display screen and a touch-sensitive surface. When the touch-sensitive surface detects a touch operation thereon or adjacent thereto, it is transmitted to the processor 22 to determine the type of touch event, and then the processor 22 provides corresponding visual output on the display device according to the type of touch event.

[0106] The descriptions of the corresponding flow or structure of each of the above figures are each focused, and the parts not described in detail in a certain flow or structure can be referred to the related description of other flow or structure.

[0107] The above embodiments are only illustrative of the principles of the present application and its effects, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed by the present application should be covered by the claims of the present application.

Claims

1. A color difference detection method based on a fabric inspection machine, characterized in that, The color difference detection method includes: Obtain fabric images from the fabric inspection machine; The fabric image is processed to obtain the color of the fabric area; Perform color space conversion on the fabric area color to obtain LAB color data of the fabric area color; Compare the differences between multiple LAB color data sets to obtain color difference detection results; The process of obtaining the LAB color data of the fabric area includes: The color of the fabric area is linearized to obtain linearized color data; The linearized color data is normalized and nonlinearly transformed to obtain LAB color data of the fabric area color.

2. The color difference detection method according to claim 1, characterized in that, The process of processing the fabric image to obtain the color of the fabric area includes: The fabric image is processed to obtain a scaled-down image of the fabric; Color extraction is performed on the scaled image of the fabric to obtain the main colors of the scaled image of the fabric.

3. The color difference detection method according to claim 2, characterized in that, The process of processing the fabric image to obtain the fabric area color also includes: removing the fabric edge and non-fabric area colors during the color extraction process of the scaled fabric image.

4. The color difference detection method according to claim 1, characterized in that, The formula for linearizing the color of the fabric area is as follows: Clinear=(1.055C+0.055) 2.4 ,C>0.04045; Where Clinear represents the color component value of the linear fabric area, and C represents the color value of the fabric area.

5. The color difference detection method according to claim 1, characterized in that, The normalization and nonlinear transformation processing of the linearized color data includes: The linearized color data is normalized using D65 white point normalization to obtain normalized fabric area color data. The normalized fabric area color data is subjected to a nonlinear transformation to obtain the LAB color data of the fabric area color; wherein, the formula for the nonlinear transformation is as follows: f(t)=t 1 / 3 ,t>0.008856; L*=116f(Y / Yn)-16; a* = 500[f(X / Xn) - f(Y / Yn)]; b* = 200[f(Y / Yn) - f(Z / Zn)]; Where t is the color input value of the nonlinear transformation, Xn, Yn, and Zn are the normalized color data of the fabric area, and X, Y, and Z are the component values ​​of the fabric area color in the color space.

6. The color difference detection method according to claim 1, characterized in that, The process of performing difference comparison on multiple LAB color data includes: Perform interpolation on the LAB color data from the same camera before and after to obtain the interpolation result; The difference results are evaluated to obtain the color difference detection results.

7. The color difference detection method according to claim 1, characterized in that, The color difference detection method further includes: grouping the fabric images according to the camera source, and assigning the same number to fabric images acquired by the same camera.

8. A color difference detection system based on a fabric inspection machine, characterized in that, The color difference detection system includes: The fabric image acquisition module is used to acquire fabric images from the fabric inspection machine; The fabric area color acquisition module is used to process the fabric image to obtain the fabric area color; The LAB color data acquisition module is used to perform color space conversion on the fabric area color to obtain LAB color data of the fabric area color; to perform linearization processing on the fabric area color to obtain linearized color data; and to perform normalization and nonlinear transformation processing on the linearized color data to obtain LAB color data of the fabric area color. The color difference detection result acquisition module is used to compare the differences between multiple LAB color data to obtain the color difference detection result.

9. An electronic device, characterized in that, The electronic device includes: A memory on which computer programs are stored; A processor, communicatively connected to the memory, is used to execute the computer program to implement the color difference detection method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by an electronic device, it implements the color difference detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, system and device for detecting color difference based on machine vision and storage medium

    CN109141640A

  • System and method for generating output image data and microscope

    CN112799224A

  • Textile color difference detection method based on image data

    CN117372334A

  • Cloth color difference intelligent detection method based on improved vision algorithm

    CN119648814A

  • Image color distribution examination device and image color distribution examination method

    WO2016030919A1