A smart visual rating device and method for fabric appearance flatness

By reconstructing the 3D point cloud of fabric using machine vision technology and deep learning algorithms, the problems of subjectivity and lighting environment influence in fabric flatness detection are solved, achieving efficient and accurate fabric appearance flatness rating, applicable to various fabric types and complex environments.

CN119477857BActive Publication Date: 2025-10-31SHANGHAI ENTRY-EXIT INSPECTION & QUARANTINE BUREAU IND PROD & RAW MATERIALS TESTING TECH CENT +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411584745.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-10-31
Estimated Expiration
2044-11-07

AI Technical Summary

Technical Problem

Existing methods for testing fabric smoothness mainly rely on manual visual inspection, which is highly subjective and inefficient. Furthermore, existing technologies have limited applicability when dealing with fabrics of different textures and structures, are easily affected by lighting conditions, and cannot fully reflect the complexity of fabrics, resulting in inaccurate test results.

Method used

Using machine vision technology, a three-dimensional point cloud of fabric is reconstructed through a binocular stereo camera and deep learning algorithms. Combined with feature extraction and matching, an intelligent visual rating method for fabric appearance flatness is constructed, including image acquisition, preprocessing, camera calibration, feature matching, stereo matching, depth estimation, and three-dimensional reconstruction. Machine learning is used for objective rating.

Benefits of technology

It enables the flatness testing of various fabrics, has wide applicability, provides stable and accurate test results, and achieves a rating accuracy of 0.1, providing a scientific basis for quality assessment. It also reduces the influence of lighting environment and is suitable for testing the flatness of garment appearance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477857B_ABST
    Figure CN119477857B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent visual rating device and method for fabric appearance flatness. The method includes: S1: fabric image acquisition; S2: fabric image preprocessing; S3: camera calibration and image correction; S4: feature extraction and matching; S5: stereo matching and depth estimation; S6: 3D reconstruction; S7: fabric appearance flatness rating. Based on machine vision technology, this invention constructs an objective rating method for automatically processing differences in fabric depth images, thereby improving the efficiency and accuracy of fabric flatness detection and providing a more reliable and objective basis for fabric quality assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of fabric inspection, and specifically relates to an intelligent visual rating device and method for fabric appearance flatness. Background Technology

[0002] During production, processing, and use, flexible textile fabrics are susceptible to wrinkles due to mechanical forces, detergents, and environmental factors, affecting the aesthetics, comfort, and durability of textiles and garments. Currently, traditional methods for inspecting fabric smoothness rely primarily on visual inspection, which is subjective, inefficient, and cannot meet current product quality testing needs. Therefore, a smart, rapid, and objective inspection method is urgently required.

[0003] In published patents, image processing methods primarily rely on image technology to evaluate fabric smoothness, encompassing the extraction, analysis, and processing of image features. For example, patent application CN201910325894.4 discloses a fabric smoothness evaluation method based on the combination of three-dimensional and two-dimensional image features. This method combines two-dimensional and three-dimensional information about the fabric to obtain more information about the fabric surface. This combination avoids the shortcomings of single-dimensional images in characterizing fabric smoothness and transforms the smoothness problem of curved surfaces into a more easily solvable problem of curve curvature. However, the applicability of this method is limited for fabrics with different textures and structures, and if the two-dimensional and three-dimensional data are incorrectly fused, the evaluation may be inaccurate. Patent application CN201811165240.1 discloses an objective fabric smoothness rating method based on Fourier spectrum features, which can locate the range of wrinkle frequencies that the human eye can recognize, filtering out information that the human eye cannot recognize, and is more in line with the human visual evaluation system. However, this method may ignore some small details that affect fabric quality, resulting in the loss of visual information. Furthermore, a single frequency range selection may not fully reflect the complexity of different fabrics. Patent application CN201810613634.2 discloses an objective evaluation method for fabric smoothness based on images from four side light sources. It features high detection accuracy, objectivity, stability, reproducibility, and automation, but is susceptible to external lighting conditions. When faced with complex patterns, textures, or fabric defects, uneven light reflection may occur, affecting the evaluation results. Patent application CN201510710539.0 proposes a method for testing and evaluating the smoothness of clothing, using computer image processing technology. It is suitable for detecting unevenness caused by wrinkles during movement, but in actual wear, rapidly changing wrinkles may lead to inaccurate detection.

[0004] Machine learning methods focus on analyzing and rating fabric features through algorithm and model training. For example, patent application CN201510020830.5 discloses a fabric appearance smoothness evaluation method based on sparse coding, achieving automatic rating in an unsupervised state. However, its effectiveness depends on the richness of the selected base dictionary and is highly sensitive to data quality, posing a risk of poor model generalization ability and potentially poor performance on novel fabrics. Patent application CN201610930156.9 discloses a fabric smoothness customer evaluation method and device based on unsupervised machine learning, which rates fabrics through feature extraction and clustering, reducing human error. However, limitations in feature selection and uncertainty in clustering results may affect the accuracy and stability of the evaluation.

[0005] Regarding physical testing devices, the utility model patent with application number CN202121643103.1 proposes a device for controlling and testing the flatness of heat-set knitted fabrics, which solves the problem of needing to compare samples in real time, but its application scope is limited. The invention patent with application number CN201510710673.0 discloses a device and method for testing the flatness of fabrics after washing and wringing, filling the gap in the testing of flatness after hand washing and wringing, but it is only applicable to fabrics under specific conditions, thus limiting its application scope.

