Cone yarn length measuring method and device, computer equipment, readable storage medium and program product

By acquiring red, green, and blue images of the yarn bobbin using a vision camera and identifying corner points, the yarn bobbin length can be calculated, solving the problem of time-consuming and labor-intensive traditional manual measurement and realizing automated and accurate yarn bobbin length measurement.

CN120912657APending Publication Date: 2025-11-07GUANGDONG KUANGDUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510835486.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Traditional methods for measuring yarn length rely on manual operation, which is time-consuming, labor-intensive, and easily affected by human factors, leading to inaccurate measurement results.

Method used

A visual camera is used to acquire red, green and blue images of the yarn bobbin. The top and bottom corners of the yarn bobbin are identified by a regional heat map. The pixel distance is calculated by combining the target yarn bobbin corner template to obtain the yarn bobbin length.

Benefits of technology

It achieves automated measurement, reduces labor costs, improves measurement accuracy and calculation efficiency, and reduces human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912657A_ABST
    Figure CN120912657A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of spinning measurement, and provides a cone yarn length measuring method and device, computer equipment, a readable storage medium and a program product. The method comprises the steps that when cone yarn stands still or rotates on a yarn machine table, a red-green-blue image of the cone yarn is obtained according to a visual camera installed on the yarn machine table; the center of the visual camera is located at a set height above the cone yarn; according to the red-green-blue image, a cone yarn area image is obtained, and an area thermodynamic diagram corresponding to the cone yarn area image is obtained; taking the positions with the lowest numerical values at the upper and lower ends in the regional thermodynamic diagram as the positions of the upper and lower angular points of the cone yarn; performing offset calculation according to the positions of the upper and lower angular points of the cone yarn and the positions of the upper and lower angular points in the target cone yarn angular point template to obtain a pixel distance between the upper and lower angular points of the cone yarn; and obtaining the diameter of the small end of the cone yarn according to the pixel distance between the upper and lower angular points of the cone yarn so as to obtain the length of the cone yarn. The method can reduce the labor cost and improve the measurement precision.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of textile metrology, and in particular to a cheese length measurement method and device, computer equipment, computer readable storage medium and computer program product. BACKGROUND

[0002] In the textile industry, cheese is a basic raw material for textile production, and accurate measurement of cheese length has a direct impact on production efficiency and product quality.

[0003] Traditional cheese length measurement methods rely on manual operation, which is not only time-consuming and labor-intensive, but also susceptible to human factors, affecting the measurement results of cheese length. SUMMARY

[0004] Therefore, it is necessary to provide a cheese length measurement method, device, computer equipment, computer readable storage medium and computer program product to solve the above technical problems.

[0005] In a first aspect, the present application provides a cheese length measurement method, comprising:

[0006] When the cheese is stationary or rotating on the yarn machine table, a red-green-blue image of the cheese is obtained according to a vision camera installed on the yarn machine table; the center of the vision camera is located at a set height above the cheese;

[0007] According to the red-green-blue image, a cheese region image is obtained to obtain a region heat map corresponding to the cheese region image;

[0008] The positions of the upper and lower corners of the cheese are taken as the positions of the upper and lower corners of the region heat map;

[0009] According to the positions of the upper and lower corners of the cheese and the positions of the upper and lower corners in the target cheese corner point template, an offset amount is calculated to obtain the pixel distance between the upper and lower corners of the cheese;

[0010] According to the pixel distance between the upper and lower corners of the cheese, the diameter of the small end of the cheese is obtained to obtain the length of the cheese.

[0011] In one embodiment, the cheese region image is obtained according to the red-green-blue image, comprising:

[0012] According to the pixel value of each pixel point of the red-green-blue image, the red-green-blue image is subjected to three-channel threshold filtering to obtain an initial cheese region image;

[0013] The initial cheese region image is subjected to segmentation operation to obtain a cheese region image when the cheese region is maximum.

[0014] In one embodiment, the method further comprises:

[0015] obtaining a three-channel average pixel value of the pixel points in the cone yarn region obtained through multiple tests;

[0016] when the pixel value of the pixel point in the red-green-blue image is greater than or equal to the three-channel average pixel value, determining the marking value of the pixel point as a first marking value;

[0017] when the pixel value of the pixel point in the red-green-blue image is less than the three-channel average pixel value, determining the marking value of the pixel point as a second marking value;

[0018] obtaining an initial cone yarn region image according to the pixel points with the first marking value.

[0019] In one embodiment, the method further comprises:

[0020] optionally selecting a cone yarn region image as a target cone yarn region image;

[0021] cropping the upper and lower corner points in the top view of the small end of the cone yarn in the target cone yarn region image to obtain a target cone yarn corner point template.

[0022] In one embodiment, the method further comprises:

