Intelligent mask production detection system and method based on big data analysis

Through the intelligent mask production and detection system based on big data analysis, using multiple light sources and sensors for image splicing and feature fusion, the problem of low detection accuracy of mask defects in the prior art is solved, and a higher distinction and lower misjudgment rate is achieved.

CN120028329AInactive Publication Date: 2025-05-23HAINAN HENGCHI INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510020730.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-05-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When detecting bubbles or local deformation in the mask, it is difficult to accurately judge the degree of obviousness of the defect, resulting in a low recognition distinction and a high probability of misjudgment, thereby reducing the accuracy of mask defect detection.

Method used

An intelligent mask production and detection system based on big data analysis is adopted. The system uses preset modules, irradiation modules, acquisition modules, judgment modules and other modules to obtain grayscale images on the mask surface using multiple second light sources and sensors, perform image stitching and feature fusion, and combine historical data to make error matching and adjustments to improve the accuracy of detection.

Benefits of technology

It improves the distinction and accuracy of facial mask defect detection, reduces the probability of misjudgment, enhances the sensitivity to details and minor defects, improves the product's factory pass rate, and reduces false defect interference caused by external environmental factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120028329A_ABST
    Figure CN120028329A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent mask production detection system and method based on big data analysis. The system comprises a preset module, an irradiation module I, an acquisition module I, a judgment module I, an irradiation module II, an acquisition module II, a processing module, a judgment module II, a feedback module I and the like. The invention relates to the technical field of surface defect detection, in particular to an intelligent mask production detection system and method based on big data analysis. The technical problem to be solved by the invention is to provide an intelligent mask production detection system and method based on big data analysis, which can improve the discrimination degree of recognition and reduce the probability of misjudgment, so that during detection, defects can be accurately distinguished, the interference of human factors and environmental factors is reduced, the sensitivity to details and tiny defects is enhanced, and the detection accuracy is improved. Therefore, the detection precision of the mask defects is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of surface defect detection, and in particular, to an intelligent facial mask production detection system and method based on big data analysis. Background Art

[0002] Facial masks have always been a mainstream product in the skin care market due to their diverse functions, ease of use, and affordable prices. In the production process of some facial masks, it is necessary to further cut and process larger facial mask rolls, create specified shapes and holes on the surface of the rolls, then add skin care coatings and protective films, and finally package them, so as to produce personalized facial mask products that are easy to use and meet practicality and aesthetics. However, facial masks with coatings are easily squeezed and deformed during processing and transportation, causing bubbles to enter the mask, making it easy for the mask to be contaminated and cracked, or causing creases or wrinkles due to local deformation, thereby reducing the shelf life of the mask and affecting the normal use of the mask.

[0003] The traditional method of detecting facial mask defects mainly relies on manual inspection by quality inspectors on the production line. Light sources and visual sensors are set up on the production line, and workers check the masks one by one through the display to determine whether the masks have quality defects. This method is prone to manual omissions, which leads to an increase in the after-sales rate.

[0004] With the development of big data analysis technology, in the prior art, an industrial camera is usually used to capture images of the mask surface, and image features are extracted through image processing technology to perform visual inspection and identify defects. For example, a Chinese patent with publication number CN108820953A proposes a PVC mask detection method and device, which divides the acquisition area into multiple areas according to a specified direction, sets multiple sensors to collect multiple areas of the mask, and then stitches each area together, and then compares it with a preset standard sample image, and determines whether there is a defect based on the error degree obtained by the comparison.

[0005] Regarding the above technical solution, when this method is used to detect facial masks with bubbles or local deformation, it is difficult to accurately judge the obviousness of the defects, resulting in low recognition discrimination, which in turn causes misjudgment and reduces the detection accuracy of facial mask defects. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide an intelligent facial mask production detection system and method based on big data analysis, which can improve the recognition discrimination, reduce the probability of misjudgment, and thus improve the detection accuracy of facial mask defects.

[0007] In the first aspect, the present invention provides an intelligent facial mask production and detection system based on big data analysis, which adopts the following technical solutions to achieve the purpose of the invention:

[0008] The intelligent mask production and detection system based on big data analysis includes the following modules:

[0009] Preset module: The output end is connected to the input end of the irradiation module I, and is used to obtain a grayscale image of the surface of the mask template in the database as a preset grayscale image;

[0010] Irradiation module I: the input end is connected to the output end of the preset module, and the output end is connected to the input end of the acquisition module I, and is used to set a first light source at a specified position to irradiate the first irradiation area;

[0011] Acquisition module I: the input end is connected to the output end of the irradiation module I, and the output end is connected to the input end of the judgment module I, and is used to set a first sensor above the first irradiation area, and the first sensor acquires a grayscale image of the mask surface in the first irradiation area to obtain a first grayscale image;

[0012] Judgment module I: the input end is connected to the output end of the acquisition module I, and the output end is connected to the input end of the irradiation module II and the input end of the feedback module I, and is used to match the first grayscale image with the preset grayscale image, and set a preset error according to the grayscale image in the historical data. If the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged to be preliminarily qualified and the irradiation module II is executed. Otherwise, it is judged to be defective and the feedback module I is executed;

[0013] Irradiation module II: the input end is connected to the output end of the judgment module I, and the output end is connected to the input end of the acquisition module II, and is used to respectively set N second light sources at designated positions, the irradiation directions of the N second light sources are different, and irradiate the second irradiation area once in sequence;

[0014] Acquisition module II: the input end is connected to the output end of the irradiation module II, and the output end is connected to the input end of the processing module, and is used to set N second sensors above the second irradiation area, and the N second sensors sequentially acquire the grayscale image of the mask surface in the second irradiation area in a specified order to obtain N second grayscale images;

[0015] Processing module: the input end is connected to the output end of the acquisition module II, and the output end is connected to the input end of the judgment module II, and is used to respectively obtain the central pixel points of the N second grayscale images, and according to the corresponding second light source illumination direction and the corresponding second sensor position, with each central pixel point as the center, the corresponding second grayscale images are spliced ​​according to the preset transformation relationship, the feature points are fused, and the spliced ​​grayscale image is used as the third grayscale image;

[0016] Judgment module II: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the feedback module I, and is used to match the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, it is judged that the product is qualified. Otherwise, it is judged that there is a suspected defect and the feedback module I is executed;

[0017] Feedback module I: The input end is connected to the output end of the judgment module I and the output end of the judgment module II respectively, and is used to issue an alarm and upload data to the management end.