[0006] While currently published patents cover methods for detecting fabric smoothness, their application is limited. They typically only apply to specific types of fabric samples and lack detailed technical discussions on fabric smoothness under interference from color, texture, and complex patterns, failing to meet diverse market demands. Furthermore, existing methods are susceptible to external lighting conditions, resulting in insufficient detail capture. Therefore, there is an urgent need to develop an objective method for detecting fabric appearance smoothness that is highly applicable, efficient, and provides accurate and reliable evaluation results. Summary of the Invention

[0007] The purpose of this invention is to provide an intelligent visual rating device and method for fabric appearance smoothness. Based on machine vision technology, it constructs an objective rating method for automatically processing differences in fabric depth images based on the rapid reconstruction of the fabric appearance morphology, so as to improve the efficiency and accuracy of fabric smoothness detection and provide a more reliable and objective basis for fabric quality assessment.

[0008] To solve the above technical problems, the following technical solution is adopted:

[0009] A smart visual rating method for fabric appearance flatness, characterized by the following steps:

[0010] S1: Fabric image acquisition;

[0011] S2: Fabric image preprocessing;

[0012] S3: Camera Calibration and Image Correction: The checkerboard calibration method was adopted to obtain the intrinsic and extrinsic parameters of the stereo camera and establish the geometric model of camera imaging. Through calibration, the translation and rotation vectors between the left and right cameras were obtained. Based on this, epipolar geometry correction was performed to eliminate image distortion caused by lens distortion, ensure epipolar constraints between images, and provide basic data for 3D reconstruction.

[0013] S4: Feature Extraction and Matching: Based on deep learning, a global convolutional neural network is used as the feature extractor to extract feature points or feature regions from the left and right fabric image pairs for subsequent matching. Then, the correspondence between feature points or feature regions in the left and right fabric images is established, and matching is performed using similarity or distance metrics between features. A feature correlation pyramid is constructed to capture the correlation between features at different scales. Using the information in the feature correlation pyramid, the matching cost between features in the left and right fabric images is calculated. Simultaneously, a competition mechanism is introduced to compare the matching degree between different features and select the optimal match.

[0014] S5: Stereo Matching and Depth Estimation: Stereo matching calculates the horizontal displacement between corresponding points in the left and right images of the fabric, i.e., the disparity value, based on the result of feature matching. Subsequently, in the depth estimation stage, the calculated disparity value is converted into a depth value using camera parameters and the disparity-depth conversion formula, thereby constructing a depth map.

[0015] S6: 3D Reconstruction: Based on the depth map and camera parameters, generate the 3D point cloud structure of the fabric, and then perform point cloud processing, triangular mesh model generation, post-processing, visualization analysis and display.

[0016] S7: Fabric Appearance Smoothness Rating: Based on the reconstructed three-dimensional point cloud data of the fabric, the three-dimensional spatial morphology of the fabric surface is analyzed in depth, and then the appearance smoothness of the fabric is classified into levels.

[0017] According to the aforementioned intelligent visual rating method for fabric appearance smoothness, the step S1 includes:

[0018] (1) Fabric sample cutting: Cut fabric samples of the same size from different parts of the same piece of fabric;

[0019] (2) Fabric sample treatment: The cut fabric sample is subjected to temperature adjustment treatment, and then one or more of the following processes are combined: washing, drying, ironing, and trimming.

[0020] (3) Image acquisition: Use an image acquisition device to take pictures of the fabric sample to obtain fabric images.

[0021] After optimization, step S2 includes effective region cropping, grayscale processing, image enhancement, illumination balancing and noise reduction processing.

[0022] After optimization, step S3 includes:

[0023] (1) Camera calibration: The binocular stereo camera was calibrated using the checkerboard calibration method. The checkerboard calibration board was composed of alternating black and white grids. Under the premise of uniform lighting and stable installation of the binocular stereo camera, images of the checkerboard calibration board were taken at different positions and angles to obtain left and right view data. Then, the inner corner points on the checkerboard calibration board were extracted. Based on the initially extracted inner corner point information, the sub-pixel thinning algorithm was used to extract sub-pixel information to reduce camera calibration deviation. Finally, the binocular stereo camera calibration was completed and the camera's intrinsic and extrinsic parameters were obtained.

[0024] (2) Image correction: Using the camera intrinsic and extrinsic parameters obtained in step (1), perform intrinsic parameter correction and epipolar geometry correction of the image to eliminate image distortion caused by camera lens distortion; assume that a point P in Euclidean space has coordinates P1 = (x1, y1, z1) in the two coordinate systems. T And P2 = (x2, y2, z2) T Therefore, the transformation formula is:

[0025] P2=RP1+t (1)

[0026] In equation (1), R is the rotation matrix, which describes the rotation relationship between the two camera coordinate systems; t is the translation vector, which describes the translation relationship between the two camera coordinate systems; P1 and P2 are the pixel coordinates of the projection points of point P on the image planes of the two cameras, respectively.

[0027] According to the intelligent visual rating method for fabric appearance flatness, the step S4 includes:

[0028] (1) Feature extractor construction: Using a pre-trained convolutional neural network, deep features are extracted from the input left and right images of the fabric.

[0029] (2) Feature correlation pyramid construction: The extracted feature points or feature regions are applied to construct a feature correlation pyramid; in each layer of the pyramid, the similarity or distance metric between features is used for matching, thereby establishing the correspondence between feature points or feature regions in the left and right images of the fabric.

[0030] (3) Application of gradient-related region update operator: In the process of feature matching, the gradient-related region update operator is introduced to optimize the matching results in an iterative manner; by analyzing the gradient information around the feature points, the operator can adjust the position and weight of the feature points;