[0023] obtaining an actual distance between the upper and lower corner points of the cone yarn according to the pixel distance between the upper and lower corner points of the cone yarn and the relationship between the pixel distance and the actual distance;

[0024] taking the actual distance between the upper and lower corner points of the cone yarn as the diameter of the small end of the cone yarn.

[0025] In one embodiment, the method further comprises:

[0026] obtaining a volume of the cone yarn according to the diameter of the small end of the cone yarn;

[0027] obtaining a weight of the cone yarn according to the density coefficient of the cone yarn and the volume of the cone yarn;

[0028] obtaining a length of the cone yarn according to the thickness and the number of the cone yarn and the weight of the cone yarn.

[0029] In a second aspect, the application also provides a cone yarn length measuring device, comprising:

[0030] An RGB image acquisition module is configured to obtain an RGB image of the cone yarn according to a visual camera installed on the yarn machine when the cone yarn is at rest or rotating on the yarn machine, and a center of the visual camera is located at a set fixed height above the cone yarn.

[0031] A regional heat map acquisition module is configured to obtain a cone yarn region image according to the RGB image, so as to obtain a regional heat map corresponding to the cone yarn region image.

[0032] A cone yarn corner point position determination module is configured to determine positions of two corners at the top and bottom of the cone yarn as positions of two corners at the top and bottom of the cone yarn in the regional heat map.

[0033] A pixel distance acquisition module is configured to calculate an offset according to the positions of the two corners at the top and bottom of the cone yarn and positions of two corners at the top and bottom of a target cone yarn corner point template, so as to obtain a pixel distance between the two corners at the top and bottom of the cone yarn.

[0034] A cone yarn length acquisition module is configured to obtain a diameter of a small end of the cone yarn according to the pixel distance between the two corners at the top and bottom of the cone yarn, so as to obtain a length of the cone yarn.

[0035] In a third aspect, a computer device is provided. The computer device includes a memory and a processor. The memory stores a computer program. The processor executes the method described above.

[0036] In a fourth aspect, a computer readable storage medium is provided. The computer readable storage medium stores a computer program. The computer program is executed by a processor to perform the method described above.

[0037] In a fifth aspect, a computer program product is provided. The computer program product includes a computer program. The computer program is executed by a processor to perform the method described above.

[0038] The aforementioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for measuring yarn bobbin length, when the yarn bobbin is stationary or rotating on a yarn machine, obtains a red-green-blue image of the yarn bobbin based on a vision camera installed on the yarn machine; the center of the vision camera is located at a set height above the yarn bobbin; based on the red-green-blue image, an image of the yarn bobbin region is obtained, resulting in a region heat map corresponding to the yarn bobbin region image; the positions with the lowest values ​​at the top and bottom of the region heat map are taken as the positions of the top and bottom corner points of the yarn bobbin; based on the positions of the top and bottom corner points of the yarn bobbin and the positions of the top and bottom corner points in the target yarn bobbin corner point template, an offset calculation is performed to obtain the pixel distance between the top and bottom corner points of the yarn bobbin; based on the pixel distance between the top and bottom corner points of the yarn bobbin, the diameter of the small end of the yarn bobbin is obtained, thus obtaining the yarn bobbin length. This application uses the positions with the lowest values ​​at the top and bottom of the region heat map as the positions of the top and bottom corner points of the yarn bobbin; based on the positions of the top and bottom corner points of the yarn bobbin and the positions of the top and bottom corner points in the target yarn bobbin corner point template, an offset calculation is performed to obtain the pixel distance between the top and bottom corner points of the yarn bobbin, thus obtaining the yarn bobbin length. It can replace manual measurement of yarn bobbin length without human intervention, thus reducing labor costs. In addition, based on the target yarn bobbin corner template, it can accurately identify the upper and lower corners of the yarn bobbin, resulting in high calculation efficiency, low error rate, and improved measurement accuracy. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is an application environment diagram of the yarn bobbin length measurement method in one embodiment;

[0041] Figure 2 This is a flowchart illustrating a method for measuring the length of yarn bobbin in one embodiment;

[0042] Figure 3 This is a schematic diagram of the installation location of the vision camera in one embodiment;

[0043] Figure 4 This is a structural block diagram of a bobbin length measuring device in one embodiment;

[0044] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0045] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0046] The bobbin length measurement method provided by the embodiments of the present application can be applied to the application environment as shown in Figure 1 The terminal 102 communicates with the server 104 through a network. The data storage system can store data required to be processed by the server 104. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The terminal 102 obtains the red-green-blue image of the bobbin when the bobbin is stationary or rotating on the yarn machine table to obtain the length of the bobbin. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner, a smart vehicle device, a projection device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0047] In an exemplary embodiment, as shown in Figure 2 A bobbin length measurement method is provided. Taking the terminal 102 in Figure 1 as an example, the method includes the following steps S201 to S205. Wherein:

[0048] In step S201, when the bobbin is stationary or rotating on the yarn machine table, a red-green-blue image of the bobbin is obtained according to a vision camera installed on the yarn machine table; the center of the vision camera is located at a set height above the bobbin.

[0049] A schematic diagram of the installation position of the vision camera is shown in Figure 3As shown, a vision camera can be fixedly mounted on the yarn machine at a set height, with its center located at the set height above the yarn bobbin. The main principle for the vision camera's installation position is that the small end of the yarn bobbin can be completely displayed in the frame. The vision camera can be based on visible light, structured light, or Time of Flight (TOF) technology. An additional depth camera can be calibrated to a visible light camera for more accurate actual distance measurement. Furthermore, the vision camera can be a movable type, allowing a single vision camera to move and capture images to measure the length of yarn bobbins on multiple yarn machines. When the yarn bobbin (also called yarn) is stationary or rotating on the yarn machine, the computer equipment can trigger the vision camera mounted on the yarn machine to capture red, green, and blue images of the yarn bobbin. After capturing these images, the computer equipment can retrieve the images from the vision camera. The red, green, and blue image of the yarn package can also be called the RGB (Red, Green, Blue) image.

[0050] Red, green and blue images of yarn tubes The image data is represented as shown in equation (1).

[0051] (1)

[0052] In the formula, Represents a red-green-blue image. This represents the pixel value at position x and y in the red-green-blue image. x represents the x-coordinate of the pixel in the red-green-blue image, and y represents the y-coordinate. The origin of the red-green-blue image is the top-left corner. R represents the red channel, G represents the green channel, and B represents the blue channel.

[0053] Step S202: Based on the red-green-blue image, obtain the yarn package area image to obtain the corresponding area heat map.

[0054] Three-channel threshold filtering and segmentation operations can be performed on red, green and blue images to obtain the yarn package region image.

[0055] The heat map of the area corresponding to the yarn bobbin region image can be obtained by using the sliding window technique, as shown in equation (2).

[0056] (2)

[0057] In the formula, R represents the regional heat map. This represents the target yarn bobbin corner template, also known as the template image. I represents the yarn bobbin area image. This represents the x-coordinate of a pixel in the target yarn corner template. x represents the horizontal coordinate of a pixel point in the target bobbin corner point template, x represents the horizontal coordinate of a pixel point in the bobbin region image, and y represents the vertical coordinate of a pixel point in the bobbin region image.

[0058] In step S203, the positions of the upper and lower ends of the region heat map with the lowest values are taken as the positions of the upper and lower corners of the bobbin.

[0059] The position of the upper end of the region heat map with the lowest value can be taken as the position of the upper corner of the bobbin, and the position of the lower end of the region heat map with the lowest value can be taken as the position of the lower corner of the bobbin.

[0060] In step S204, the offset amount is calculated according to the positions of the upper and lower corners of the bobbin and the positions of the upper and lower corners in the target bobbin corner point template, and the pixel distance between the upper and lower corners of the bobbin is obtained.

[0061] The offset amount is calculated according to the difference between the position of the upper corner of the bobbin and the position of the upper corner in the target bobbin corner point template, and the accurate position of the upper corner of the bobbin is obtained; the offset amount is calculated according to the difference between the position of the lower corner of the bobbin and the position of the lower corner in the target bobbin corner point template, and the accurate position of the lower corner of the bobbin is obtained.

[0062] The pixel distance between the upper and lower corners of the bobbin is obtained according to the distance between the accurate position of the upper corner of the bobbin and the position of the lower corner of the bobbin.

[0063] In step S205, the diameter of the small end of the bobbin is obtained according to the pixel distance between the upper and lower corners of the bobbin, so as to obtain the length of the bobbin.

[0064] The diameter of the small end of the bobbin is obtained according to the pixel distance between the upper and lower corners of the bobbin and the relationship between the pixel distance and the actual distance.

[0065] The length of the bobbin can be obtained according to the diameter of the small end of the bobbin and the size information of the bobbin itself.

[0066] In the above bobbin length measurement method, the positions of the upper and lower ends of the region heat map with the lowest values are taken as the positions of the upper and lower corners of the bobbin; the offset amount is calculated according to the positions of the upper and lower corners of the bobbin and the positions of the upper and lower corners in the target bobbin corner point template, and the pixel distance between the upper and lower corners of the bobbin is obtained, so as to obtain the length of the bobbin. The length of the bobbin can be measured automatically instead of manually, and no manual intervention is required during the measurement of the length of the bobbin, which can reduce the labor cost. In addition, according to the target bobbin corner point template, the upper and lower corners of the bobbin can be accurately identified, the calculation efficiency is high, the error rate is low, and the measurement accuracy can be improved.

