A grey fabric width measurement method, system, computer device and storage medium

By using the Mob il eOne model and image processing technology, combined with servo motors and camera modules, the accuracy and efficiency problems of fabric width measurement in traditional methods have been solved, and high-precision width measurement in complex environments has been achieved.

CN115760751BActive Publication Date: 2026-02-17SHANGHAI ZHIJING INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211434105.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2026-02-17
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

Traditional methods and machine learning image processing suffer from repetitive work, human error, and low measurement accuracy in measuring fabric width, especially when there are large differences in fabric edge texture and complex background environment, resulting in inaccurate width measurement.

Method used

The system employs a high-performance mobile network, Mob il eOne model, combined with image processing technology. By controlling the camera to move along the width direction of the fabric to capture images, image preprocessing and recognition are performed. The fabric width is calculated by combining the captured coordinates, and the measurement accuracy is improved by utilizing servo motors and camera modules.

Benefits of technology

It enables rapid and accurate measurement of fabric width even in complex backgrounds and with significant texture differences, improving measurement accuracy and production efficiency while reducing hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115760751B_ABST
    Figure CN115760751B_ABST
Patent Text Reader

Abstract

The application relates to a grey cloth width measurement method, a system, computer equipment and a storage medium, and the method comprises the following steps: controlling a camera to move along the width direction of the grey cloth and shoot a plurality of grey cloth images; performing image processing on each grey cloth image to generate a corresponding pretreatment image; identifying each pretreatment image by using Mobile One to obtain a corresponding grey cloth image category; obtaining the shooting coordinates corresponding to each grey cloth image; and calculating the cloth width of the grey cloth according to the grey cloth image category and the shooting coordinates corresponding to each grey cloth image. The application has the advantage that the cloth width can be accurately measured.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of grey cloth recognition, and more particularly to a grey cloth width measurement method and system, a computer device, and a storage medium. BACKGROUND

[0002] The widths of cloth pieces woven in different order scenarios are different, and the subsequent work processes in the textile factory all rely on the cloth width parameter for subsequent process circulation. The traditional method measures and obtains the grey cloth width by manual measurement and machine reading, and then manually inputs the MES, which has the problems of repeated work and easy errors. The traditional machine learning and image processing method for measuring the cloth width also has the problems of misrecognition and low accuracy. The cloth edges have large texture differences due to factors such as process, color, texture, and organizational structure, and the background environment of the cloth edges on the machine is complex, so the measurement accuracy is low, resulting in inaccurate width, and thus there is room for improvement. SUMMARY

[0003] In view of the deficiencies of the prior art, the present application aims to provide a grey cloth width measurement method and system, a computer device, and a storage medium, which have the advantage of being able to accurately measure the width of the cloth.

[0004] The above technical purpose of the present application is achieved by the following technical solution: a grey cloth width measurement method, comprising:

[0005] controlling a camera to move along the width direction of the grey cloth and take a plurality of grey cloth images;

[0006] performing image processing on each grey cloth image to generate a corresponding preprocessed image;

[0007] identifying each preprocessed image using MobileOne to obtain a corresponding grey cloth image category;

[0008] obtaining the shooting coordinates corresponding to each grey cloth image;

[0009] calculating the cloth width of the grey cloth according to the grey cloth image category and the shooting coordinates corresponding to each grey cloth image.

[0010] Optionally, the controlling the camera to move along the width direction of the grey cloth and take a plurality of grey cloth images comprises:

[0011] setting the distance between the camera and the grey cloth as a first preset distance;

[0012] controlling the camera to move along the width direction of the grey cloth at a preset speed;

[0013] controlling the camera to take a shot of the grey cloth every preset shooting time interval to obtain a plurality of grey cloth images.

[0014] Optionally, the step of performing image processing on each fabric image to generate a corresponding preprocessed image includes:

[0015] Histogram equalization is performed on each raw fabric image to obtain the corresponding first processed image;

[0016] Pixel averaging is performed on each of the first processed images to obtain the corresponding second processed images;

[0017] Data standardization is performed on each of the second-processed images to obtain the corresponding preprocessed images.