[0031] (4) Matching cost calculation and competition mechanism application: Using the information in the feature correlation pyramid, the matching cost between the features of the left and right images of the fabric is calculated; at the same time, a competition mechanism is introduced to compare the matching degree between different features, and the optimal match is selected by setting a threshold or sorting method.

[0032] After optimization, step S5 includes:

[0033] (1) Stereo matching: Based on the feature matching results, calculate the horizontal displacement between corresponding points in the left and right images of the fabric, i.e., the disparity value; apply a stereo matching algorithm that integrates semi-global matching, adaptive weight aggregation and cross-based cost aggregation modules to optimize the preliminary matching results and obtain a more accurate disparity value.

[0034] (2) Depth estimation: Based on the camera parameters and disparity values, the depth value of each pixel is calculated using the disparity-depth conversion formula (2).

[0035]

[0036] In equation (2), Z is the depth value; f is the camera focal length; B is the pp′ distance; d is the parallax value, which refers to the difference in pixel position between the left and right images of the stereo camera. The X coordinates of points p and p′ in the corresponding phase plane are x l and x r Define the disparity value d = x l -x r ;

[0037] (3) Optimize the depth map: By comparing the depth values ​​of corresponding points in the left and right images of the fabric, inconsistent matching points are eliminated. Points with differences exceeding a certain threshold are removed from the depth map.

[0038] After optimization, step S6 includes:

[0039] (1) 3D point cloud generation: Using the depth value of each pixel in the depth image, combined with camera parameters, the pixels are transformed from the two-dimensional image space to the three-dimensional world space to generate a three-dimensional point cloud.

[0040] (2) Point cloud processing: Smooth the generated 3D point cloud to eliminate noise and burrs; use statistical filtering and radius filtering to remove isolated points and noise points in the point cloud;

[0041] (3) Triangular mesh generation: Using triangular mesh generation algorithms such as Poisson surface reconstruction, the processed point cloud is triangularly divided to generate a continuous triangular mesh model.

[0042] (4) Post-processing: Optimize and adjust the initially generated triangular mesh model, map the texture information in the original fabric image onto the triangular mesh model to enhance the realism of the model; optimize the edges and vertices of the triangular mesh to improve the model's fineness and smoothness;

[0043] (5) Visualization analysis and display: Using 3D visualization software, the generated triangular mesh model is visualized and analyzed. Through the intuitive 3D model, the micro-morphology and undulation of the fabric can be directly observed.

[0044] After optimization, step S8 includes:

[0045] (1) Data input and preprocessing: Input the fabric point cloud data of the new sample into the trained triangular mesh model; the input data should be consistent with the training data format, including three-dimensional geometric features and preprocessed feature values;

[0046] (2) Rating prediction: The triangular mesh model calculates the fabric smoothness level based on the input point cloud data through deep learning algorithm and outputs rating results from level 1 to level 5. In the prediction process, the model uses the relationship between the features and labels learned in the previous training to obtain the corresponding smoothness level.

[0047] (3) Result comparison and verification: The flatness level predicted by the triangular mesh model is compared with the sample flatness level obtained through subjective evaluation; at the same time, real flatness data is used as a reference to verify whether the prediction of the triangular mesh model conforms to the actual situation.

[0048] (4) Accuracy optimization: In the feature extraction stage, high-resolution point cloud data and refined geometric feature analysis are used to capture the small height changes and wrinkle features on the fabric surface; support vector machine algorithm is used for flatness rating, and cross-validation technology is used to verify the triangular mesh model multiple times during the rating.

[0049] (5) Output results: The triangular mesh model will output the flatness rating and its corresponding geometric feature data for each sample.

[0050] A smart visual rating device for fabric appearance flatness is characterized by comprising a stereo frame, a binocular stereo camera, and an LED light source. The bottom of the stereo frame is a fabric stage, and the top of the stereo frame is a top plate. The fabric stage is equipped with a fabric carrier, which is detachable. The LED light source is located on both sides of the binocular stereo camera. The fabric stage is connected to a bottom stretching and expansion component for expanding the fabric stage. The bottom stretching and expansion component is equipped with a homogeneous filling material, which fills the expanded bottom stretching and expansion component. The top plate is connected to a top stretching and expansion component for expanding the top plate. The top stretching and expansion component is equipped with a lightweight filling material, which fills the expanded top stretching and expansion component.

[0051] After optimization, the top plate is equipped with a built-in magnetic ring belt, and the bottom stretching and expansion component is equipped with an external magnetic belt. The built-in magnetic ring belt and the external magnetic belt are used to fix the magnetic flexible curtain, and the magnetic flexible curtain is opaque.

[0052] The above technical solution has the following beneficial effects:

[0053] 1. This invention is not affected by factors such as fabric color, texture, or complex patterns, and is applicable to the flatness detection of various types of fabrics. Furthermore, the detection device can expand the detection space to include the flatness detection of finished garments, thus having broad applicability and application prospects.

[0054] 2. By optimizing the image processing algorithm and ensuring stable illumination at the physical level, this invention effectively reduces the impact of the external lighting environment on the detection results, ensuring stable and accurate detection results under different lighting conditions.

[0055] 3. Through a well-trained machine learning model, this invention can achieve objective and accurate rating of fabric point cloud data, with a rating accuracy of 0.1, providing a scientific basis for fabric quality assessment.

[0056] 4. Machine vision technology, as an efficient and accurate detection method, shows great potential in evaluating the smoothness of fabric appearance. Using machine vision technology, a comprehensive scan and analysis of the fabric surface can be performed, automatically identifying and extracting surface smoothness features, such as the height and density of wrinkles. The key to this technology lies in achieving rapid extraction and evaluation of fabric surface features through image processing and analysis algorithms. Therefore, this invention proposes an automatic detection method for fabric appearance smoothness based on machine vision, which can efficiently and accurately calculate the smoothness grade of the fabric, providing a reliable basis for fabric quality assessment. Attached Figure Description