[0067] In one of the embodiments, according to the red-green-blue image, the cheese region image is obtained, and the specific steps are as follows: according to the pixel value of each pixel point of the red-green-blue image, the red-green-blue image is subjected to three-channel threshold filtering to obtain an initial cheese region image; the initial cheese region image is subjected to segmentation operation to obtain the cheese region image at the maximum cheese region.

[0068] According to the pixel value of each pixel point of the red-green-blue image and the three-channel average pixel value of the pixel point of the cheese region, the red-green-blue image is subjected to three-channel threshold filtering to obtain an initial cheese region image .

[0069] The initial cheese region image can be subjected to morphological opening operation to remove the noise points in the initial cheese region image; the initial cheese region image after the morphological opening operation can be subjected to segmentation operation, and the mask image at the maximum cheese region after the segmentation operation is taken as the cheese region image, as shown in formula (3).

[0070] (3)

[0071] In the formula, I represents the mask image after the segmentation operation, represents the red-green-blue image, and represents the initial cheese region image after the morphological opening operation.

[0072] In the embodiment, according to the pixel value of each pixel point of the red-green-blue image, the red-green-blue image is subjected to three-channel threshold filtering to obtain an initial cheese region image; the initial cheese region image is subjected to segmentation operation to obtain the cheese region image at the maximum cheese region, and the cheese region in the red-green-blue image can be extracted to reduce the calculation amount.

[0073] In one of the embodiments, according to the pixel value of each pixel point of the red-green-blue image, the red-green-blue image is subjected to three-channel threshold filtering to obtain an initial cheese region image, and the specific steps are as follows: the three-channel average pixel value of the pixel point of the cheese region obtained through multiple tests is acquired; when the pixel value of the pixel point in the red-green-blue image is greater than or equal to the three-channel average pixel value, the marking value of the pixel point is determined as a first marking value; when the pixel value of the pixel point in the red-green-blue image is less than the three-channel average pixel value, the marking value of the pixel point is determined as a second marking value; according to the pixel point with the first marking value, the initial cheese region image is obtained.

[0074] The three-channel average pixel value (r, g, b) of the pixel point of the cheese region obtained through multiple tests can be acquired.

[0075] When the pixel value of the pixel point in the red-green-blue image is greater than or equal to the three-channel average pixel value, the marking value of the pixel point is determined as the first marking value; when the pixel value of the pixel point in the red-green-blue image is less than the three-channel average pixel value, the marking value of the pixel point is determined as the second marking value; the initial cone yarn region image is obtained according to the pixel point with the first marking value, as shown in formula (4). The first marking value can be set as 1, and the second marking value can be set as 0.

[0076] (4)

[0077] In the formula, denotes the red-green-blue image, denotes the initial cone yarn region image filtered by the threshold value, and (r, g, b) denotes the three-channel average pixel value of the pixel point of the cone yarn region obtained through multiple tests.

[0078] In the embodiment, the initial cone yarn region image is obtained according to the size relationship between the pixel value of the pixel point in the red-green-blue image and the three-channel average pixel value, the specific color region in the red-green-blue image can be extracted, the content of the red-green-blue image is simplified, the interference of the image background on the corner point detection is effectively reduced, and the calculation efficiency is improved.

[0079] In one of the embodiments, before the offset amount is calculated according to the positions of the upper and lower corner points of the cone yarn and the positions of the upper and lower corner points in the target cone yarn corner point template, and the pixel distance between the upper and lower corner points of the cone yarn is obtained, the method provided in the application further includes: optionally selecting a cone yarn region image as a target cone yarn region image; and cutting the upper and lower corner points in the top view of the small end of the cone yarn in the target cone yarn region image to obtain a target cone yarn corner point template.

[0080] In the actual process of the cone yarn length measurement, a cone yarn region image can be optionally selected as a target cone yarn region image; the upper and lower corner points in the top view of the small end of the cone yarn in the target cone yarn region image can be cut to obtain a target cone yarn corner point template T.

[0081] In the embodiment, the target cone yarn corner point template is obtained according to any cone yarn region image, so that the cone yarn corner point can be accurately identified.

[0082] In one of the embodiments, the diameter of the small end of the cone yarn is obtained according to the pixel distance between the upper and lower corner points of the cone yarn, and the specific steps are as follows: the actual distance between the upper and lower corner points of the cone yarn is obtained according to the pixel distance between the upper and lower corner points of the cone yarn and the relationship between the pixel distance and the actual distance; and the actual distance between the upper and lower corner points of the cone yarn is taken as the diameter of the small end of the cone yarn.

