Fabric gram weight measuring method and device based on machine vision and electronic equipment

文档序号:1962616 发布日期:2021-12-14 浏览:11次 中文

阅读说明:本技术 基于机器视觉的面料克重测定方法、装置及电子设备 (Fabric gram weight measuring method and device based on machine vision and electronic equipment ) 是由 陈锦涛 于 2021-09-14 设计创作,主要内容包括:本发明提供了基于机器视觉的面料克重测定方法、装置及电子设备,所述基于机器视觉的面料克重测定方法、装置及电子设备包括:用于测量检测物质量的电子天平,用于提供测量检测物面积所需环境的装置,用于消除检测物褶皱的图像采集装置,用于处理检测物图像数据以及质量数据的单片机,基于机器视觉计算提取出检测物面积及克重的算法,用于显示检测物克重数据结果的显示器,用于遮挡环境光照的挡光罩;本发明创新性地提供了基于机器视觉的面料面积测定算法以及相应装置设备,提供了高精准度、高效率测量检测物面积、质量、克重的方法、装置及设备,有效解决了常规面料克重测定方法对面料的浪费,以及无法对不规则面料样本进行克重分析的弊端。(The invention provides a fabric gram weight measuring method and device based on machine vision and an electronic device, wherein the fabric gram weight measuring method and device based on machine vision and the electronic device comprise: the device comprises an electronic balance for measuring the quality of a detected object, a device for providing an environment required by measuring the area of the detected object, an image acquisition device for eliminating wrinkles of the detected object, a single chip microcomputer for processing image data and quality data of the detected object, an algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation, a display for displaying the gram weight data result of the detected object, and a light blocking cover for blocking ambient light; the invention innovatively provides a fabric area measuring algorithm based on machine vision and corresponding device equipment, provides a method, a device and equipment for measuring the area, the quality and the gram weight of a detected object with high precision and high efficiency, and effectively solves the problems that the conventional fabric gram weight measuring method wastes fabric and can not analyze the gram weight of an irregular fabric sample.)

1. A fabric gram weight measuring method and device based on machine vision and an electronic device are characterized by comprising the following steps:

s1: an electronic balance for measuring the amount of the detection substance;

s2: means for providing an environment required to measure the area of the test object;

s3: the image acquisition device is used for eliminating wrinkles of the detected object;

s4: the singlechip is used for processing image data and quality data of the detected object;

s5: an algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation;

s6: a display for displaying the result of the gram weight data of the detected object;

s7: the light blocking cover is used for blocking ambient light.

2. The machine vision-based fabric grammage determination method, device and electronic equipment as claimed in claim 1, further comprising: the electronic balance for measuring the amount of the test object S1, the device for providing the environment required for measuring the area of the test object S2, the test object S3 and the image capture device for removing wrinkles of the test object are placed or installed from bottom to top on the same vertical line.

3. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S2 further includes:

s21: the device for providing the environment required by measuring the area of the detected object consists of a light-emitting LED lamp and a light-diffusing plate so as to provide a uniform light-emitting environment;

s22: the device is necessary for an area detection algorithm, and is also a key device for providing a high-precision and high-efficiency area detection method by using the fabric gram weight determination method and device based on machine vision and electronic equipment;

s23: providing an environment for providing illumination from bottom to top, so that the image acquisition device for eliminating the wrinkles of the detected object can acquire a high-intensity illumination image S3;

s24: the test object is placed above the device for providing the environment required for measuring the area of the test object, so that the image capturing device for removing wrinkles of the test object captures the low-intensity illumination image at the position covered by the test object in step S3.

4. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S3 further includes:

s31: the device comprises a cover plate for eliminating wrinkles of a detected object and a camera for image acquisition;

s32: the cover plate for eliminating the wrinkles of the detection object is arranged above the detection object and used for eliminating the wrinkles of the detection object;

s33: the cover plate for eliminating the wrinkles of the detected objects is made of transparent materials, so that the images collected by the camera for image collection S31 are clear;

s34: the camera for image acquisition is arranged right above the cover plate for eliminating the wrinkles of the detected objects and is used for acquiring image data of the detected objects and transmitting the data to the single chip microcomputer S4.

5. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S4 further includes:

s41: and receiving the detected substance amount data acquired by the electronic balance for measuring the detected substance amount S1 and the detected object image data acquired by the image acquisition device for eliminating the wrinkles of the detected object S3, operating an algorithm for extracting the area and the grammage of the detected object based on machine vision calculation S5 and outputting the result to a display for displaying the grammage data result of the detected object S6.

6. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S5 further includes:

s51: positioning the image data of the detected object acquired by the image acquisition device for eliminating the wrinkles of the detected object in the S3 to a preset positioning point, and converting the positioning point of affine transformation of the image to a preset correction point, so as to correct and position the image to extract the image data in a preset fixed view field and exclude the image data in a non-fixed view field to improve the algorithm accuracy;

s52: converting RGB channel data contained in the extracted image data in the preset fixed visual field into HSV channel data to extract image brightness data;

R′=R/255

G′=G/255

B′=B/255

Cmax=max(R′,G′,B′)

Cmin=min(R′,G′,B′)

Δ=C max-Cmin

V=Cmax

s53: performing threshold segmentation on the image according to the extracted image brightness data to extract a target detection object in the image, wherein a region higher than a certain brightness is regarded as a non-target region, and a region higher than the certain brightness is regarded as a target region;

s54: and calculating the ratio of the number of the pixels in the target area to the number of the pixels in the fixed view field, and calculating the area of the detected object by combining the area corresponding to the fixed view field.

S55: and calculating to obtain the mass per unit area of the detected object through the converted area of the detected object and the measured mass of the detected object.

7. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S6 further includes:

s61: and receiving the mass per unit area of the detected object obtained by the algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation from the singlechip for processing the image data and the mass data of the detected object of S4 and displaying the mass per unit area of the detected object of S5.

8. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S7 further includes:

s71: the cover plate is placed on an electronic balance and used for shielding ambient illumination, the cover plate used for eliminating wrinkles of the detected object is prevented from reflecting light caused by S31 due to the ambient illumination, and the detected object area cannot be accurately identified in the algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation and extracted by S5 due to the fact that the brightness of the detected object is too high caused by the ambient illumination is avoided.

Technical Field

The invention relates to a measuring fabric area algorithm, a device design for providing necessary detection conditions for the measuring fabric area algorithm and an integrated design for combining the device and an electronic balance, belonging to the field of fabric gram weight measurement.

Background

In the textile trade sector, grammage is an important attribute of fabrics and therefore often needs to be determined. The current common method is to adopt a specific apparatus to cut an article with a fixed area, then place the article on a balance to measure the mass and calculate the mass per unit area. The method needs relatively complex steps, is destructive to the sample, and cannot measure defects such as a small-area sample and the like.

Disclosure of Invention

1. A fabric gram weight measuring method and device based on machine vision and an electronic device are characterized by comprising the following steps:

s1: an electronic balance for measuring the amount of the detection substance;

s2: means for providing an environment required to measure the area of the test object;

s3: the image acquisition device is used for eliminating wrinkles of the detected object;

s4: the singlechip is used for processing image data and quality data of the detected object;

s5: an algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation;

s6: a display for displaying the result of the gram weight data of the detected object;

s7: the light blocking cover is used for blocking ambient light.

2. The machine vision-based fabric grammage determination method, device and electronic equipment as claimed in claim 1, further comprising: the electronic balance for measuring the amount of the test object S1, the device for providing the environment required for measuring the area of the test object S2, the test object S3 and the image capture device for removing wrinkles of the test object are placed or installed from bottom to top on the same vertical line.

3. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S2 further includes:

s21: the device for providing the environment required by measuring the area of the detected object consists of a light-emitting LED lamp and a light-diffusing plate so as to provide a uniform light-emitting environment;

s22: the device is necessary for an area detection algorithm, and is also a key device for providing a high-precision and high-efficiency area detection method by using the fabric gram weight determination method and device based on machine vision and electronic equipment;

s23: providing an environment for providing illumination from bottom to top, so that the image acquisition device for eliminating the wrinkles of the detected object can acquire a high-intensity illumination image S3;

s24: the test object is placed above the device for providing the environment required for measuring the area of the test object, so that the image capturing device for removing wrinkles of the test object captures the low-intensity illumination image at the position covered by the test object in step S3.

4. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S3 further includes:

s31: the device comprises a cover plate for eliminating wrinkles of a detected object and a camera for image acquisition;

s32: the cover plate for eliminating the wrinkles of the detection object is arranged above the detection object and used for eliminating the wrinkles of the detection object;

s33: the cover plate for eliminating the wrinkles of the detected objects is made of transparent materials, so that the images collected by the camera for image collection S31 are clear;

s34: the camera for image acquisition is arranged right above the cover plate for eliminating the wrinkles of the detected objects and is used for acquiring image data of the detected objects and transmitting the data to the single chip microcomputer S4.

5. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S4 further includes:

s41: and receiving the detected substance amount data acquired by the electronic balance for measuring the detected substance amount S1 and the detected object image data acquired by the image acquisition device for eliminating the wrinkles of the detected object S3, operating an algorithm for extracting the area and the grammage of the detected object based on machine vision calculation S5 and outputting the result to a display for displaying the grammage data result of the detected object S6.

6. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S5 further includes:

s51: positioning the image data of the detected object acquired by the image acquisition device for eliminating the wrinkles of the detected object in the S3 to a preset positioning point, and converting the positioning point of affine transformation of the image to a preset correction point, so as to correct and position the image to extract the image data in a preset fixed view field and exclude the image data in a non-fixed view field to improve the algorithm accuracy;

s52: converting RGB channel data contained in the extracted image data in the preset fixed visual field into HSV channel data to extract image brightness data;

R'=R/255

G'=G/255

B'=B/255

Cmax=max(R′,G′,B′)

Cmin=min(R′,G′,B′)

Δ=Cmax-Cmin

V=Cmax

s53: performing threshold segmentation on the image according to the extracted image brightness data to extract a target detection object in the image, wherein a region higher than a certain brightness is regarded as a non-target region, and a region higher than the certain brightness is regarded as a target region;

s54: and calculating the ratio of the number of the pixels in the target area to the number of the pixels in the fixed view field, and calculating the area of the detected object by combining the area corresponding to the fixed view field.

S55: and calculating to obtain the mass per unit area of the detected object through the converted area of the detected object and the measured mass of the detected object.

7. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S6 further includes:

s61: and receiving the mass per unit area of the detected object obtained by the algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation from the singlechip for processing the image data and the mass data of the detected object of S4 and displaying the mass per unit area of the detected object of S5.

8. The method, apparatus and electronic device for measuring grammage of fabric based on machine vision according to claim 1, wherein S7 further includes:

s71: the cover plate is placed on an electronic balance and used for shielding ambient illumination, the cover plate used for eliminating wrinkles of the detected object is prevented from reflecting light caused by S31 due to the ambient illumination, and the detected object area cannot be accurately identified in the algorithm for extracting the area and the gram weight of the detected object based on machine vision calculation and extracted by S5 due to the fact that the brightness of the detected object is too high caused by the ambient illumination is avoided.

Drawings

FIG. 1 is a schematic diagram of the structure of an intelligent grammage measuring balance of the present invention;

FIG. 2 is a frame diagram of an intelligent grammage measuring balance of the present invention;

fig. 3 is a flow chart of a method of using the intelligent grammage measuring balance of the present invention.

Detailed Description

The invention is described in detail below with reference to the figures and the embodiments.

The various components in fig. 1 are: 1 grammes per square metre display screen, 2 cameras, 3 detection thing bases and apron, 4 quality display screens, 5 balance control button, 6 balance bases, 7 lens hoods.

Example 1:

the invention provides an intelligent grammage measuring balance, which is mainly structurally shown in figure 1, a frame diagram is shown in figure 2, a using method flow diagram is shown in figure 3, the main improved structure is that a light-emitting device is arranged on a balance base to provide light upwards, a special detection object base is adopted to enable the provided light to be uniform, meanwhile, a cover plate is designed to eliminate wrinkles of detection objects, and a light shield is designed to eliminate the influence of ambient light.

As shown in the flowchart of the method shown in fig. 3, the specific detection steps include:

step 1: starting the balance;

step 2: placing an object to be detected on a detection object base;

and step 3: covering a cover plate;

and 4, step 4: detecting the area of an object to be detected;

and 5: detecting the mass of the substance to be detected;

step 6: calculating the gram weight of the object to be detected;

and 7: the gram weight display screen displays the gram weight of the object to be detected;

wherein step 1 requires starting the balance using the balance control button shown as element 5 in fig. 1;

step 2, placing an object to be detected on a detection object base shown as a part 3 in fig. 1;

step 3, covering a cover plate shown as part 3 in fig. 1 on the object to be detected;

the camera shown in the part 2 in the figure 1 in the step 4 shoots an image of an object to be detected and transmits the image to a built-in single chip microcomputer of the balance, an algorithm built in the single chip microcomputer corrects the image and extracts the image brightness, the image is subjected to threshold segmentation according to the image brightness to obtain the number of pixel points in a low-brightness area, and the area corresponding to the object to be detected is converted;

in the step 4, the balance base shown as the part 6 in the figure 1 measures the mass of the object to be detected and transmits the mass to the singlechip;

the balance algorithm in the step 5 converts the area and the mass of the object to be detected into gram weight and transmits the gram weight to the display screen;

wherein, the grammage display screen shown in part 1 of fig. 1 in step 6 will display the grammage of the object to be detected to the user.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种纱线生产用大批量助剂称重装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!