[0057] The present invention will be further described below with reference to the accompanying drawings:

[0058] Figure 1 This is a flowchart of the rating method of the present invention.

[0059] Figure 2 This is a schematic diagram of the rating device of the present invention.

[0060] Figure 3 This is a schematic diagram of the arrangement of the magnetic flexible curtain;

[0061] Figure 4 A schematic diagram of a homogeneous filler board or a lightweight filler board;

[0062] Figure 5 Train the network architecture for the triangular mesh model.

[0063] The attached figures are labeled as follows: fabric platform 1, fabric platform 2, bottom stretching extension component 3, top plate 4, binocular stereo camera 5, LED light source, adjustable camera bracket 7, shockproof pad 8, stereo frame 9, top stretching extension component 10, built-in magnetic ring belt 11, external magnetic belt 12, and magnetic flexible curtain 13. Detailed Implementation

[0064] This invention aims to provide an intelligent visual rating device and method for fabric appearance smoothness. Based on machine vision technology, it constructs an objective rating method that automatically processes differences in fabric depth images, thereby improving the efficiency and accuracy of fabric smoothness detection and providing a more reliable and objective basis for fabric quality assessment. The technical solution of this invention is described in detail below with reference to specific embodiments:

[0065] Example 1

[0066] like Figure 2As shown, this invention designs an intelligent visual rating device for fabric appearance flatness, which is used for fabric image acquisition. The device includes a stereo frame 9, a binocular stereo camera 5, and an LED light source 6. The stereo frame 9 has three open sides, serving as the basic structure of the rating device. The bottom of the stereo frame 9 is a fabric stage 1, and the top of the stereo frame 9 is a top plate 4. The fabric stage 1 is made of gray metal sheet to ensure that the fabric remains flat and undeformed during image acquisition. The fabric stage 1 is connected to a bottom stretching expansion component 3, which can be stretched to the required size according to the size of the fabric sample. After expansion, the bottom stretching expansion component 3 forms an opening inside. To ensure the flatness of the unfolded fabric stage 1, it is equipped with a homogeneous filling plate whose structure matches the opening to fill the opening, thereby forming a complete, seamless horizontal plane, eliminating the layer difference generated after expansion, and the mosaic design of the homogeneous filling plate ensures that the bottom of the rating device does not leak light. The planar extension function allows the device and rating method to be extended from the range of tested fabric samples to the range of garment appearance smoothness rating.

[0067] The fabric stage 1 is equipped with a fabric support platform 2, which is used to place fabric samples. The platform is detachable and can be replaced according to the size of the fabric samples. The bottom of the fabric stage 1 is equipped with a shock-absorbing pad 8 to reduce the impact of external environmental vibrations on image quality, ensure stability during the shooting process, and improve the reliability of image acquisition.

[0068] The top plate 4 is connected to a top stretchable extension assembly 10, which has the same structure and function as the bottom stretchable extension assembly 3. Similarly, after expansion, the top stretchable extension assembly 10 forms an opening inside. To ensure the flatness of the unfolded fabric platform 1, it is equipped with a lightweight filling board whose structure matches the opening and is used to fill it. This lightweight filling board is lighter than a similar filling board, reducing the load on the top structure.

[0069] The binocular stereo camera 5 is the core imaging device, mounted on top of the stereo frame 9 via an adjustable camera mount 7. This binocular stereo camera 5 boasts a high resolution of over 5 megapixels and is equipped with autofocus and exposure adjustment functions to adapt to image acquisition under varying lighting conditions. Simultaneously, before image acquisition, the viewing angle and position between the two cameras must be precisely calibrated to ensure consistency in depth information in the acquired images. The binocular stereo camera 5 has adjustable LED light sources 6 on both sides to provide uniform illumination, reduce the impact of shadows and reflections on image quality, and avoid image information loss caused by uneven or insufficient lighting. The height and angle of the adjustable camera mount 7 can be adjusted according to experimental needs.

[0070] The stereo camera 5 connects to a computer via USB or Ethernet cable for easy real-time image transmission and storage. The computer is equipped with high-performance image processing software that supports real-time image analysis and processing, providing support for subsequent image preprocessing, correction, and 3D reconstruction.

[0071] The top plate 4 is equipped with a built-in magnetic ring strap 11, and the bottom stretching expansion component 3 is equipped with an external magnetic strap 12. The built-in magnetic ring strap 11 and the external magnetic strap 12 are used to fix the magnetic flexible curtain 13, which is black and opaque. The combination of the built-in magnetic ring strap 11, the external magnetic strap 12, and the magnetic flexible curtain 13 creates an opaque environment, ensuring that the test light source is clean and singular, avoiding the influence of the external light environment. The built-in magnetic ring strap 11 is connected to the top plate 4 and attracts the magnetic area on the upper part of the magnetic flexible curtain 13, while the external magnetic strap 12 is attached to the bottom stretching expansion component 3, connecting the sealed magnetic flexible curtain 13 to create an opaque space and reduce the influence of the external light environment. Considering that the perimeter of the three sides changes after the space is expanded, the length of the black magnetic flexible curtain 13 is slightly longer than the perimeter of the device in the fully expanded state. During use, the excess part can be magnetically attached to the three-dimensional frame 9.

[0072] Example 2

[0073] This invention discloses an intelligent visual rating device and method for fabric appearance flatness, comprising the following steps:

[0074] S1: Fabric image acquisition:

[0075] Since fabric samples typically exhibit varying degrees of undulation and wrinkles after washing, drying, or ironing, this provides typical characteristics for determining the smoothness of the fabric appearance. According to relevant standards or user requirements, three identical fabric samples, after washing, drying, or ironing, are arbitrarily cut from different areas of a single fabric piece. After the above processing, the image acquisition device from Example 1 is used to acquire standard fabric appearance images of the three samples. The specific steps are as follows:

[0076] (1) Fabric sample cutting: According to relevant standards or user requirements, three equally sized fabric samples are cut from different parts of the same fabric. Ensure that the sample sizes are consistent to reduce the impact of human error on the test results.

[0077] (2) Fabric sample treatment: After the cut sample is subjected to temperature adjustment treatment for more than 15 hours, it is then washed, dried, ironed or other procedures in accordance with relevant standards, and the treated fabric sample is trimmed.

[0078] a. Washing: Place the fabric sample in a washing machine and wash it with water or detergent to remove any possible impurities. After washing, air dry naturally to create natural wrinkles.

[0079] b. Ironing: Use an iron to iron to achieve different levels of wrinkle effects. Temperature and pressure should be controlled during ironing to create repeatable wrinkle features.

[0080] c. Trimming: Some fabrics may develop frayed edges after washing, so excess frayed edges need to be trimmed to ensure that the sample remains intact and without any excess.

[0081] (3) Image acquisition: The fabric samples after steps (1) and (2) are photographed using the device of Example 1 to ensure that the surface morphology of each sample is completely recorded, providing important visual data support for the evaluation of the fabric appearance smoothness.

[0082] S2: Fabric image preprocessing;

[0083] To provide a reliable foundation for subsequent image analysis and fabric quality assessment, the acquired fabric images undergo effective region cropping, grayscale conversion, image enhancement combined with illumination balancing to highlight details, and then smoothing to reduce noise interference. The specific steps are as follows:

[0084] (1) Effective area clipping is

[0085] By focusing on analyzing information from the fabric surface and avoiding external interference, edge detection technology is used to automatically identify and crop out the effective area of ​​the fabric image, removing redundant parts to ensure that the image information is concise and effective.

[0086] (2) Grayscale processing

[0087] To simplify image information and reduce computational complexity, the acquired fabric images are converted to grayscale. By removing color information and converting them into grayscale images containing only brightness information, the stability and accuracy of subsequent processing steps are improved.

[0088] (3) Image enhancement

[0089] Image enhancement employs adaptive gamma correction, a technique within local contrast enhancement, to accurately reflect the texture and wrinkle information of the fabric surface. Adaptive gamma correction dynamically adjusts the gamma value based on the local brightness information of the image, thereby enhancing image contrast. In low-brightness areas, the gamma value is decreased to enhance shadow details; in high-brightness areas, the gamma value is increased to compress highlight details. This step not only preserves the texture and wrinkle information of the fabric surface but also makes the overall image contrast more uniform, highlighting the processed surface information of the fabric.

[0090] (4) Light balance

[0091] An image enhancement method based on Retinex theory is adopted to simulate the human visual system's ability to adapt to changes in illumination. By calculating the relationship between the brightness of each pixel in the image and the brightness of surrounding pixels, the illumination is adjusted to eliminate the influence of illumination changes on fabric feature extraction. This ensures that the image maintains consistent brightness and contrast under different illumination conditions, thereby more accurately reflecting the characteristics of the fabric.

[0092] (5) Noise reduction processing

[0093] A Gaussian filter combined with bilateral filtering is used for noise reduction to remove random noise from the image. The introduction of bilateral filtering significantly enhances edge preservation and avoids the edge blurring problem that may be caused by Gaussian filtering. This allows the processed image to clearly display the edge and texture information while removing noise.

[0094] S3: Camera Calibration and Image Correction:

[0095] A checkerboard calibration method was used to obtain the intrinsic and extrinsic parameters of the stereo camera and establish a geometric model of camera imaging. Through calibration, the translation and rotation vectors between the left and right cameras were obtained. Based on these, epipolar geometry correction was performed to eliminate image distortion caused by lens distortion, ensure epipolar constraints between images, and provide fundamental data for 3D reconstruction. The specific steps are as follows:

[0096] (1) Camera calibration: The binocular stereo camera was calibrated using the checkerboard calibration method. The checkerboard calibration board was composed of alternating black and white grids. To ensure the accuracy and effectiveness of the camera parameters, under the premise of uniform lighting and stable installation of the binocular stereo camera, images of the checkerboard calibration board were taken at different positions and angles, and more than 7 left and right view data were obtained. Then, the inner corner points on the checkerboard calibration board were extracted. Based on the initially extracted inner corner point information, the sub-pixel thinning algorithm was used to further extract sub-pixel information, thereby reducing the camera calibration deviation. Finally, the binocular stereo camera calibration was completed and the camera's intrinsic and extrinsic parameters, including distortion coefficient, focal length, principal point position, etc., were obtained.

[0097] (2) Image correction: Using the camera intrinsic and extrinsic parameters obtained in step (1), perform intrinsic parameter correction and epipolar geometry correction of the image to eliminate image distortion caused by camera lens distortion; assume that a point P in Euclidean space has coordinates P1 = (x1, y1, z1) in the two coordinate systems. T And P2 = (x2, y2, z2) T Therefore, the transformation formula is:

[0098] P2=RP1+t (1)

[0099] In equation (1), R is the rotation matrix, which describes the rotation relationship between the two camera coordinate systems; t is the translation vector, which describes the translation relationship between the two camera coordinate systems; P1 and P2 are the pixel coordinates of the projection points of point P on the image planes of the two cameras, respectively.