[0083] The visual camera can be calibrated, and the image obtained by the visual camera can be converted to a world coordinate system. Specifically, the relationship between the pixel distance and the actual distance can be obtained by measuring the relationship between the pixel distance and the actual distance in the image obtained by the visual camera multiple times, and the relationship f(x) between the pixel distance and the actual distance can be obtained.

[0084] The actual distance between the upper and lower corner points of the cone yarn can be obtained according to the pixel distance between the upper and lower corner points of the cone yarn and the relationship f(x) between the pixel distance and the actual distance.

[0085] The actual distance between the upper and lower corner points of the cone yarn can be taken as the diameter of the small end of the cone yarn. .

[0086] In this embodiment, the actual distance between the upper and lower corner points of the cone yarn is obtained according to the pixel distance between the upper and lower corner points of the cone yarn and the relationship between the pixel distance and the actual distance, and the diameter of the small end of the cone yarn is taken as the diameter of the small end of the cone yarn. The diameter of the small end of the cone yarn can be quickly and accurately obtained.

[0087] In one embodiment, the length of the cone yarn is obtained, and the specific steps are as follows: the volume of the cone yarn is obtained according to the diameter of the small end of the cone yarn; the weight of the cone yarn is obtained according to the density coefficient of the cone yarn and the volume of the cone yarn; and the length of the cone yarn is obtained according to the thickness count of the cone yarn and the weight of the cone yarn.

[0088] The volume of the cone yarn can be calculated according to the diameter of the small end of the cone yarn and the size information of the cone yarn itself by formula (5) and related experimental parameters.

[0089] (5)

[0090] In the formula, V represents the volume of the cone yarn, H represents the width of the cone yarn, D represents the diameter of the small end of the cone yarn, D represents the diameter of the large end of the cone yarn, D represents the diameter of the small end of the bobbin, D represents the diameter of the large end of the bobbin.

[0091] The density coefficient of the cone yarn can be obtained by experiment. The weight of the cone yarn can be obtained according to the density coefficient of the cone yarn and the volume of the cone yarn, as shown in formula (6).

[0092] (6)

[0093] In the formula, M represents the weight of the cone yarn, D represents the density coefficient of the cone yarn, and V represents the volume of the cone yarn.

[0094] The length of the cone yarn can be obtained according to the thickness count of the cone yarn and the weight of the cone yarn, as shown in formula (7).

[0095] (7)

[0096] wherein, represents the length of the cheese, M represents the weight of the cheese, represents the thickness of the cheese.

[0097] In this embodiment, the diameter of the small end of the cheese is used to obtain the volume of the cheese, so as to obtain a more accurate length of the cheese.

[0098] In order to better understand the above method, an application example of the cheese length measurement method of the present application is described in detail below.

[0099] With the development of industrial automation and intelligent manufacturing, machine vision technology has become an important tool in modern production processes. In the textile industry, the accurate measurement of the quality and related parameters of cheese has a direct impact on production efficiency and product quality. Traditional cheese length measurement methods rely heavily on manual operation, which not only consumes time and effort, but also is easily affected by human factors, resulting in insufficient accuracy and inconsistent measurement results. Therefore, there is an urgent need for an efficient and accurate cheese length measurement method to meet the high requirements of the textile industry for product quality and production efficiency.

[0100] Machine vision technology can automatically capture and analyze cheese images by using cameras and image processing software, enabling real-time and accurate measurement of various parameters of cheese. This technology not only improves measurement efficiency, but also reduces errors caused by human factors. Through image processing algorithms, the appearance characteristics of cheese can be extracted to calculate the actual length, volume, and weight of cheese and other parameters.

[0101] Under the background of automation and intelligentization of the textile industry, the potential of machine vision technology in cheese measurement has attracted widespread attention. By developing an efficient machine vision measurement system, not only can the production efficiency of enterprises be improved and labor costs be reduced, but also the measurement accuracy can be improved. The development of this technology will bring profound changes to the traditional textile industry and promote the industry towards intelligentization and informatization.

[0102] Currently, there are also devices for automatically measuring the length of cheese, but there is no automated system for measuring cheese using machine vision. In view of this, the present embodiment provides a cheese length measurement method based on machine vision, comprising the following steps:

[0103] S1, the visual camera can be fixedly installed at the yarn machine according to a set height, wherein the center of the visual camera is located at the set height above the cheese, and the main criterion for the installation position of the visual camera is that the small end of the cheese can be completely displayed in the picture. The visual camera can be a camera based on visible light, structured light or time of flight (TOF) technology, and an additional depth camera can be used to calibrate the visible light camera to achieve more accurate actual distance measurement. In addition, the visual camera can be a movable camera, and a single visual camera can be used to move and shoot to complete the length measurement of the cheese of multiple yarn machines.