[0018] Optionally, the step of using Mob il eOne to identify each preprocessed image to obtain the corresponding fabric image category includes:

[0019] The score for the area inside the fabric is pre-set as the first score, the score for the edge area is set as the second score, and the score for the area outside the fabric is set as the third score, where the first score is less than the second score, and the second score is less than the third score.

[0020] Mob il eOne was used to identify all regions in each preprocessed image, and the total score for each preprocessed image was calculated.

[0021] The corresponding fabric image category is determined based on the total score of each preprocessed image.

[0022] Optionally, obtaining the shooting coordinates corresponding to each fabric image includes:

[0023] The origin of the coordinate system is the initial position of the camera, and the coordinate axes are the direction of camera movement.

[0024] The shooting coordinates of each fabric image are calculated based on the shooting timestamp, preset speed, and preset shooting time of each fabric image.

[0025] Optionally, the step of calculating the fabric width based on the fabric image category and shooting coordinates corresponding to each fabric image includes:

[0026] The two images of the fabric with the highest total score are used as the first edge fabric image and the second edge fabric image;

[0027] The shooting coordinates of the first edge fabric image are obtained as the first shooting coordinates;

[0028] The shooting coordinates of the second edge fabric image are obtained as the second shooting coordinates;

[0029] Set the pixel width of all fabric images to the image ratio of the actual width;

[0030] The width from the edge of the fabric to the outer area of ​​the fabric in the first edge fabric image is calculated based on the image ratio and used as the first width.

[0031] The width from the edge of the fabric to the outside of the fabric in the second edge fabric image is calculated based on the image ratio and used as the second width.

[0032] The fabric width is calculated based on the first shooting coordinates, the second shooting coordinates, the first width, and the second width.

[0033] A fabric width measurement system includes: an image capturing module for controlling a camera to move along the width direction of the fabric and capture several fabric images;

[0034] The image processing module is used to process the images of each fabric and generate corresponding preprocessed images.

[0035] The image recognition module is used to identify each preprocessed image using MobileOne to obtain the corresponding fabric image category;

[0036] The coordinate acquisition module is used to obtain the shooting coordinates corresponding to each fabric image;

[0037] The width calculation module is used to calculate the width of the fabric based on the fabric image category and shooting coordinates corresponding to each fabric image.

[0038] Optionally, the image capturing module includes:

[0039] The distance setting unit is used to set the distance between the camera and the fabric to a first preset distance;

[0040] The speed control unit is used to control the camera to move at a preset speed along the width of the fabric.

[0041] The shooting time control unit is used to control the camera to take pictures of the fabric at preset shooting intervals to obtain several images of the fabric.

[0042] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described above.

[0043] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0044] In summary, the present invention has the following beneficial effects: A crossbeam spanning the loom is erected above the loom, and a servo motor and camera module are mounted on the crossbeam. By controlling the servo motor to drive the camera along the width direction, the camera captures images of the fabric during its movement, thereby obtaining several images of the fabric, with the shooting area covering the entire fabric surface including the selvage. Since the fabric selvage texture varies greatly due to factors such as process, color, texture, and weave structure, and the background environment of the selvage on the loom is complex, it is necessary to process each fabric image to improve the accuracy of subsequent recognition. Furthermore, the Mobil eOne is used to recognize each pre-processed image, which has a fast inference speed and recognition accuracy, and can accurately obtain the recognition structure of each pre-processed image. During the camera shooting process, the captured physical coordinate information is also stored. Therefore, by recognizing the selvage area and combining it with the corresponding pre-processed image, the accurate fabric width can be calculated. Attached Figure Description

[0045] Figure 1 This is a schematic diagram of the process of the present invention;

[0046] Figure 2 This is a structural block diagram of the present invention during assembly;

[0047] Figure 3 This is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation

[0048] To make the objectives, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Several embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.

[0049] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances. The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature.