[0018] As a further limitation of the technical solution, it also includes an acquisition module III, a judgment module III and a feedback module II;

[0019] Acquisition module III: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module III, and is used to acquire the central pixel point of the first grayscale image as the first pixel point, and acquire the central pixel point of the third grayscale image as the third pixel point;

[0020] Judgment module III: the input end is connected to the output end of the acquisition module III, and the output end is respectively connected to the input end of the feedback module II and the input end of the judgment module II, and is used to match the first grayscale image and the third grayscale image with the first pixel point and the third pixel point as the center, and set the splicing error according to the grayscale image in the historical data. If the error between the first grayscale image and the third grayscale image is less than the splicing error, it is judged that the splicing is successful and the judgment module II is executed. Otherwise, it is judged that the splicing fails and the feedback module II is executed;

[0021] Feedback module II: the input end is connected to the output end of the judgment module III, and the output end is connected to the input end of the illumination module II, and is used to adjust the brightness and position of the N second light sources according to the splicing error and the matching result.

[0022] As a further limitation of the present technical solution, it also includes a correction module: the input end is connected to the output end of the acquisition module II, and the output end is connected to the input end of the processing module, which is used to calculate the gradient amplitude of the brightness change of each pixel in the N second grayscale images in a specified direction, set a gradient threshold according to historical data, count the pixels whose gradient amplitude is lower than the gradient threshold, and merge adjacent pixels into multiple shadow areas, respectively extract the grayscale average values ​​in the multiple shadow areas, and perform grayscale correction on the local grayscale image corresponding to the shadow area according to the average value.

[0023] As a further limitation of the present technical solution, it also includes an adjustment module: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module II, which is used to calculate the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, and the accumulated value of the extreme value in all specified directions is negatively correlated and normalized to obtain local brightness consistency, and the product of the local brightness consistency and the discrete deviation value is used as the adjustment value, and the grayscale of each pixel in the third grayscale image is uniformly summed and adjusted according to the adjustment value.

[0024] As a further limitation of the technical solution, it also includes a calculation module, a judgment module IV and a feedback module III;

[0025] Calculation module: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module IV, and is used to respectively calculate the Euclidean distance between the central pixel point of the N second grayscale images and the first pixel point, which is recorded as a first distance set, and respectively calculate the Euclidean distance between the central pixel point of the N second grayscale images and the third pixel point, which is recorded as a second distance set;

[0026] Judgment module IV: the input end is connected to the output end of the calculation module, and the output end is connected to the input end of the feedback module III and the input end of the judgment module II respectively, and is used to calculate the correlation coefficient r between the first distance set and the second distance set, and the confidence is α∈(0,1). If |r|≥α, it is judged that this splicing is credible and the judgment module II is executed. Otherwise, it is judged that this splicing is suspicious and the feedback module III is executed.

[0027] Feedback module III: the input end is connected to the output end of the judgment module IV, and the output end is connected to the input end of the acquisition module II, and is used to adjust the angles and positions of the N second sensors according to the judgment result.

[0028] In the second aspect, the present invention provides a smart mask production detection method based on big data analysis, which adopts the following technical solutions to achieve the purpose of the invention:

[0029] The intelligent mask production detection method based on big data analysis includes the following steps:

[0030] Preset data: obtain a grayscale image of the mask template surface in the database as a preset grayscale image;

[0031] Irradiation I: a first light source is set at a designated position to irradiate a first irradiation area;

[0032] Acquiring data I: a first sensor is arranged above the first irradiation area, and the first sensor acquires a grayscale image of the surface of the mask in the first irradiation area to obtain a first grayscale image;

[0033] Judgment I: Match the first grayscale image with the preset grayscale image, set a preset error according to the grayscale image in the historical data, if the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged as preliminarily qualified, and the irradiation II step is performed; otherwise, it is judged as defective, and the feedback I step is performed;

[0034] Irradiation II: N second light sources are respectively arranged at designated positions, with the irradiation directions of the N second light sources being different, and the second irradiation areas are irradiated one by one in turn;

[0035] Acquiring data II: N second sensors are arranged above the second irradiation area, and the N second sensors sequentially acquire grayscale images of the mask surface in the second irradiation area in a specified order to obtain N second grayscale images;

[0036] Processing data: obtaining the central pixel points of N second grayscale images respectively, and according to the corresponding second light source illumination direction and the corresponding second sensor position, taking each central pixel point as the center, performing image stitching on the corresponding second grayscale images according to a preset transformation relationship, and fusing the feature points, and using the stitched grayscale images as the third grayscale image;

[0037] Judgment II: Match the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, the product is judged to be qualified. Otherwise, it is judged to have a suspected defect and the feedback step I is executed;

[0038] Feedback I: Issue an alarm and upload the data to the management terminal.

[0039] As a further limitation of the technical solution, between the data processing step and the judgment II step, there are also steps of obtaining data III, judging III and feedback II;

[0040] Acquiring data III: acquiring a central pixel point of the first grayscale image as a first pixel point, and acquiring a central pixel point of the third grayscale image as a third pixel point;

[0041] Judgment III: With the first pixel point and the third pixel point as the center, the first grayscale image and the third grayscale image are matched, and a stitching error is set according to the grayscale image in the historical data. If the error between the first grayscale image and the third grayscale image is less than the stitching error, it is judged that the stitching is successful and the judgment II step is executed. Otherwise, it is judged that the stitching fails and the feedback II step is executed.

[0042] Feedback II: According to the stitching error and the matching result, the brightness and position of the N second light sources are adjusted.

[0043] As a further limitation of the technical solution, a correction step is also provided between the step of obtaining data II and the step of processing data;

[0044] Correction: Calculate the gradient amplitude of the brightness change of each pixel in the N second grayscale images in the specified direction, set the gradient threshold according to historical data, count the pixels whose gradient amplitude is lower than the gradient threshold, merge adjacent pixels into multiple shadow areas, extract the grayscale average values ​​in the multiple shadow areas respectively, and perform grayscale correction on the local grayscale image corresponding to the shadow area according to the average value.

[0045] As a further limitation of the technical solution, an adjustment step is also provided between the data processing step and the judgment II step;

[0046] Adjustment: Calculate the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, perform negative correlation mapping on the accumulated value of the extreme value in all specified directions and normalize it to obtain local brightness consistency, take the product of the local brightness consistency and the discrete deviation value as the adjustment value, and uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value.