[0104] The relationship f(x) between the pixel distance and the actual distance can be obtained by measuring the relationship between the pixel distance and the actual distance in the image obtained by the visual camera multiple times.

[0105] S2, when the cheese (winding yarn) is stationary or rotating on the yarn machine, the computer device can trigger the visual camera installed on the yarn machine to shoot the red green blue image of the cheese, and the computer device can obtain the red green blue image of the cheese from the visual camera . The red green blue image of the cheese can also be referred to as an RGB (Red Green Blue) image.

[0106] The image data of the red green blue image of the cheese is represented as formula (1).

[0107] (1)

[0108] In the formula, represents the red green blue image, represents the pixel value of the pixel point at the x, y position in the red green blue image, x represents the horizontal coordinate of the pixel point in the red green blue image, y represents the vertical coordinate of the pixel point in the red green blue image, and the upper left corner of the red green blue image is the coordinate origin. R represents the red channel in the red green blue image, G represents the green channel in the red green blue image, and B represents the blue channel in the red green blue image.

[0109] S3, the red green blue image is subjected to three-channel threshold filtering to obtain an initial cheese region image. Specifically, the three-channel average pixel value of the pixel point of the cheese region obtained through multiple tests is obtained; when the pixel value of the pixel point in the red green blue image is greater than or equal to the three-channel average pixel value, the marking value of the pixel point is determined as a first marking value; when the pixel value of the pixel point in the red green blue image is less than the three-channel average pixel value, the marking value of the pixel point is determined as a second marking value; and the initial cheese region image is obtained according to the pixel point with the first marking value, as shown in formula (4).

[0110] (4)

[0111] In the formula, represents a red-green-blue image, represents a threshold filtered initial cheese region image, (r, g, b) represents the three-channel average pixel values of the pixel points of the cheese region obtained through multiple tests. The first mark value can be set to 1, and the second mark value can be set to 0. The calculation of formula (4) can effectively reduce the interference of the image background on the corner point detection and improve the calculation efficiency.

[0112] The initial cheese region image can be subjected to a morphological opening operation to remove noise points in the initial cheese region image. The initial cheese region image after the morphological opening operation can be subjected to a segmentation operation, and the mask image at the maximum cheese region after the segmentation operation can be used as the cheese region image, as shown in formula (3).

[0113] (3)

[0114] In the formula, I represents the mask image after the segmentation operation, represents a red-green-blue image, represents the initial cheese region image after the morphological opening operation.

[0115] S4, optionally, a cheese region image is used as a target cheese region image; the upper and lower corner points in the top view of the small end of the cheese in the target cheese region image are cropped to obtain a target cheese corner point template T, which can be used for cheese corner point recognition of other collected red-green-blue images.

[0116] According to the sliding window technology, a region heat map corresponding to the cheese region image can be obtained, as shown in formula (2).

[0117] (2)

[0118] In the formula, R represents a region heat map, represents a target cheese corner point template, which can also be referred to as a template image, I represents a cheese region image, represents the horizontal coordinate of a pixel point in the target cheese corner point template, represents the horizontal coordinate of a pixel point in the target cheese corner point template, x represents the horizontal coordinate of a pixel point in the cheese region image, and y represents the vertical coordinate of a pixel point in the cheese region image.

[0119] The positions of the upper and lower ends with the lowest values in the region heat map are used as the positions of the upper and lower corner points of the cheese.

[0120] S5, according to the positions of the upper and lower corner points of the cheese and the positions of the upper and lower corner points in the target cheese corner point template, the offset amount is calculated to obtain the pixel distance between the upper and lower corner points of the cheese. According to the pixel distance between the upper and lower corner points of the cheese and the relationship f(x) between the pixel distance and the actual distance, the actual distance between the upper and lower corner points of the cheese is obtained; the actual distance between the upper and lower corner points of the cheese is taken as the diameter of the small end of the cheese .

[0121] S6, according to the diameter of the small end of the cheese , and the size information of the cheese itself, the volume of the cheese is calculated by formula (5) and related experimental parameters.

[0122] (5)

[0123] In the formula, V represents the volume of the cheese, H represents the width of the cheese, D represents the diameter of the small end of the cheese, D represents the diameter of the large end of the cheese, D represents the diameter of the small end of the cheese tube, and D represents the diameter of the large end of the cheese tube. D represents the diameter of the small end of the cheese tube, and D represents the diameter of the large end of the cheese tube.

[0124] The cheese density coefficient can be obtained through experiments. The weight of the cheese can be obtained according to the cheese density coefficient and the volume of the cheese, as shown in formula (6).

[0125] (6)

[0126] In the formula, M represents the weight of the cheese, V represents the volume of the cheese.