[0050] In this invention, unless otherwise expressly specified and limited, "above" or "below" a second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of a second feature includes the first feature being directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" of a second feature includes the first feature being directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature. The terms "vertical," "horizontal," "left," "right," "above," "below," and similar expressions are for illustrative purposes only and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed or operated in a specific orientation, and therefore should not be construed as limiting the invention.

[0051] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0052] This invention provides a method for measuring the width of grey fabric, such as... Figure 1 As shown, it includes:

[0053] Step 100: Control the camera to move along the width of the fabric and take several images of the fabric.

[0054] Step 200: Perform image processing on each fabric image to generate a corresponding preprocessed image;

[0055] Step 300: Use MobileOne to identify each preprocessed image to obtain the corresponding fabric image category;

[0056] Step 400: Obtain the shooting coordinates corresponding to each fabric image;

[0057] Step 500: Calculate the fabric width based on the fabric image category and shooting coordinates corresponding to each fabric image.

[0058] In practical applications, a crossbeam spanning the loom is erected above it. A servo motor and camera module are mounted on the crossbeam. The servo motor drives the camera along the width direction, capturing images of the fabric during its movement, thus obtaining several images of the fabric. The captured area covers the entire fabric surface, including the selvage. However, due to significant differences in selvage texture caused by factors such as process, color, texture, and weave structure, and the complex background environment of the selvage on the loom, each fabric image needs to be processed to improve the accuracy of subsequent recognition. The MobileOne app is used to recognize each pre-processed image, which has a fast inference speed and recognition accuracy, accurately obtaining the recognition structure of each pre-processed image. During the camera shooting process, the physical coordinate information captured is also stored. Therefore, by recognizing the selvage area and combining it with the corresponding pre-processed image, the accurate fabric width can be calculated.

[0059] Furthermore, the controlled camera moves along the width direction of the fabric and captures several images of the fabric, including:

[0060] Set the distance between the camera and the fabric to the first preset distance;

[0061] Control the camera to move along the width of the fabric at a preset speed;

[0062] The camera is controlled to take pictures of the fabric at preset shooting intervals to obtain several images of the fabric.

[0063] In practical applications, a crossbeam is erected above the loom, spanning across the loom. The crossbeam is about 100cm above the fabric surface on the loom and about 200cm above the ground. The camera moves at a speed of 1cm / s and the preset shooting time is set to 1s. The width of a typical greige fabric is usually about 40cm, so more than 40 images of the greige fabric can be captured.

[0064] Optionally, the step of performing image processing on each fabric image to generate a corresponding preprocessed image includes:

[0065] Histogram equalization is performed on each raw fabric image to obtain the corresponding first processed image;

[0066] Pixel averaging is performed on each of the first processed images to obtain the corresponding second processed images;

[0067] Data standardization is performed on each of the second-processed images to obtain the corresponding preprocessed images.

[0068] In practical applications, images captured during camera movement are fed into the algorithm module in real time. The algorithm module uses OpenCV.equalizeHist to perform histogram equalization to ensure uniform light distribution in the images. It also calculates the pixel mean and sets it to 160 to reduce the impact of different lighting conditions on the images. The adjusted image data is then Z-SCORE standardized (mean [138, 138, 138] divided by standard deviation [0.104, 0.104, 0.104]) and used as model input.

[0069] Optionally, the step of using Mob il eOne to identify each preprocessed image to obtain the corresponding fabric image category includes:

[0070] The score for the area inside the fabric is pre-set as the first score, the score for the edge area is set as the second score, and the score for the area outside the fabric is set as the third score, where the first score is less than the second score, and the second score is less than the third score.

[0071] Mob il eOne was used to identify all regions in each preprocessed image, and the total score for each preprocessed image was calculated.

[0072] The corresponding fabric image category is determined based on the total score of each preprocessed image.