[0047] As a further limitation of the technical solution, a calculation step, a judgment step IV and a feedback step III are further provided between the data processing step and the judgment step II;

[0048] Calculation: Calculate the Euclidean distances between the central pixel points of the N second grayscale images and the first pixel points, respectively, and record them as the first distance set; calculate the Euclidean distances between the central pixel points of the N second grayscale images and the third pixel points, respectively, and record them as the second distance set;

[0049] Judgment IV: Calculate the correlation coefficient r between the first distance set and the second distance set, with a confidence level of α∈(0,1). If |r|≥α, then the splicing is judged to be credible and the judgment step II is executed. Otherwise, the splicing is judged to be suspicious and the feedback step III is executed.

[0050] Feedback III: According to the judgment result, the angles and positions of the N second sensors are adjusted.

[0051] Compared with the prior art, the advantages and positive effects of the present invention are:

[0052] 1. By stitching N second grayscale images with each central pixel as the center according to a preset transformation relationship, the stitched grayscale image is used as the third grayscale image, and matched with the preset grayscale image. With such a setting, when used to detect facial masks with bubbles or local deformations, since bubbles or local deformations can regularly present certain morphological characteristics under the influence of different light source angles, positions, light intensities and other factors, multiple second sensors are installed at corresponding positions to obtain grayscale images of the facial masks, so that the stitched third grayscale image retains these defects to a greater extent and enhances its recognition distinction, which can enhance the sensitivity to details and minor defects, accurately judge the obviousness of the defects, and improve the factory qualification rate of products. At the same time, it helps to eliminate the interference of false defects caused by external environmental factors, reduce the probability of misjudgment, and thereby improve the detection accuracy of facial mask surface defects.

[0053] 2. Match the grayscale value distribution of the first grayscale image and the third grayscale image, set the stitching error according to the grayscale image in the historical data, and then judge the stitching result. When the stitching is judged to be failed, feed the data back to the management end, so as to adjust the brightness, position, angle and quantity of N second light sources according to the stitching error and the matching result. Since the mask is easily affected by external light sources during the detection process, the grayscale value distribution diagram of the grayscale image in the specified direction changes. By adjusting the second light source, the quality of the acquired image is improved, the interference of human factors and environmental changes on the detection process is effectively reduced, and the probability of misjudgment of defects is reduced, thereby improving the detection accuracy of mask surface defects.

[0054] 3. By calculating the gradient amplitude of the brightness change of each pixel in the specified direction in the N second grayscale images, the pixels with gradient amplitude lower than the gradient threshold are counted, and the adjacent pixels are merged into multiple shadow areas. The grayscale average values ​​in the multiple shadow areas are extracted respectively, and the grayscale correction is performed on the local grayscale image corresponding to the shadow area according to the average value. Due to the different angles and intensities of ambient light and the material of the mask, shadow areas may appear. These shadow areas are easy to interfere with defect detection. The calculation of gradient amplitude and shadow correction can help reduce the probability of misjudgment due to environmental changes or external factors, improve the accuracy of shadow processing, and thus improve the detection accuracy of mask surface defects, and enhance the stability and reliability of detection.

[0055] 4. By calculating the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, negative correlation mapping and normalization processing are performed to obtain local brightness consistency, and the product of the local brightness consistency and the discrete deviation value is used as the adjustment value, so as to uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value. In the grayscale image of the ideal mask surface, the brightness of the local area is usually uniform, but in the actual production process, the illumination of the mask surface is easily affected by external and environmental factors, resulting in uneven distribution of grayscale values ​​in the local area. At the same time, foreign matter may remain or be uneven on the mask surface, which is also likely to affect the distribution of grayscale values. By calculating the local brightness consistency and discrete deviation value, the pixels in the grayscale image are uniformly adjusted, which is conducive to reducing the probability of misjudgment and enhancing the sensitivity to details and minor defects, thereby improving the detection accuracy of mask surface defects.

[0056] 5. Calculate the Euclidean distance between the central pixel of the N second grayscale images and the first pixel respectively, recorded as the first distance set, calculate the Euclidean distance between the central pixel of the N second grayscale images and the third pixel respectively, recorded as the second distance set, and make a confidence judgment by calculating the correlation coefficient r between the first distance set and the second distance set. When it is judged that this splicing is suspicious, the data is fed back to the management end. According to the judgment result, the angle, position, quantity, etc. of the N second sensors are adjusted, and then the detection process is intervened and adjusted through further calculation or manual intervention, and the interference of external factors and the interference of product sliding and dislocation are eliminated in time to improve the accuracy and reliability of detection, reduce the waste of resources, and improve production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0058] Figure 1 This is a system diagram of Embodiment 1 of the present invention;

[0059] Figure 2 This is a flow chart of Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0060] The following will be combined with the present invention Figure 1 and Figure 2, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] It should be noted that the directional terms such as left, right, up, down, front and back in the embodiments of the present invention are merely relative concepts or are based on the normal use state of the product, that is, the direction of movement of the product, and should not be considered as limiting.

[0062] When a component is referred to as being “located” or “disposed on” another component, it may be on the other component or there may be an intervening component. When a component is referred to as being “connected to” another component, it may be directly connected to the other component or there may be an intervening component.

[0063] Embodiment 1: Intelligent facial mask production and detection system based on big data analysis, including the following modules:

[0064] Preset module: The output end is connected to the input end of the irradiation module I, and is used to obtain a grayscale image of the surface of the mask template in the database as a preset grayscale image, and calculate a grayscale value distribution map of the preset grayscale image;

[0065] Irradiation module I: the input end is connected to the output end of the preset module, and the output end is connected to the input end of the acquisition module I, and is used to set a first light source at a specified position to irradiate the first irradiation area;

[0066] Acquisition module I: the input end is connected to the output end of the irradiation module I, and the output end is connected to the input end of the judgment module I, and is used to set a first sensor above the first irradiation area, and the first sensor acquires a grayscale image of the mask surface in the first irradiation area to obtain a first grayscale image;

[0067] Judgment module I: the input end is connected to the output end of the acquisition module I, and the output end is connected to the input end of the irradiation module II and the input end of the feedback module I, and is used to match the first grayscale image with the preset grayscale image, and set a preset error according to the grayscale image in the historical data. If the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged to be preliminarily qualified and the irradiation module II is executed. Otherwise, it is judged to be defective and the feedback module I is executed;