[0127] The length of the cheese can be obtained according to the thickness and fineness of the cheese and the weight of the cheese, as shown in formula (7).

[0128] (7)

[0129] In the formula, M represents the weight of the cheese, D represents the diameter of the small end of the cheese.

[0130] The technical scheme provided by the embodiment has the following beneficial effects:

[0131] (1) The length of the cheese can be replaced by manual statistics, and manual intervention is not required in the measurement process of the length of the cheese, thereby reducing manual labor and labor cost;

[0132] (2) According to the edge and corner regular characteristics of the cheese, the template matching algorithm is used to identify the upper and lower corner points of the cheese, the calculation efficiency is high, the calculation resources can be saved, the factory operation efficiency can be improved, the error rate is low, and the measurement accuracy can be effectively improved;

[0133] (3) Can be applied to different types of package measurement, equipment structure, simple configuration, in line with the needs of medium and large textile industry.

[0134] It should be understood that, although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order limitation for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least some of the other steps or steps or stages in other steps.

[0135] Based on the same inventive concept, the embodiments of the present application also provide a cheese length measurement device for implementing the above-mentioned cheese length measurement method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more cheese length measurement device embodiments provided below can refer to the limitations of the cheese length measurement method in the above text, and will not be repeated here.

[0136] In one exemplary embodiment, as shown in Figure 4 A cheese length measurement device is provided, wherein:

[0137] The red-green-blue image acquisition module 401 is configured to obtain a red-green-blue image of the cheese according to a vision camera installed on the yarn machine table when the cheese is stationary or rotating on the yarn machine table, and the center of the vision camera is located at a set fixed height above the cheese.

[0138] The regional heat map acquisition module 402 is configured to obtain a cheese region image according to the red-green-blue image, so as to obtain a regional heat map corresponding to the cheese region image.

[0139] The cheese corner point position determination module 403 is configured to determine the positions of the upper and lower corners of the cheese as the positions of the two ends with the lowest values in the regional heat map.

[0140] The pixel distance acquisition module 404 is configured to calculate the offset according to the positions of the upper and lower corners of the cheese and the positions of the upper and lower corners in the target cheese corner point template, and obtain the pixel distance between the upper and lower corners of the cheese.

[0141] The bobbin length obtaining module 405 is configured to obtain the diameter of the small end of the bobbin according to the pixel distance between the upper and lower corner points of the bobbin, and obtain the length of the bobbin.

[0142] In one of the embodiments, the regional heat map obtaining module 402 is further configured to: perform three-channel threshold filtering on the red-green-blue image according to the pixel values of the pixel points of the red-green-blue image, to obtain an initial bobbin region image; and perform segmentation operation on the initial bobbin region image, to obtain a bobbin region image in which the bobbin region is maximum.

[0143] In one of the embodiments, the regional heat map obtaining module 402 is further configured to: obtain the three-channel average pixel values of the pixel points of the bobbin region obtained through multiple tests; determine the marking value of a pixel point in the red-green-blue image as a first marking value when the pixel value of the pixel point is greater than or equal to the three-channel average pixel value; determine the marking value of the pixel point in the red-green-blue image as a second marking value when the pixel value of the pixel point is less than the three-channel average pixel value; and obtain an initial bobbin region image according to the pixel points with the first marking value.

[0144] In one of the embodiments, the device further comprises a target bobbin corner point template obtaining module configured to: optionally select a bobbin region image as a target bobbin region image; and crop the upper and lower corner points in the top view of the small end of the bobbin in the target bobbin region image, to obtain a target bobbin corner point template.

[0145] In one of the embodiments, the bobbin length obtaining module 405 is further configured to: obtain the actual distance between the upper and lower corner points of the bobbin according to the pixel distance between the upper and lower corner points of the bobbin and the relationship between the pixel distance and the actual distance; and take the actual distance between the upper and lower corner points of the bobbin as the diameter of the small end of the bobbin.

[0146] In one of the embodiments, the bobbin length obtaining module 405 is further configured to: obtain the volume of the bobbin according to the diameter of the small end of the bobbin; obtain the weight of the bobbin according to the bobbin density coefficient and the volume of the bobbin; and obtain the length of the bobbin according to the thickness and the number of the bobbin and the weight of the bobbin.

[0147] The above-mentioned various modules in the bobbin length measuring device can be realized by software, hardware, or a combination thereof, in whole or in part. The above-mentioned various modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so as to be called and executed by the processor to perform the operations corresponding to the above-mentioned various modules.

[0148] In one of the embodiments, a computer device is provided, which can be a server, and the internal structure diagram of the computer device can be as shown in Figure 5As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capability. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data of the embodiment of the cheese length measurement method. The input / output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used to communicate with the terminal outside through the network connection. The computer program is executed by the processor to realize a cheese length measurement method.