[0073] In practical applications, because the fabric edge detection model is a business with a very high repetition rate, the inference speed of the model is extremely important in this scenario. Therefore, we innovatively use the more advanced model Mobil eOne to improve inference efficiency. Mobil eOne, released by Apple Research, is positioned as a high-performance network for mobile devices. It is an improvement on Mobil NetV1, which reduces latency by controlling the number of repetitive parameter branches and using the ReLU activation function, achieving extreme performance on mobile devices. It achieves an inference speed of 2ms on the iPhone 12, and the inference speed on our machine running on the CPU is also around 3ms, with accuracy exceeding Mobil netV1. We modified the Mobil eOne model structure, setting the output channels of the last FC layer to 3. After softmax, the output image is assigned a category and score (between 0 and 1). The categories include: 0: inside the fabric, 1: fabric edge, 2: outside the fabric. The corresponding fabric image category can be obtained based on the total score of each image.

[0074] Furthermore, obtaining the shooting coordinates corresponding to each fabric image includes:

[0075] The origin of the coordinate system is the initial position of the camera, and the coordinate axes are the direction of camera movement.

[0076] The shooting coordinates of each fabric image are calculated based on the shooting timestamp, preset speed, and preset shooting time of each fabric image.

[0077] In practical applications, one end of the crossbeam is taken as the origin of the coordinate system, and the coordinate axis is established with the direction of the crossbeam. Since the camera is always moving on the crossbeam, the shooting coordinates corresponding to each fabric image can be obtained based on the camera's shooting timestamp, preset speed, and preset shooting time.

[0078] Further, the step of calculating the fabric width based on the fabric image category and shooting coordinates corresponding to each fabric image includes:

[0079] The two images of the fabric with the highest total score are used as the first edge fabric image and the second edge fabric image;

[0080] The shooting coordinates of the first edge fabric image are obtained as the first shooting coordinates;

[0081] The shooting coordinates of the second edge fabric image are obtained as the second shooting coordinates;

[0082] Set the pixel width of all fabric images to the image ratio of the actual width;

[0083] The width from the edge of the fabric to the outer area of ​​the fabric in the first edge fabric image is calculated based on the image ratio and used as the first width.

[0084] The width from the edge of the fabric to the outside of the fabric in the second edge fabric image is calculated based on the image ratio and used as the second width.

[0085] The fabric width is calculated based on the first shooting coordinates, the second shooting coordinates, the first width, and the second width.

[0086] In practical applications, the distance between the first and second shooting coordinates can be obtained using the first and second shooting coordinates, thus yielding the fabric width between the first and second edge fabric images. Since the distance between the camera and the fabric is fixed, the camera's image size can be converted into actual dimensions. Therefore, the width outside the fabric can be obtained by calculating the area from the fabric edge to the outside of the fabric in the first and second edge fabric images. Then, by adding the actual dimensions of the two image sizes to the fabric width between the first and second edge fabric images and subtracting the first and second widths corresponding to the fabric edge in the first and second edge fabric images, the fabric width can be obtained.

[0087] In practical applications, this solution is based on and improved upon the latest Mobil eOne model. It utilizes a fabric edge detection model library to calculate different fabric widths based on different fabrics, improving the accuracy of one-click width calculation. With lower hardware costs, it can accurately measure the width of the fabric, thereby improving production efficiency and promoting business development.

[0088] like Figure 2 As shown, the present invention also provides a fabric width measurement system, comprising:

[0089] Image capturing module 10 is used to control the camera to move along the width direction of the fabric and capture several images of the fabric.

[0090] Image processing module 20 is used to process each fabric image to generate a corresponding preprocessed image;

[0091] Image recognition module 30 is used to recognize each preprocessed image using MobileOne to obtain the corresponding fabric image category;

[0092] The coordinate acquisition module 40 is used to acquire the shooting coordinates corresponding to each fabric image;

[0093] The width calculation module 50 is used to calculate the width of the fabric based on the fabric image category and shooting coordinates corresponding to each fabric image.

[0094] Furthermore, the image capturing module includes:

[0095] The distance setting unit is used to set the distance between the camera and the fabric to a first preset distance;

[0096] The speed control unit is used to control the camera to move at a preset speed along the width of the fabric.

[0097] The shooting time control unit is used to control the camera to take pictures of the fabric at preset shooting intervals to obtain several images of the fabric.