[0068] Irradiation module II: the input end is connected to the output end of the judgment module I and the output end of the feedback module II respectively, and the output end is connected to the input end of the acquisition module II, and is used to respectively set N second light sources at designated positions, the irradiation directions of the N second light sources are different, and irradiate the second irradiation area once in sequence;

[0069] Acquisition module II: the input end is connected to the output end of the irradiation module II and the output end of the feedback module III respectively, and the output end is connected to the input end of the correction module, and is used to set N second sensors above the second irradiation area, and the N second sensors sequentially acquire the grayscale image of the mask surface in the second irradiation area in a specified order to obtain N second grayscale images;

[0070] Correction module: The input end is connected to the output end of the acquisition module II, and the output end is connected to the input end of the processing module. It is used to calculate the gradient amplitude of the brightness change of each pixel in the N second grayscale images in the specified direction, set the gradient threshold according to historical data, count the pixels whose gradient amplitude is lower than the gradient threshold, and merge adjacent pixels into multiple shadow areas, respectively extract the grayscale average values ​​in the multiple shadow areas, and perform grayscale correction on the local grayscale image corresponding to the shadow area according to the average value.

[0071] Processing module: the input end is connected to the output end of the correction module, and the output end is connected to the input end of the acquisition module III, and is used to respectively acquire the central pixel points of the N second grayscale images, and according to the corresponding second light source illumination direction and the corresponding second sensor position, with each central pixel point as the center, perform image splicing on the corresponding second grayscale images according to a preset transformation relationship, fuse the feature points, and use the spliced ​​grayscale image as the third grayscale image;

[0072] Acquisition module III: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module III, and is used to acquire the central pixel point of the first grayscale image as the first pixel point, and acquire the central pixel point of the third grayscale image as the third pixel point;

[0073] Judgment module III: the input end is connected to the output end of the acquisition module III, and the output end is respectively connected to the input end of the feedback module II and the input end of the calculation module, and is used to match the first grayscale image and the third grayscale image with the first pixel point and the third pixel point as the center, and set the stitching error according to the grayscale image in the historical data. If the error between the first grayscale image and the third grayscale image is less than the stitching error, it is judged that the stitching is successful and the calculation module is executed. Otherwise, it is judged that the stitching fails and the feedback module II is executed;

[0074] Feedback module II: the input end is connected to the output end of the judgment module III, and the output end is connected to the input end of the illumination module II, and is used to adjust the brightness and position of the N second light sources according to the splicing error and the matching result, and execute the illumination module II.

[0075] Calculation module: the input end is connected to the output end of the judgment module III, and the output end is connected to the input end of the judgment module IV, and is used to respectively calculate the Euclidean distance between the central pixel point of the N second grayscale images and the first pixel point, which is recorded as the first distance set, and respectively calculate the Euclidean distance between the central pixel point of the N second grayscale images and the third pixel point, which is recorded as the second distance set;

[0076] Judgment module IV: the input end is connected to the output end of the calculation module, and the output end is connected to the input end of the feedback module III and the input end of the judgment module II respectively, and is used to calculate the correlation coefficient r between the first distance set and the second distance set, and the confidence is α∈(0,1). If |r|≥α, it is judged that this splicing is credible and the adjustment module is executed. Otherwise, it is judged that this splicing is suspicious and the feedback module III is executed.

[0077] Feedback module III: the input end is connected to the output end of the judgment module IV, and the output end is connected to the input end of the acquisition module II, and is used to adjust the angles and positions of the N second sensors according to the judgment result, and execute the acquisition module II.

[0078] Adjustment module: the input end is connected to the output end of the judgment module IV, and the output end is connected to the input end of the judgment module II, and is used to calculate the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, and negatively correlate and normalize the accumulated value of the extreme value in all specified directions to obtain local brightness consistency, and use the product of the local brightness consistency and the discrete deviation value as the adjustment value, and uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value.

[0079] Judgment module II: the input end is connected to the output end of the adjustment module, and the output end is connected to the input end of the feedback module I, and is used to match the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, it is judged that the product is qualified. Otherwise, it is judged that there is a suspected defect and the feedback module I is executed;

[0080] Feedback module I: The input end is connected to the output end of the judgment module I and the output end of the judgment module II respectively, and is used to issue an alarm and upload data to the management end.

[0081] The working principle of this embodiment is:

[0082] The preset module first obtains a grayscale image of the preset mask template surface stored in the system database as a preset grayscale image. The preset grayscale image usually includes but is not limited to texture structure areas under a specific distribution law, and specific pattern style areas, etc., and calculates the grayscale value distribution map of the preset grayscale image in a specified direction, thereby providing a reference for subsequent grayscale image analysis.

[0083] The irradiation module I sets the first light source at the designated position. When the mask reaches the first irradiation area, the mask in the first irradiation area is irradiated. The acquisition module I obtains the first grayscale image of the mask surface through the first sensor, removes the interference of color, and accurately analyzes the surface texture and brightness information of the mask. The judgment module I performs error matching between the first grayscale image and the preset grayscale image, and sets the preset error according to the grayscale image in the historical data, wherein the historical data is usually derived from the error value between the preset grayscale image and the detected grayscale image of the mask. If the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged to be preliminarily qualified, otherwise, it is judged to be defective. When the judgment module I judges that there is a defect, the feedback module I issues an alarm and uploads the data to the management end.

[0084] The irradiation module II sets N second light sources at designated positions, and the irradiation directions of the N second light sources are different. When the judgment module I judges that the mask is preliminarily qualified, the irradiation module II uses the N second light sources to irradiate the second irradiation area in turn. The acquisition module II is provided with N second sensors above the second irradiation area. The acquisition module II acquires the grayscale image of the mask surface in the second irradiation area in turn through the N second sensors in a designated order to obtain N second grayscale images.

[0085] The correction module calculates the gradient amplitude of the brightness change of each pixel in the specified direction in the N second grayscale images, sets the gradient threshold according to historical data, where the historical data usually comes from the gradient amplitude of the brightness change of the preset grayscale image and the grayscale image of the detected mask, counts the pixels whose gradient amplitude is lower than the gradient threshold, merges the adjacent pixels into multiple shadow areas, extracts the grayscale average values ​​in the multiple shadow areas, and performs grayscale correction on the local grayscale image corresponding to the shadow area according to the average value. Due to the different angles and intensities of ambient light and the materials of the mask, shadow areas may appear, and these shadow areas are easy to interfere with defect detection. The calculation of gradient amplitude and shadow correction can help reduce the probability of misjudgment due to environmental changes or external factors, improve the accuracy of shadow processing, and thus improve the detection accuracy of mask surface defects, and enhance the stability and reliability of detection.