[0149] Those skilled in the art can understand that, Figure 5 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0150] In one embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to realize the steps in the above method embodiments.

[0151] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to realize the steps in the above method embodiments.

[0152] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to realize the steps in the above method embodiments.

[0153] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant regulations.

[0154] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiment methods. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., without being limited thereto.

[0155] The technical features of the above embodiments can be combined in any manner. To make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combinations of the technical features do not exist contradictions, they should be considered as the scope of the present application.

[0156] The above-described embodiments are merely illustrative of several embodiments of the present application, and the description is relatively specific and detailed, but should not be understood as a limitation on the scope of the patent. It should be noted that for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.

Claims

1. A method of measuring the length of a cone, characterized in that, The method comprises: When the cone yarn is at rest or rotating on the yarn machine table, a red-green-blue image of the cone yarn is obtained according to a visual camera installed on the yarn machine table, and the center of the visual camera is located at a set height above the cone yarn; According to the red-green-blue image, a cone yarn region image is obtained to obtain a region heat map corresponding to the cone yarn region image; The positions of the upper and lower two corners of the cone yarn are taken as the positions of the upper and lower two corner points in the region heat map; According to the positions of the upper and lower two corner points of the cone yarn and the positions of the upper and lower two corner points in the target cone yarn corner point template, an offset amount is calculated to obtain the pixel distance between the upper and lower two corner points of the cone yarn; According to the pixel distance between the upper and lower two corner points of the cone yarn, the diameter of the small end of the cone yarn is obtained to obtain the length of the cone yarn.

2. The method of claim 1, wherein, The method comprises: According to the pixel values of each pixel point in the red-green-blue image, three-channel threshold filtering is performed on the red-green-blue image to obtain an initial cone yarn region image; The initial cone yarn region image is subjected to segmentation operation to obtain a cone yarn region image when the cone yarn region is maximum.

3. The method of claim 2, wherein, The method comprises: Obtain the three-channel average pixel value of the pixel point of the cone yarn region obtained through multiple tests; When the pixel value of a pixel point in the red-green-blue image is greater than or equal to the three-channel average pixel value, the marking value of the pixel point is determined as a first marking value; When the pixel value of a pixel point in the red-green-blue image is less than the three-channel average pixel value, the marking value of the pixel point is determined as a second marking value; According to the pixel points with the first marking value, an initial cone yarn region image is obtained.

4. The method of claim 1, wherein, Before the offset amount is calculated according to the positions of the upper and lower two corner points of the cone yarn and the positions of the upper and lower two corner points in the target cone yarn corner point template to obtain the pixel distance between the upper and lower two corner points of the cone yarn, the method further comprises: Optionally, a cone yarn region image is taken as a target cone yarn region image; The upper and lower two corner points in the overhead view of the small end of the cone yarn in the target cone yarn region image are cropped to obtain a target cone yarn corner point template.

5. The method of claim 1, wherein, The method comprises: According to the pixel distance between the upper and lower two corner points of the cone yarn and the relationship between the pixel distance and the actual distance, the actual distance between the upper and lower two corner points of the cone yarn is obtained; The actual distance between the upper and lower two corner points of the cone yarn is taken as the diameter of the small end of the cone yarn.

6. The method of claim 1, wherein, The method comprises: According to the diameter of the small end of the cone yarn, the volume of the cone yarn is obtained; According to the density coefficient of the cone yarn and the volume of the cone yarn, the weight of the cone yarn is obtained; According to the thickness and the number of the cone yarn and the weight of the cone yarn, the length of the cone yarn is obtained.

7. A cop length measuring device characterized by comprising: The device comprises: A red-green-blue image acquisition module is configured to obtain a red-green-blue image of a cone yarn according to a visual camera installed on a yarn machine table when the cone yarn is at rest or rotating on the yarn machine table, and the center of the visual camera is located at a set height above the cone yarn. An area heat map acquisition module is configured to obtain a cheese yarn area image according to the red-green-blue image, so as to obtain an area heat map corresponding to the cheese yarn area image. A cheese yarn corner point position determination module is configured to take positions of the lowest values at the top and bottom of the area heat map as positions of the top and bottom cheese yarn corner points. A pixel distance acquisition module is configured to perform offset calculation according to the positions of the top and bottom cheese yarn corner points and the positions of the top and bottom corner points in the target cheese yarn corner point template, so as to obtain a pixel distance between the top and bottom cheese yarn corner points. A cheese yarn length acquisition module is configured to obtain a diameter of a small end of the cheese yarn according to the pixel distance between the top and bottom cheese yarn corner points, so as to obtain a cheese yarn length. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The processor executes the computer program to implement the steps of the method in any one of claims 1 to 6.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.

10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 6.