[0100] S4: Feature Extraction and Matching

[0101] This deep learning-based approach employs a global convolutional neural network as a feature extractor to extract feature points or regions from left and right fabric image pairs for subsequent matching. Subsequently, it establishes the correspondence between feature points or regions in the left and right fabric images, using similarity or distance metrics between features for matching, and constructs a feature correlation pyramid to capture the correlation between features at different scales. Using information from the feature correlation pyramid, it calculates the matching cost between features in the left and right fabric images. A competition mechanism is introduced to compare the matching degree between different features and select the optimal match. This step includes a feature extractor module, a feature correlation pyramid module, and a gradient correlation region update operator module. The specific steps are as follows:

[0102] (1) Feature Extractor Construction: Using a pre-trained convolutional neural network, deep feature extraction is performed on the input left and right images. This module can capture local details and global structural information in the image and generate high-dimensional feature representations.

[0103] (2) Feature Correlation Pyramid Construction: The extracted feature points or feature regions are applied to construct a feature correlation pyramid. By capturing the correlation between features at different scales, the robustness of matching is enhanced. In each layer of the pyramid, matching is performed using similarity or distance metrics between features, thereby establishing the correspondence between feature points or feature regions in the left and right images.

[0104] (3) Application of gradient-related region update operator: In the process of feature matching, the gradient-related region update operator is introduced to optimize the matching results in an iterative manner; by analyzing the gradient information around the feature points, the operator can adjust the position and weight of the feature points and improve the accuracy of matching.

[0105] (4) Matching cost calculation and competition mechanism application: Using the information in the feature correlation pyramid, the matching cost between the features of the left and right images of the fabric is calculated; at the same time, a competition mechanism is introduced to compare the matching degree between different features. By setting thresholds or sorting methods, the optimal match is selected, which ensures the stability and reliability of the matching results and reduces the possibility of mismatch.

[0106] S5: Stereo Matching and Depth Estimation

[0107] Stereo matching aims to accurately calculate the horizontal displacement, or disparity, between corresponding points in the left and right images based on feature matching results. To achieve this, a multi-module fusion algorithm is employed to improve matching accuracy, resulting in a stereo matching algorithm that integrates semi-global matching, adaptive weight aggregation, and cross-based cost aggregation modules. Subsequently, in the depth estimation stage, the calculated disparity values ​​are converted into depth values ​​using camera parameters and the disparity-depth conversion formula, thereby constructing a depth map. To improve the accuracy of the depth map, a left-right consistency check is performed to eliminate inconsistent matching points. The specific steps are as follows:

[0108] (1) Stereo matching: Based on the feature matching results, calculate the horizontal displacement between corresponding points in the left and right images of the fabric, i.e., the disparity value; apply a stereo matching algorithm that integrates semi-global matching (SGM), adaptive weight aggregation and cross-based cost aggregation modules to optimize the preliminary matching results and obtain a more accurate disparity value.

[0109] (2) Depth estimation: Based on the camera parameters and disparity values, the depth value of each pixel is calculated using the disparity-depth conversion formula (2).

[0110]

[0111] In equation (2), Z is the depth value; f is the camera focal length; B is the pp′ distance; d is the parallax value, which refers to the difference in pixel position between the left and right images of the stereo camera. The X coordinates of points p and p′ in the corresponding phase plane are x l and x r Define the disparity value d = x l -x r ;

[0112] (3) Optimize the depth map: By comparing the depth values ​​of corresponding points in the left and right images of the fabric, inconsistent matching points are eliminated, and the accuracy of the depth map is improved. That is, points with differences exceeding a certain threshold are removed from the depth map.

[0113] S6: 3D Reconstruction

[0114] Based on the depth map and camera parameters, a 3D point cloud structure of the fabric is generated. Then, point cloud processing software is used to smooth and denoise the generated 3D point cloud structure to improve its quality and visualization. This step involves a 3D reconstruction module that combines depth map conversion, triangular mesh generation, and post-processing techniques. The specific steps are as follows:

[0115] (1) 3D point cloud generation: Using the depth value Z of each pixel in the depth image, combined with camera parameters such as intrinsic and extrinsic parameter matrices, the pixels are transformed from the two-dimensional image space to the three-dimensional world space to generate a three-dimensional point cloud.

[0116] (2) Point cloud processing: In order to extract useful information from the raw data and perform preliminary processing and optimization, the generated 3D point cloud is smoothed to eliminate noise and spikes. Statistical filtering, radius filtering and other methods are used to remove isolated points and noise points in the point cloud to improve the quality of the point cloud.

[0117] (3) Triangular mesh generation: Using triangular mesh generation algorithms such as Poisson surface reconstruction, the processed point cloud is triangulated to generate a continuous triangular mesh model, which provides convenience for subsequent visualization analysis.

[0118] (4) Post-processing: The initially generated triangular mesh model is optimized and adjusted to improve its quality and visualization effect. The texture information in the original fabric image is mapped onto the triangular mesh model to enhance the realism of the model; the edges, vertices and other details of the triangular mesh are optimized to improve the model's precision and smoothness;

[0119] (5) Visualization analysis and display: Using 3D visualization software such as CloudCompare, the generated triangular mesh model is visualized and analyzed. Through the intuitive 3D model, the micro-morphology and undulation of the fabric can be directly observed, providing strong support for the fabric appearance flatness rating.