[0098] For specific limitations regarding a fabric width measurement system, please refer to the limitations of a fabric width measurement method described above, which will not be repeated here. Each module in the aforementioned fabric width measurement system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0099] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 3As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. When the computer program is executed by the processor, it implements a method for measuring the width of a fabric.

[0100] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0101] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps: controlling a camera to move along the width direction of the fabric and taking several images of the fabric.

[0102] Image processing is performed on each fabric image to generate a corresponding preprocessed image;

[0103] Mob il eOne was used to identify each preprocessed image to obtain the corresponding fabric image category;

[0104] Obtain the shooting coordinates corresponding to each raw fabric image;

[0105] The fabric width is calculated based on the fabric image category and shooting coordinates corresponding to each fabric image.

[0106] In one embodiment, the control camera moves along the width direction of the fabric and captures several images of the fabric, including:

[0107] Set the distance between the camera and the fabric to the first preset distance;

[0108] Control the camera to move along the width of the fabric at a preset speed;

[0109] The camera is controlled to take pictures of the fabric at preset shooting intervals to obtain several images of the fabric.

[0110] In one embodiment, the step of image processing each fabric image to generate a corresponding preprocessed image includes:

[0111] Histogram equalization is performed on each raw fabric image to obtain the corresponding first processed image;

[0112] Pixel averaging is performed on each of the first processed images to obtain the corresponding second processed images;

[0113] Data standardization is performed on each of the second-processed images to obtain the corresponding preprocessed images.

[0114] In one embodiment, the step of using Mob il eOne to identify each preprocessed image to obtain the corresponding fabric image category includes:

[0115] The score for the area inside the fabric is pre-set as the first score, the score for the edge area is set as the second score, and the score for the area outside the fabric is set as the third score, where the first score is less than the second score, and the second score is less than the third score.

[0116] Mob il eOne was used to identify all regions in each preprocessed image, and the total score for each preprocessed image was calculated.

[0117] The corresponding fabric image category is determined based on the total score of each preprocessed image.

[0118] In one embodiment, obtaining the shooting coordinates corresponding to each fabric image includes:

[0119] The origin of the coordinate system is the initial position of the camera, and the coordinate axes are the direction of camera movement.

[0120] The shooting coordinates of each fabric image are calculated based on the shooting timestamp, preset speed, and preset shooting time of each fabric image.

[0121] In one embodiment, calculating the fabric width based on the fabric image category and shooting coordinates corresponding to each fabric image includes:

[0122] The two images of the fabric with the highest total score are used as the first edge fabric image and the second edge fabric image;

[0123] The shooting coordinates of the first edge fabric image are obtained as the first shooting coordinates;

[0124] The shooting coordinates of the second edge fabric image are obtained as the second shooting coordinates;

[0125] Set the pixel width of all fabric images to the image ratio of the actual width;

[0126] The width from the edge of the fabric to the outer area of ​​the fabric in the first edge fabric image is calculated based on the image ratio and used as the first width.

[0127] The width from the edge of the fabric to the outside of the fabric in the second edge fabric image is calculated based on the image ratio and used as the second width.

[0128] The fabric width is calculated based on the first shooting coordinates, the second shooting coordinates, the first width, and the second width.