[0086] The processing module obtains the central pixel points of the N second grayscale images respectively, and according to the N second light source irradiation directions input into the system and the corresponding second sensor positions, with each central pixel as the center, performs image stitching on the corresponding second grayscale images according to a preset transformation relationship, finds feature points between images through a feature extraction algorithm, fuses the feature points, and uses the stitched grayscale image as the third grayscale image. With such an arrangement, when used to detect facial masks with bubbles or local deformations, since bubbles or local deformations can regularly present certain morphological characteristics under the influence of different light source angles, positions, light intensities and other factors, multiple second sensors are installed at corresponding positions to obtain grayscale images of the facial masks, so that the stitched third grayscale image retains these defects to a greater extent and enhances its recognition distinction, can enhance sensitivity to details and minor defects, accurately judge the obviousness of the defects, and improve the factory qualified rate of products. At the same time, it helps to eliminate the interference of false defects caused by external environmental factors, reduce the probability of misjudgment, and thereby improve the detection accuracy of facial mask surface defects.

[0087] The acquisition module III acquires the central pixel of the first grayscale image as the first pixel, acquires the central pixel of the third grayscale image as the third pixel, and with the first pixel and the third pixel as the center, the judgment module III matches the grayscale value distribution of the first grayscale image and the third grayscale image, and sets the splicing error according to the grayscale image in the historical data, wherein the historical data is usually derived from the grayscale value distribution diagram of the preset grayscale image and the grayscale image of the detected mask. If the error between the first grayscale image and the third grayscale image is less than the splicing error, it is judged that the splicing is successful, otherwise, it is judged that the splicing fails. When the judgment module III judges that the splicing fails, the feedback module II feeds back the data to the management end, so as to adjust the brightness, position, angle and quantity of the N second light sources according to the splicing error and the matching result, and repeatedly executes the irradiation module II, so as to improve the quality of the acquired image, effectively reduce the interference of human factors and environmental changes on the detection process, reduce the probability of misjudgment of defects, and thus improve the detection accuracy of defects on the surface of the mask.

[0088] When the judgment module III determines that the splicing is successful, the calculation module calculates the Euclidean distance between the central pixel of the N second grayscale images and the first pixel, which is recorded as the first distance set, and calculates the Euclidean distance between the central pixel of the N second grayscale images and the third pixel, which is recorded as the second distance set. The judgment module IV makes the next judgment by calculating the correlation coefficient r between the first distance set and the second distance set, where the confidence is α∈(0,1). If |r|≥α, then the splicing is judged to be credible, otherwise, the splicing is judged to be suspicious. When the judgment module IV determines that the splicing is suspicious, the feedback module III feeds back the data to the management end, and adjusts the angle, position, quantity, etc. of the N second sensors according to the judgment result, and repeatedly executes the acquisition module II, and then intervenes and adjusts the detection process through further calculation or manual intervention, and timely eliminates the interference of external factors and the interference of product sliding dislocation, so as to improve the accuracy and reliability of detection, reduce the waste of resources, and improve production efficiency.

[0089] When the judgment module IV determines that the stitching is credible, the adjustment module calculates the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, and performs negative correlation mapping and normalization on the accumulated value of the extreme value to obtain local brightness consistency, and uses the product of the local brightness consistency and the discrete deviation value as the adjustment value, so as to uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value. In the grayscale image of the ideal mask surface, the brightness of the local area is usually uniform, but in the actual production process, the illumination of the mask surface is easily disturbed by external factors and environmental factors, resulting in uneven distribution of grayscale values ​​in the local area. At the same time, foreign matter may remain or be uneven on the mask surface, which is also likely to affect the distribution of grayscale values. By judging the local brightness consistency and discrete deviation value, the pixels in the grayscale image are uniformly adjusted, which is conducive to reducing the probability of misjudgment, enhancing the sensitivity to details and minor defects, and thus improving the detection accuracy of mask surface defects.

[0090] The judgment module II matches the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, the product is judged to be qualified. Otherwise, it is judged that there is a suspicious defect. The feedback module I issues an alarm and uploads the data to the management end. With such a setting, when used to detect facial masks with bubbles or local deformations, since bubbles or local deformations can regularly present certain morphological characteristics under the influence of different light source angles, positions, light intensities and other factors, multiple second sensors are installed at corresponding positions to obtain grayscale images of the facial masks, so that the spliced ​​third grayscale image retains these defects to a large extent and enhances its recognition distinction, which can enhance the sensitivity to details and minor defects, accurately judge the obviousness of the defects, and improve the factory qualification rate of products. At the same time, it helps to eliminate the interference of false defects caused by external environmental factors, reduce the probability of misjudgment, and thereby improve the detection accuracy of facial mask surface defects.

[0091] Embodiment 2: A smart mask production detection method based on big data analysis, comprising the following steps:

[0092] S1, preset data: obtaining a grayscale image of the surface of the mask template in the database as a preset grayscale image, and calculating a grayscale value distribution map of the preset grayscale image;

[0093] S2, irradiation I: setting a first light source at a designated position to irradiate a first irradiation area;

[0094] S3, obtaining data I: a first sensor is arranged above the first irradiation area, and the first sensor obtains a grayscale image of the mask surface in the first irradiation area to obtain a first grayscale image;

[0095] S4, judgment I: matching the first grayscale image with a preset grayscale image, setting a preset error according to the grayscale image in the historical data, if the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged as preliminarily qualified, and the irradiation II step S5 is executed; otherwise, it is judged as defective, and the feedback I step S17 is executed;

[0096] S5, irradiation II: N second light sources are respectively arranged at designated positions, the irradiation directions of the N second light sources are different, and the second irradiation areas are irradiated once in sequence;

[0097] S6, obtaining data II: N second sensors are arranged above the second irradiation area, and the N second sensors sequentially obtain grayscale images of the mask surface in the second irradiation area in a specified order to obtain N second grayscale images;

[0098] S7, correction: calculate the gradient amplitude of the brightness change of each pixel in the N second grayscale images in the specified direction, set the gradient threshold according to historical data, count the pixels whose gradient amplitude is lower than the gradient threshold, merge adjacent pixels into multiple shadow areas, extract the grayscale average values ​​in the multiple shadow areas respectively, and perform grayscale correction on the local grayscale image corresponding to the shadow area according to the average value.