[0120] S7: Fabric Appearance Smoothness Rating: Based on the reconstructed 3D point cloud data of the fabric, the 3D spatial morphology of the fabric surface is analyzed in depth, and then the fabric appearance smoothness is classified into levels. This invention combines geometric features such as the height difference of fabric surface undulations and the density of wrinkles, and uses machine learning algorithms to classify the fabric smoothness into levels 1 to 5, with a rating accuracy of 0.1. The specific steps are as follows:

[0121] (1) Data input and preprocessing: Input the fabric point cloud data of the new fabric sample into the trained triangular mesh model; the input data should be consistent with the training data format, including three-dimensional geometric features and preprocessed feature values;

[0122] (2) Rating prediction: The triangular mesh model calculates the fabric smoothness level based on the input point cloud data through deep learning algorithm and outputs rating results from level 1 to level 5. In the prediction process, the model uses the relationship between the features and labels learned in the previous training to obtain the corresponding smoothness level.

[0123] (3) Result comparison and verification: The flatness level predicted by the triangular mesh model is compared with the sample flatness level obtained through subjective evaluation; at the same time, real flatness data is used as a reference to verify whether the prediction of the triangular mesh model conforms to the actual situation.

[0124] (4) Accuracy optimization: In order to achieve a flatness rating accuracy of 0.1, during the feature extraction stage, high-resolution point cloud data and refined geometric feature analysis are used to capture the small height changes and wrinkle features on the fabric surface; the support vector machine (SVM) algorithm is used for flatness rating, and cross-validation technology is used to verify the triangular mesh model multiple times during the rating to ensure its stability and accuracy.

[0125] (5) Results output: The triangular mesh model will output the flatness rating and its corresponding geometric feature data for each sample, ensuring the accuracy and reliability of the results.

[0126] The above are merely specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent substitutions, or modifications made based on the present invention to solve essentially the same technical problems and achieve essentially the same technical effects are all covered within the protection scope of the present invention.

Claims

1. A smart visual rating method for fabric appearance flatness, characterized in that... Includes the following steps: S1: Fabric image acquisition; S2: Fabric image preprocessing; S3: Camera Calibration and Image Correction: The checkerboard calibration method was adopted to obtain the intrinsic and extrinsic parameters of the stereo camera and establish the geometric model of camera imaging. Through calibration, the translation and rotation vectors between the left and right cameras were obtained. Based on this, epipolar geometry correction was performed to eliminate image distortion caused by lens distortion, ensure epipolar constraints between images, and provide basic data for 3D reconstruction. S4: Feature Extraction and Matching: Based on deep learning, a global convolutional neural network is used as a feature extractor to extract feature points or feature regions from the left and right image pairs of the fabric for subsequent matching. Subsequently, the correspondence between feature points or feature regions in the left and right images of the fabric is established, and matching is performed using similarity or distance metrics between features. A feature correlation pyramid is constructed to capture the correlation between features at different scales. Using information from the feature correlation pyramid, the matching cost between features in the left and right images of the fabric is calculated; at the same time, a competition mechanism is introduced to compare the matching degree between different features and select the optimal match. S5: Stereo Matching and Depth Estimation: Stereo matching calculates the horizontal displacement between corresponding points in the left and right images of the fabric, i.e., the disparity value, based on the result of feature matching. Subsequently, in the depth estimation stage, the calculated disparity values ​​are converted into depth values ​​using camera parameters and the disparity-depth conversion formula, thereby constructing a depth map; S6: 3D Reconstruction: Based on the depth map and camera parameters, generate the 3D point cloud structure of the fabric, and then perform point cloud processing, triangular mesh model generation, post-processing, visualization analysis and display. S7: Fabric Appearance Smoothness Rating: Based on the reconstructed three-dimensional point cloud data of the fabric, the three-dimensional spatial morphology of the fabric surface is analyzed in depth, and then the appearance smoothness of the fabric is classified into levels.

2. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S1 includes: (1) Fabric sample cutting: Cut fabric samples of the same size from different parts of the same piece of fabric; (2) Fabric sample treatment: The cut fabric sample is subjected to temperature adjustment treatment, and then one or more of the following processes are combined: washing, drying, ironing, and trimming. (3) Image acquisition: Use an image acquisition device to take pictures of the fabric sample to obtain fabric images.

3. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S2 includes effective region cropping, grayscale processing, image enhancement, illumination balancing, and noise reduction processing.

4. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S3 includes: (1) Camera calibration: The binocular stereo camera was calibrated using the checkerboard calibration method. The checkerboard calibration board was composed of alternating black and white grids. Under the premise of uniform lighting and stable installation of the binocular stereo camera, images of the checkerboard calibration board were taken at different positions and angles to obtain left and right view data. Then, the inner corner points on the checkerboard calibration board were extracted. Based on the initially extracted inner corner point information, the sub-pixel thinning algorithm was used to extract sub-pixel information to reduce camera calibration deviation. Finally, the binocular stereo camera calibration was completed and the camera's intrinsic and extrinsic parameters were obtained. (2) Image correction: Using the camera intrinsic and extrinsic parameters obtained in step (1), perform intrinsic parameter correction and epipolar geometry correction of the image to eliminate image distortion caused by camera lens distortion; assume that a point P in Euclidean space has coordinates P1 = (x1, y1, z1) in the two coordinate systems. T and P2 = (x2, y2, z2) T Therefore, the transformation formula is: P2=RP1+t (1) In equation (1), R is the rotation matrix, which describes the rotation relationship between the two camera coordinate systems; t is the translation vector, which describes the translation relationship between the two camera coordinate systems; P1 and P2 are the pixel coordinates of the projection points of point P on the image planes of the two cameras, respectively.

5. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S4 includes: (1) Feature extractor construction: Using a pre-trained convolutional neural network, deep features are extracted from the input left and right images of the fabric. (2) Feature correlation pyramid construction: The extracted feature points or feature regions are applied to construct a feature correlation pyramid; in each layer of the pyramid, the similarity or distance metric between features is used for matching, thereby establishing the correspondence between feature points or feature regions in the left and right images of the fabric. (3) Application of gradient-related region update operator: In the process of feature matching, the gradient-related region update operator is introduced to optimize the matching results in an iterative manner; by analyzing the gradient information around the feature points, the operator can adjust the position and weight of the feature points. (4) Matching cost calculation and competition mechanism application: Using the information in the feature correlation pyramid, the matching cost between the features of the left and right images of the fabric is calculated; at the same time, a competition mechanism is introduced to compare the matching degree between different features, and the optimal match is selected by setting a threshold or sorting method.

6. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S5 includes: (1) Stereo matching: Based on the feature matching results, calculate the horizontal displacement between corresponding points in the left and right images of the fabric, i.e., the disparity value; apply a stereo matching algorithm that integrates semi-global matching, adaptive weight aggregation and cross-based cost aggregation modules to optimize the preliminary matching results and obtain a more accurate disparity value. (2) Depth estimation: Based on the camera parameters and disparity values, the depth value of each pixel is calculated using the disparity-depth conversion formula (2). In equation (2), Z is the depth value; f is the camera focal length; B is the pp′ distance; d is the parallax value, which refers to the difference in pixel position between the left and right images of the stereo camera. The X coordinates of points p and p′ in the corresponding phase plane are x l and x r Define the disparity value d = x l -x r ; (3) Optimize the depth map: By comparing the depth values ​​of corresponding points in the left and right images of the fabric, inconsistent matching points are eliminated. Points with differences exceeding a certain threshold are removed from the depth map.

7. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S6 includes: (1) 3D point cloud generation: Using the depth value of each pixel in the depth image, combined with camera parameters, the pixels are transformed from the two-dimensional image space to the three-dimensional world space to generate a three-dimensional point cloud. (2) Point cloud processing: Smooth the generated 3D point cloud to eliminate noise and burrs; use statistical filtering and radius filtering to remove isolated points and noise points in the point cloud; (3) Triangular mesh generation: Using triangular mesh generation algorithms such as Poisson surface reconstruction, the processed point cloud is triangularly divided to generate a continuous triangular mesh model. (4) Post-processing: Optimize and adjust the initially generated triangular mesh model, map the texture information in the original fabric image onto the triangular mesh model to enhance the realism of the model; optimize the edges and vertices of the triangular mesh to improve the model's fineness and smoothness; (5) Visualization analysis and display: Using 3D visualization software, the generated triangular mesh model is visualized and analyzed. Through the intuitive 3D model, the micro-morphology and undulation of the fabric can be directly observed.

8. The intelligent visual rating method for fabric appearance flatness according to claim 1, characterized in that: Step S8 includes: (1) Data input and preprocessing: Input the fabric point cloud data of the new sample into the trained triangular mesh model; the input data should be consistent with the training data format, including three-dimensional geometric features and preprocessed feature values; (2) Grade prediction: The triangular mesh model calculates the fabric smoothness grade based on the input point cloud data through a deep learning algorithm and outputs a rating result of 1 to 5. In the prediction process, the model uses the relationship between the features and labels learned in the previous training to obtain the corresponding smoothness grade. (3) Result comparison and verification: The flatness level predicted by the triangular mesh model is compared with the sample flatness level obtained through subjective evaluation; at the same time, real flatness data is used as a reference to verify whether the prediction of the triangular mesh model conforms to the actual situation. (4) Accuracy optimization: In the feature extraction stage, high-resolution point cloud data and refined geometric feature analysis are used to capture the small height changes and wrinkle features on the fabric surface; support vector machine algorithm is used for flatness rating, and cross-validation technology is used to verify the triangular mesh model multiple times during the rating. (5) Output results: The triangular mesh model will output the flatness rating and its corresponding geometric feature data for each sample.

9. A fabric appearance flatness intelligent visual rating device according to claim 1, characterized in that: The device includes a stereo frame, a binocular stereo camera, and LED light sources. The bottom of the stereo frame is a fabric platform, and the top of the stereo frame is a top plate. The fabric platform is equipped with a detachable fabric carrier. The LED light sources are located on both sides of the binocular stereo camera. The fabric platform is connected to a bottom stretching extension assembly for expanding the fabric platform. The bottom stretching extension assembly is equipped with a homogeneous filler plate, which fills the expanded bottom stretching extension assembly. The top plate is connected to a top stretching extension assembly for expanding the top plate. The top stretching extension assembly is equipped with a lightweight filler plate, which fills the expanded top stretching extension assembly.

10. The intelligent visual rating device for fabric appearance flatness according to claim 9, characterized in that: The top plate is equipped with a built-in magnetic ring belt, and the bottom stretching and expansion assembly is equipped with an external magnetic belt. The built-in magnetic ring belt and the external magnetic belt are used to fix the magnetic flexible curtain. The magnetic flexible curtain is opaque.

Citation Information

Patent Citations

  • Sparse coding-based fabric appearance flatness evaluation method

    CN104616291A

  • A method for testing and evaluating the flatness of clothing when worn

    CN105243671B

  • Test Method for the Flatness of Wringing after Washing of Fabrics

    CN105258656B

  • Fabric flatness objective evaluation method and fabric flatness objective evaluation device based on unsupervised machine learning

    CN106529544A

  • An objective method for evaluating fabric flatness based on images from four side light sources

    CN108519066B