[0129] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAM bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0130] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for measuring the width of grey fabric, characterized in that, include: Control the camera to move along the width of the fabric and take several images of the fabric; Image processing is performed on each fabric image to generate a corresponding preprocessed image; MobileOne was used to identify each preprocessed image to obtain the corresponding fabric image category; Obtain the shooting coordinates corresponding to each raw fabric image; The fabric width is calculated based on the fabric image category and shooting coordinates corresponding to each fabric image. The process of using MobileOne to identify each preprocessed image to obtain the corresponding fabric image category includes: The score for the area inside the fabric is pre-set as the first score, the score for the edge area is set as the second score, and the score for the area outside the fabric is set as the third score, where the first score is less than the second score, and the second score is less than the third score. MobileOne was used to identify all regions in each preprocessed image, and the total score for each preprocessed image was calculated. The corresponding fabric image category is determined based on the total score of each preprocessed image. The step of obtaining the shooting coordinates corresponding to each fabric image includes: The origin of the coordinate system is the initial position of the camera, and the coordinate axes are the direction of camera movement. The shooting coordinates of each fabric image are calculated based on the shooting timestamp, preset speed, and preset shooting time of each fabric image. The calculation of the fabric width based on the fabric image category and shooting coordinates corresponding to each fabric image includes: The two images of the fabric with the highest total score are used as the first edge fabric image and the second edge fabric image; The shooting coordinates of the first edge fabric image are obtained as the first shooting coordinates; The shooting coordinates of the second edge fabric image are obtained as the second shooting coordinates; Set the pixel width of all fabric images to the image ratio of the actual width; The width from the edge of the fabric to the outer area of ​​the fabric in the first edge fabric image is calculated based on the image ratio and used as the first width. The width from the edge of the fabric to the outside of the fabric in the second edge fabric image is calculated based on the image ratio and used as the second width. The fabric width is calculated based on the first shooting coordinates, the second shooting coordinates, the first width, and the second width.

2. The method according to claim 1, characterized in that, The control camera moves along the width of the fabric and captures several images of the fabric, including: Set the distance between the camera and the fabric to the first preset distance; Control the camera to move along the width of the fabric at a preset speed; The camera is controlled to take pictures of the fabric at preset shooting intervals to obtain several images of the fabric.

3. The method according to claim 1, characterized in that, The step of image processing for each fabric image to generate a corresponding preprocessed image includes: Histogram equalization is performed on each raw fabric image to obtain the corresponding first processed image; Pixel averaging is performed on each of the first processed images to obtain the corresponding second processed images; Data standardization is performed on each of the second-processed images to obtain the corresponding preprocessed images.

4. A system for measuring the width of grey fabric, characterized in that, include: The image capturing module is used to control the camera to move along the width of the fabric and capture several images of the fabric. The image processing module is used to process the images of each fabric and generate corresponding preprocessed images. The image recognition module is used to identify each preprocessed image using MobileOne to obtain the corresponding fabric image category; It includes: pre-setting the score of the area inside the fabric as the first score, the score of the edge area as the second score, and the score of the area outside the fabric as the third score, wherein the first score is less than the second score, and the second score is less than the third score; using MobileOne to identify all areas in each pre-processed image and calculating the total score corresponding to each pre-processed image; and determining the corresponding fabric image category based on the total score corresponding to each pre-processed image. The coordinate acquisition module is used to acquire the shooting coordinates corresponding to each fabric image; it includes: taking the initial position of the camera as the coordinate origin and the direction of camera movement as the coordinate axis; calculating the shooting coordinates corresponding to each fabric image based on the shooting timestamp, preset speed and preset shooting time of each fabric image; The width calculation module is used to calculate the fabric width of the greige fabric based on the greige fabric image category and shooting coordinates corresponding to each greige fabric image. It includes: using the two greige fabric images with the highest total scores as the first edge greige fabric image and the second edge greige fabric image; obtaining the shooting coordinates of the first edge greige fabric image as the first shooting coordinates; obtaining the shooting coordinates of the second edge greige fabric image as the second shooting coordinates; setting the image ratio of the pixel width to the actual width of all greige fabric images; calculating the width from the fabric edge to the outside area of ​​the fabric in the first edge greige fabric image as the first width based on the image ratio; calculating the width from the fabric edge to the outside area of ​​the fabric in the second edge greige fabric image as the second width based on the image ratio; and calculating the fabric width of the greige fabric based on the first shooting coordinates, the second shooting coordinates, the first width, and the second width.

5. The system according to claim 4, characterized in that, The image capturing module includes: The distance setting unit is used to set the distance between the camera and the fabric to a first preset distance; The speed control unit is used to control the camera to move at a preset speed along the width of the fabric. The shooting time control unit is used to control the camera to take pictures of the fabric at preset shooting intervals to obtain several images of the fabric.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Cloth breadth determination method and device, electronic equipment and readable storage medium

    CN113758426A

  • Cloth breadth measuring device

    CN216132401U