[0099] S8, processing data: respectively obtaining the central pixel points of the N second grayscale images, and based on the corresponding second light source illumination direction and the corresponding second sensor position, taking each central pixel point as the center, performing image stitching on the corresponding second grayscale images according to a preset transformation relationship, and fusing the feature points, and using the stitched grayscale images as the third grayscale image;

[0100] S9, obtaining data III: obtaining a central pixel point of the first grayscale image as a first pixel point, and obtaining a central pixel point of the third grayscale image as a third pixel point;

[0101] S10, judgment III: with the first pixel point and the third pixel point as the center, the first grayscale image and the third grayscale image are matched, and a stitching error is set according to the grayscale image in the historical data. If the error between the first grayscale image and the third grayscale image is less than the stitching error, it is judged that the stitching is successful, and the calculation step S12 is executed. Otherwise, it is judged that the stitching fails, and the feedback II step S11 is executed;

[0102] S11, Feedback II: According to the stitching error and the matching result, the brightness and position of the N second light sources are adjusted, and the illumination II step S5 is performed.

[0103] S12, calculation: respectively calculate the Euclidean distances between the central pixel points of the N second grayscale images and the first pixel point, recorded as a first distance set, and respectively calculate the Euclidean distances between the central pixel points of the N second grayscale images and the third pixel point, recorded as a second distance set;

[0104] S13, judgment IV: calculate the correlation coefficient r between the first distance set and the second distance set, the confidence is α∈(0,1), if |r|≥α, then the splicing is judged to be credible, and the adjustment step S15 is executed; otherwise, the splicing is judged to be suspicious, and the feedback III step S14 is executed;

[0105] S14, Feedback III: According to the judgment result, the angles and positions of the N second sensors are adjusted, and the data acquisition II step S6 is executed.

[0106] S15, adjustment: calculate the extreme difference values ​​of the grayscale values ​​of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, perform negative correlation mapping on the accumulated values ​​of the extreme difference values ​​in all specified directions and normalize them to obtain local brightness consistency, take the product of the local brightness consistency and the discrete deviation value as the adjustment value, and uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value.

[0107] S16, judgment II: matching the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, the product is judged to be qualified. Otherwise, it is judged to have a suspected defect, and feedback I step S17 is executed;

[0108] S17, Feedback I: Issue an alarm and upload data to the management end.

[0109] The working principle of this embodiment is:

[0110] When in use, first obtain the grayscale image of the preset mask template surface stored in the system database as the preset grayscale image. The preset grayscale image usually includes but is not limited to texture structure areas under a specific distribution law, and specific pattern style areas, etc., and calculate the grayscale value distribution map of the preset grayscale image in the specified direction, thereby providing a reference for subsequent grayscale image analysis.

[0111] A first light source is set at a designated position. When the mask reaches the first irradiation area, the mask in the first irradiation area is irradiated. A first grayscale image of the mask surface is obtained through the first sensor to remove color interference, thereby accurately analyzing the surface texture and brightness information of the mask. The first grayscale image is error-matched with a preset grayscale image. A preset error is set according to a grayscale image in historical data, wherein the historical data usually comes from the error value between a preset grayscale image and a detected grayscale image of the mask. If the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged to be preliminarily qualified. Otherwise, it is judged to be defective. When it is judged to be defective, an alarm is issued and the data is uploaded to the management end.

[0112] N second light sources are set at designated positions, and the irradiation directions of the N second light sources are different. When the mask is preliminarily judged to be qualified, the N second light sources irradiate the second irradiation area in turn. N second sensors are set above the second irradiation area. The N second sensors obtain the grayscale image of the mask surface in the second irradiation area in turn according to the designated order to obtain N second grayscale images.

[0113] By calculating the gradient amplitude of the brightness change of each pixel in the specified direction in the N second grayscale images, a gradient threshold is set according to historical data, wherein the historical data usually comes from the gradient amplitude of the brightness change of the preset grayscale image and the grayscale image of the detected mask, the pixel points with gradient amplitude lower than the gradient threshold are counted, and the adjacent pixel points are merged into multiple shadow areas, and the grayscale average values ​​in the multiple shadow areas are respectively extracted, and the grayscale correction is performed on the local grayscale image corresponding to the shadow area according to the average value. Due to the different angles and intensities of ambient light and the materials of the mask, shadow areas may appear, and these shadow areas are easy to interfere with defect detection. The calculation of gradient amplitude and shadow correction can help reduce the probability of misjudgment due to environmental changes or external factors, improve the accuracy of shadow processing, and thus improve the detection accuracy of mask surface defects, and enhance the stability and reliability of detection.

[0114] The central pixel points of N second grayscale images are obtained respectively, and according to the N second light source irradiation directions input into the system and the corresponding second sensor positions, the corresponding second grayscale images are stitched according to a preset transformation relationship with each central pixel as the center, and the feature points between the images are found through a feature extraction algorithm, and the feature points are fused, and the stitched grayscale image is used as the third grayscale image. With such an arrangement, when used to detect facial masks with bubbles or local deformations, since the bubbles or local deformations can regularly present certain morphological characteristics under the influence of different light source angles, positions, light intensities and other factors, multiple second sensors are installed at corresponding positions to obtain grayscale images of the facial masks, so that the stitched third grayscale image retains these defects to a greater extent and enhances its recognition distinction, which can enhance the sensitivity to details and minor defects, accurately judge the obviousness of the defects, and improve the factory qualified rate of products. At the same time, it is helpful to eliminate the interference of false defects caused by external environmental factors, reduce the probability of misjudgment, and thereby improve the detection accuracy of facial mask surface defects.

[0115] The central pixel of the first grayscale image is obtained as the first pixel, and the central pixel of the third grayscale image is obtained as the third pixel. The grayscale value distribution of the first grayscale image and the third grayscale image is matched with the first pixel and the third pixel as the center. The splicing error is set according to the grayscale image in the historical data, wherein the historical data is usually derived from the grayscale value distribution diagram of the preset grayscale image and the grayscale image of the detected mask. If the error between the first grayscale image and the third grayscale image is less than the splicing error, it is judged that the splicing is successful, otherwise, it is judged that the splicing fails. When it is judged that the splicing fails, the data is fed back to the management end, so that the brightness, position, angle and quantity of the N second light sources are adjusted according to the splicing error and the matching result, and the irradiation II step is repeated, so as to improve the quality of the acquired image, effectively reduce the interference of human factors and environmental changes on the detection process, reduce the probability of misjudgment of defects, and thus improve the detection accuracy of surface defects of the mask.

[0116] When the splicing is judged to be successful, the Euclidean distance between the central pixel of the N second grayscale images and the first pixel is calculated respectively, which is recorded as the first distance set. The Euclidean distance between the central pixel of the N second grayscale images and the third pixel is calculated respectively, which is recorded as the second distance set. The next step of judgment is performed by calculating the correlation coefficient r between the first distance set and the second distance set, where the confidence is α∈(0,1). If |r|≥α, the splicing is judged to be credible. Otherwise, the splicing is judged to be suspicious. When the splicing is judged to be suspicious, the data is fed back to the management end. According to the judgment result, the angle, position, quantity, etc. of the N second sensors are adjusted, and the step of obtaining data II is repeated. Then, the detection process is intervened and adjusted by further calculation or manual intervention, and the interference of external factors and the interference of product sliding dislocation are timely eliminated to improve the accuracy and reliability of detection, reduce the waste of resources, and improve production efficiency.

[0117] When it is judged that this stitching is credible, the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution are calculated, and the accumulated value of the extreme value is negatively correlated and normalized to obtain the local brightness consistency. The product of the local brightness consistency and the discrete deviation value is used as the adjustment value, so that the grayscale of each pixel in the third grayscale image is uniformly added and adjusted according to the adjustment value. In the grayscale image of the ideal mask surface, the brightness of the local area is usually uniform, but in the actual production process, the illumination of the mask surface is easily disturbed by external factors and environmental factors, resulting in uneven distribution of grayscale values ​​in the local area. At the same time, foreign matter may remain or be uneven on the mask surface, which is also easy to affect the distribution of grayscale values. By judging the local brightness consistency and discrete deviation value, the pixels in the grayscale image are uniformly adjusted, which is conducive to reducing the probability of misjudgment and enhancing the sensitivity to details and minor defects, thereby improving the detection accuracy of mask surface defects.

[0118] The third grayscale image is matched with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, the product is judged to be qualified. Otherwise, it is judged to be a suspected defect, an alarm is issued, and the data is uploaded to the management end. With such a setting, when used to detect facial masks with bubbles or local deformations, since bubbles or local deformations can regularly present certain morphological characteristics under the influence of different light source angles, positions, light intensities and other factors, multiple second sensors are installed at corresponding positions to obtain grayscale images of the facial masks, so that the spliced ​​third grayscale image retains these defects to a greater extent and enhances its recognition distinction, which can enhance the sensitivity to details and minor defects, accurately judge the obviousness of the defects, and improve the factory qualification rate of products. At the same time, it helps to eliminate the interference of false defects caused by external environmental factors, reduce the probability of misjudgment, and thereby improve the detection accuracy of facial mask surface defects.

[0119] The above disclosure is only a specific embodiment of the present invention, but the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.

Claims

1. Intelligent facial mask production detection system based on big data analysis, characterized in that: Includes the following modules: Preset module: The output end is connected to the input end of the irradiation module I, and is used to obtain a grayscale image of the surface of the mask template in the database as a preset grayscale image; Irradiation module I: the input end is connected to the output end of the preset module, and the output end is connected to the input end of the acquisition module I, and is used to set a first light source at a specified position to irradiate the first irradiation area; Acquisition module I: the input end is connected to the output end of the irradiation module I, and the output end is connected to the input end of the judgment module I, and is used to set a first sensor above the first irradiation area, and the first sensor acquires a grayscale image of the mask surface in the first irradiation area to obtain a first grayscale image; Judgment module I: the input end is connected to the output end of the acquisition module I, and the output end is respectively connected to the input end of the irradiation module II and the input end of the feedback module I, and is used to match the first grayscale image with the preset grayscale image, and set a preset error according to the grayscale image in the historical data. If the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged to be preliminarily qualified and the irradiation module II is executed. Otherwise, it is judged to be defective and the feedback module I is executed; Irradiation module II: the input end is connected to the output end of the judgment module I, and the output end is connected to the input end of the acquisition module II, and is used to respectively set N second light sources at designated positions, the irradiation directions of the N second light sources are different, and irradiate the second irradiation area once in sequence; Acquisition module II: the input end is connected to the output end of the irradiation module II, and the output end is connected to the input end of the processing module, and is used to set N second sensors above the second irradiation area, and the N second sensors sequentially acquire the grayscale image of the mask surface in the second irradiation area in a specified order to obtain N second grayscale images; Processing module: the input end is connected to the output end of the acquisition module II, and the output end is connected to the input end of the judgment module II, and is used to respectively obtain the central pixel points of the N second grayscale images, and according to the corresponding second light source illumination direction and the corresponding second sensor position, with each central pixel point as the center, the corresponding second grayscale images are spliced ​​according to the preset transformation relationship, the feature points are fused, and the spliced ​​grayscale image is used as the third grayscale image; Judgment module II: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the feedback module I, and is used to match the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, it is judged that the product is qualified. Otherwise, it is judged that there is a suspected defect and the feedback module I is executed; Feedback module I: The input end is connected to the output end of the judgment module I and the output end of the judgment module II respectively, and is used to issue an alarm and upload data to the management end.

2. The intelligent facial mask production and detection system based on big data analysis according to claim 1 is characterized in that: It also includes acquisition module III, judgment module III and feedback module II; Acquisition module III: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module III, and is used to acquire the central pixel point of the first grayscale image as the first pixel point, and acquire the central pixel point of the third grayscale image as the third pixel point; Judgment module III: the input end is connected to the output end of the acquisition module III, and the output end is respectively connected to the input end of the feedback module II and the input end of the judgment module II, and is used to match the first grayscale image and the third grayscale image with the first pixel point and the third pixel point as the center, and set the splicing error according to the grayscale image in the historical data. If the error between the first grayscale image and the third grayscale image is less than the splicing error, it is judged that the splicing is successful and the judgment module II is executed. Otherwise, it is judged that the splicing fails and the feedback module II is executed; Feedback module II: the input end is connected to the output end of the judgment module III, and the output end is connected to the input end of the illumination module II, and is used to adjust the brightness and position of the N second light sources according to the splicing error and the matching result.

3. The intelligent facial mask production and detection system based on big data analysis according to claim 1 is characterized in that: It also includes a correction module: the input end is connected to the output end of the acquisition module II, and the output end is connected to the input end of the processing module, which is used to calculate the gradient amplitude of the brightness change of each pixel point in the N second grayscale images in the specified direction, set the gradient threshold according to historical data, count the pixel points with gradient amplitude lower than the gradient threshold, and merge adjacent pixel points into multiple shadow areas, respectively extract the grayscale average values ​​in the multiple shadow areas, and perform grayscale correction on the local grayscale image corresponding to the shadow area according to the average value.

4. The intelligent facial mask production and detection system based on big data analysis according to claim 1 is characterized in that: It also includes an adjustment module: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module II, which is used to calculate the extreme difference values ​​of the grayscale values ​​of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, negatively correlate and normalize the accumulated values ​​of the extreme difference values ​​in all specified directions to obtain local brightness consistency, use the product of the local brightness consistency and the discrete deviation value as the adjustment value, and uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value.

5. The intelligent facial mask production and detection system based on big data analysis according to any one of claims 1 to 4, characterized in that: It also includes a calculation module, a judgment module IV and a feedback module III; Calculation module: the input end is connected to the output end of the processing module, and the output end is connected to the input end of the judgment module IV, and is used to respectively calculate the Euclidean distance between the central pixel point of the N second grayscale images and the first pixel point, which is recorded as a first distance set, and respectively calculate the Euclidean distance between the central pixel point of the N second grayscale images and the third pixel point, which is recorded as a second distance set; Judgment module IV: the input end is connected to the output end of the calculation module, and the output end is connected to the input end of the feedback module III and the input end of the judgment module II respectively, and is used to calculate the correlation coefficient r between the first distance set and the second distance set, and the confidence is α∈(0,1). If |r|≥α, it is judged that this splicing is credible and the judgment module II is executed. Otherwise, it is judged that this splicing is suspicious and the feedback module III is executed. Feedback module III: the input end is connected to the output end of the judgment module IV, and the output end is connected to the input end of the acquisition module II, and is used to adjust the angles and positions of the N second sensors according to the judgment result.

6. A smart mask production detection method based on big data analysis, characterized in that: The following steps are involved: Preset data: obtain a grayscale image of the mask template surface in the database as a preset grayscale image; Irradiation I: a first light source is set at a designated position to irradiate a first irradiation area; Acquiring data I: a first sensor is arranged above the first irradiation area, and the first sensor acquires a grayscale image of the surface of the mask in the first irradiation area to obtain a first grayscale image; Judgment I: Match the first grayscale image with the preset grayscale image, set a preset error according to the grayscale image in the historical data, if the error between the first grayscale image and the preset grayscale image is less than the preset error, it is judged as preliminarily qualified, and the irradiation II step is performed; otherwise, it is judged as defective, and the feedback I step is performed; Irradiation II: N second light sources are respectively arranged at designated positions, with the irradiation directions of the N second light sources being different, and the second irradiation areas are irradiated one by one in turn; Acquiring data II: N second sensors are arranged above the second irradiation area, and the N second sensors sequentially acquire grayscale images of the mask surface in the second irradiation area in a specified order to obtain N second grayscale images; Processing data: obtaining the central pixel points of N second grayscale images respectively, and according to the corresponding second light source illumination direction and the corresponding second sensor position, taking each central pixel point as the center, performing image stitching on the corresponding second grayscale images according to a preset transformation relationship, and fusing the feature points, and using the stitched grayscale images as the third grayscale image; Judgment II: Match the third grayscale image with the preset grayscale image. If the error between the third grayscale image and the preset grayscale image is less than the preset error, the product is judged to be qualified. Otherwise, it is judged to have a suspected defect and the feedback step I is executed; Feedback I: Issue an alarm and upload the data to the management terminal.

7. The intelligent facial mask production detection method based on big data analysis according to claim 6 is characterized in that: Between the data processing step and the judgment II step, there are also provided a data acquisition III step, a judgment III step and a feedback II step; Acquiring data III: acquiring a central pixel point of the first grayscale image as a first pixel point, and acquiring a central pixel point of the third grayscale image as a third pixel point; Judgment III: With the first pixel point and the third pixel point as the center, the first grayscale image and the third grayscale image are matched, and a stitching error is set according to the grayscale image in the historical data. If the error between the first grayscale image and the third grayscale image is less than the stitching error, it is judged that the stitching is successful and the judgment II step is executed. Otherwise, it is judged that the stitching fails and the feedback II step is executed. Feedback II: According to the stitching error and the matching result, the brightness and position of the N second light sources are adjusted.

8. The intelligent facial mask production detection method based on big data analysis according to claim 6 is characterized in that: A correction step is also provided between the step of obtaining data II and the step of processing data; Correction: Calculate the gradient amplitude of the brightness change of each pixel in the N second grayscale images in the specified direction, set the gradient threshold according to historical data, count the pixels whose gradient amplitude is lower than the gradient threshold, merge adjacent pixels into multiple shadow areas, extract the grayscale average values ​​in the multiple shadow areas respectively, and perform grayscale correction on the local grayscale image corresponding to the shadow area according to the average value.

9. The intelligent facial mask production detection method based on big data analysis according to claim 6 is characterized in that: An adjustment step is also provided between the data processing step and the judgment II step; Adjustment: Calculate the extreme value of the grayscale value of all pixels in each specified direction in the third grayscale image and the discrete deviation value of the grayscale value distribution, perform negative correlation mapping on the accumulated value of the extreme value in all specified directions and normalize it to obtain local brightness consistency, take the product of the local brightness consistency and the discrete deviation value as the adjustment value, and uniformly add and adjust the grayscale of each pixel in the third grayscale image according to the adjustment value.

10. The intelligent facial mask production detection method based on big data analysis according to any one of claims 6 to 9, characterized in that: A calculation step, a judgment step IV and a feedback step III are also arranged between the data processing step and the judgment step II; Calculation: Calculate the Euclidean distances between the central pixel points of the N second grayscale images and the first pixel points, respectively, and record them as the first distance set; calculate the Euclidean distances between the central pixel points of the N second grayscale images and the third pixel points, respectively, and record them as the second distance set; Judgment IV: Calculate the correlation coefficient r between the first distance set and the second distance set, with a confidence level of α∈(0,1). If |r|≥α, then the splicing is judged to be credible and the judgment step II is executed. Otherwise, the splicing is judged to be suspicious and the feedback step III is executed. Feedback III: According to the judgment result, the angles and positions of the N second sensors are adjusted.

Citation Information

Patent Citations

  • PVC facing film detection method and device

    CN108820953A

  • Textile surface defect detection system and method based on artificial intelligence

    CN119780094A