Ink-jet printer intelligent monitoring method, system and device and storage medium
By applying image-enhanced convolutional neural network and cluster analysis technology in the ink printer, the ink image processing and feature point detection are solved, and the subjectivity and inefficiency of the existing ink quantity detection methods are realized. High-precision coded position monitoring.
Patent Information
- Application Number
- CN202411437168.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-02-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing ink quantity detection methods of ink quantity of ink of ink printers have problems such as strong subjectivity, low efficiency and low detection accuracy, especially when the pixel values of the ink-coded text and background are unevenly distributed.
Image-enhanced convolutional neural network is used to process the inkjet-coded images, combine cluster analysis and feature point detection, calculate the degree of chaos and evaluate the accuracy of the inkjet-coded location through the offset algorithm.
It improves the efficiency of inkjet image detection, improves monitoring accuracy, and accurately evaluates the accuracy of the inkjet location, thereby achieving high-precision monitoring of the inkjet accuracy.
Smart Images

Figure CN119417769A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an intelligent monitoring method, system, device and storage medium for inkjet printers. Background Art
[0002] In recent years, many companies have adopted the form of spraying codes on the outer packaging of products to directly identify product information, such as the manufacturer, production date, and shelf life. In the process of spraying codes, the amount of ink sprayed by the printer is affected by many factors. Usually, the product information is directly identified by spraying codes on the product packaging, such as production time and manufacturer. However, in the process of spraying codes, there are often problems such as substandard product quality. The color and density of the ink printed by the printer can reflect whether the amount of ink printed by the printer is normal. For example, the ink color is too light or too dark than the normal color, or the ink density is insufficient or excessive, which are all manifestations of abnormal ink volume printed by the printer. In addition, different environmental factors, such as temperature and humidity, may affect the evaporation rate of the ink. Therefore, if the amount of ink printed is too high, the ink will drip onto the outer packaging of the product, causing uneven distribution of ink on the outer packaging of the product, which not only affects the appearance of the product packaging, but also brings safety hazards to the product. The printer printing quality control should be checked regularly in the factory to ensure the quality of product packaging.
[0003] At present, the main method of detecting the ink volume of inkjet printers is through manual observation, and the operator's experience is used to judge whether the inkjet printer has blurred inkjet codes or uneven ink volume. However, this method of manual observation has problems such as strong subjectivity and low efficiency. In addition, most factories use computer technology to automatically detect inkjet codes. The specific method is to input the inkjet code image of each product outer packaging into the computer and complete the inkjet code blur detection in the computer. Although this method greatly improves efficiency, it does not take into account the problem of uneven pixel value distribution between the inkjet code text and the background in the image. The proportion of inkjet code text is small and unevenly distributed. The grayscale value of each individual text pixel is inconsistent with the grayscale value of other text pixels, resulting in too rough detection results and low monitoring accuracy. Summary of the invention
[0004] The present invention provides an intelligent monitoring method, system, device and storage medium for inkjet printers, so as to improve the efficiency of inkjet printer image detection and enhance the monitoring accuracy.
[0005] In the first aspect, in order to solve the above technical problems, the present invention provides an intelligent monitoring method for inkjet printers, comprising:
[0006] Obtain coding image data;
[0007] Inputting the coding image data into an image enhancement convolutional neural network to obtain a first image;
[0008] Performing clustering processing on the first image to calculate a first disorder degree;
[0009] Performing filtering processing on the first image to obtain a set of feature points;
[0010] Inputting the feature point set into a first classification model to obtain a similar feature set;
[0011] Calculating a second degree of confusion according to the similar feature set;
[0012] According to the first disorder degree and the second disorder degree, an offset is calculated by an offset algorithm, and the offset is compared with a preset detection threshold to obtain a detection result.
[0013] Preferably, the step of inputting the coding image data into an image enhancement convolutional neural network to obtain a first image comprises:
[0014] Normalizing the inkjet coding image data to obtain a normalized image;
[0015] The normalized image is input into an image enhancement convolutional neural network to obtain a first image, wherein the value of each pixel of the first image represents the probability of containing coded text.
[0016] Preferably, performing clustering processing on the first image to calculate the first disorder degree includes:
[0017] comparing the value of each pixel of the first image with a preset text threshold;
[0018] Extracting a sample image from the first image, wherein a value of each pixel of the sample image is greater than a preset text threshold;
[0019] Performing cluster analysis on the sample images to obtain sample centers of various categories;
[0020] Calculating the distance between the sample centers;
[0021] The first disorder degree is calculated by the following formula:
[0022]
[0023] Among them, H1 is the first degree of confusion, N is the total number of categories, d(c i , c j ) is the distance between category i and category j, n i is the total number of pixels of category i, n j is the total number of pixels of category j, is the average distance.
[0024] Preferably, the training process of the first classification model includes:
[0025] Obtain historical inkjet image data;
[0026] According to the historical inkjet image data, a historical first image is obtained through the image enhancement convolutional neural network;
[0027] Performing filtering processing on the historical first image to obtain a set of historical feature points;
[0028] Establishing a positive sample set and a negative sample set based on the distance between each feature point and all feature points in the historical feature point set and the image edge pixel value in the first image;
[0029] The positive sample set and the negative sample set are used to train a first classification model through an ensemble learning method.
[0030] Preferably, the calculating the second disorder degree according to the similar feature set comprises:
[0031] Calculating the distance between any two similar features in the similar feature set to obtain a distance matrix;
[0032] The average value of all elements in the distance matrix is calculated to obtain the second disorder degree.
[0033] Preferably, the calculating of the offset by an offset algorithm according to the first disorder degree and the second disorder degree, and comparing the offset with a preset detection threshold to obtain a detection result includes:
[0034] Performing a weighted operation according to the first disorder degree, the second disorder degree and a preset factor to obtain a second image;
[0035] Processing the second image using an edge detection operator to obtain an offset;
[0036] If the offset is greater than the preset detection threshold, the detection result is that the coding position is inaccurate;
[0037] If the offset is less than the preset detection threshold, the detection result is that the coding position is accurate.
[0038] Preferably, the sample image includes a plurality of local images, each of which has a pixel size of 64×64; and the local images contain pixel points whose pixel values are greater than a preset threshold.
[0039] In a second aspect, the present invention provides an intelligent monitoring system for inkjet printers, comprising:
[0040] A data acquisition module, used to acquire coding image data;
[0041] A first image module, used for inputting the coding image data into an image enhancement convolutional neural network to obtain a first image;
[0042] A first disorder module, used for performing clustering processing on the first image to calculate a first disorder degree;
[0043] A feature extraction module, used for performing filtering processing on the first image to obtain a feature point set;
[0044] A similar feature module, used for inputting the feature point set into a first classification model to obtain a similar feature set;
[0045] A second chaos module, used for calculating a second chaos degree according to the similar feature set;
[0046] The result detection module is used to calculate an offset according to the first disorder degree and the second disorder degree through an offset algorithm, and compare the offset with a preset detection threshold to obtain a detection result.
[0047] In a third aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the intelligent monitoring method for inkjet printers described in any one of the above is implemented.
[0048] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned inkjet printer intelligent monitoring methods.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] The present invention relates to the field of image processing technology, and discloses an intelligent monitoring method, system, device and storage medium for inkjet printers. The method comprises the following steps: obtaining inkjet image data; inputting the inkjet image data into an image enhancement convolutional neural network to obtain a first image; performing clustering processing on the first image to calculate a first degree of confusion; performing filtering processing on the first image to obtain a feature point set, and using the feature point set as a sample set to train a first classification model; inputting the feature point set into the first classification model to obtain a similar feature set; calculating a second degree of confusion according to the similar feature set; calculating an offset according to the first degree of confusion and the second degree of confusion through an offset algorithm, and comparing the offset with a preset detection threshold to obtain a detection result. The method realizes efficient and accurate monitoring of inkjet quality by comprehensively using technologies such as image processing, neural network, cluster analysis and feature point detection. By using a neural network to perform text detection on an inkjet image, the inkjet text area can be accurately identified, providing a reliable basis for subsequent analysis. By performing segmentation and cluster analysis on the inkjet image, calculating the first degree of confusion, and combining the concept of the number of pixels in the local image, the accuracy of the feature point extraction result is improved. Feature point detection is introduced and a classification model is established. Positive and negative feature points are judged based on the positional relationship between feature points and the similarity of edge gradients, eliminating the influence of interfering textures and improving the accuracy of monitoring. Combining the first and second levels of confusion, the offset is calculated by the Canny operator and compared with the preset threshold, which can accurately evaluate the accuracy of the inkjet printer position, thereby achieving high-precision monitoring of the inkjet printer accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic flow chart of an intelligent monitoring method for a printer provided by the first embodiment of the present invention;
[0052] Figure 2 It is a schematic diagram of the structure of an intelligent monitoring system for inkjet printers provided in the second embodiment of the present invention. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0054] In recent years, many companies have adopted the form of spraying codes on the outer packaging of products to directly identify product information, such as the manufacturer, production date, and shelf life. In the process of spraying codes, the amount of ink sprayed by the printer is affected by many factors. Usually, the product information is directly identified by spraying codes on the product packaging, such as production time and manufacturer. However, in the process of spraying codes, there are often problems such as substandard product quality. The color and density of the ink printed by the printer can reflect whether the amount of ink printed by the printer is normal. For example, the ink color is too light or too dark than the normal color, or the ink density is insufficient or excessive, which are all manifestations of abnormal ink volume printed by the printer. In addition, different environmental factors, such as temperature and humidity, may affect the evaporation rate of the ink. Therefore, if the amount of ink printed is too high, the ink will drip onto the outer packaging of the product, causing uneven distribution of ink on the outer packaging of the product, which not only affects the appearance of the product packaging, but also brings safety hazards to the product. The printer printing quality control should be checked regularly in the factory to ensure the quality of product packaging.
[0055] At present, the main method of detecting the ink volume of inkjet printers is through manual observation, and the operator's experience is used to judge whether the inkjet printer has blurred inkjet codes or uneven ink volume. However, this method of manual observation has problems such as strong subjectivity and low efficiency. In addition, most factories use computer technology to automatically detect inkjet codes. The specific method is to input the inkjet code image of each product outer packaging into the computer and complete the inkjet code blur detection in the computer. Although this method greatly improves efficiency, it does not take into account the problem of uneven pixel value distribution between the inkjet code text and the background in the image. The proportion of inkjet code text is small and unevenly distributed. The grayscale value of each individual text pixel is inconsistent with the grayscale value of other text pixels, resulting in too rough detection results and low monitoring accuracy.
[0056] Reference Figure 1 The first embodiment of the present invention provides an intelligent monitoring method for a printer, comprising the following steps:
[0057] S11, obtaining inkjet printing image data;
[0058] S12, inputting the coding image data into an image enhancement convolutional neural network to obtain a first image;
[0059] S13, performing clustering processing on the first image to calculate a first disorder degree;
[0060] S14, performing filtering processing on the first image to obtain a feature point set;
[0061] S15, inputting the feature point set into a first classification model to obtain a similar feature set;
[0062] S16, calculating a second disorder degree according to the similar feature set;
[0063] S17, calculating an offset according to the first disorder degree and the second disorder degree by using an offset algorithm, and comparing the offset with a preset detection threshold to obtain a detection result.
[0064] In step S11, the coding image data is acquired.
[0065] In one embodiment, the specific process of obtaining the inkjet coding image data is as follows: a high-precision image acquisition device, such as an industrial-grade camera or a high-speed camera, is installed under the inkjet printer to ensure that the inkjet coding image on the product outer packaging can be captured in real time and accurately. When the product is coded by the inkjet printer, the image acquisition device automatically triggers and captures an image containing the coded text and its background. During the image acquisition process, the relevant parameters of the inkjet printer are recorded at the same time, including but not limited to the operating status, coding frequency, and coding time at the time of coding. The collected original inkjet coding image data must have sufficient resolution and clarity to facilitate subsequent image preprocessing and feature extraction. Furthermore, in order to ensure image quality, the shooting environment must be optimized, such as adjusting the lighting conditions to ensure that the contrast between the coded text and the background in the image is sufficiently obvious. Furthermore, the acquired inkjet coding image data will serve as the basis and data source for subsequent analysis.
[0066] It is worth mentioning that industrial-grade cameras are designed for industrial environments and support resolutions ranging from several million pixels to tens or even hundreds of millions of pixels, which can capture very subtle details. The global exposure technology is used to ensure that there is no rolling shutter effect when shooting moving objects, and the integrity of the image is maintained. At the same time, it supports various standard data transmission protocols, such as GigE, USB3.0, Camera Link, etc., which are easy to integrate into different system architectures. Continuously capture images during the coding process to provide basic information for subsequent quality assessment. By comparing the coding pattern with the template, any possible defects such as blurred ink, missing characters, position offset, etc. are identified. Further combined with the feedback control system, the coding parameters such as nozzle voltage and ink flow are automatically adjusted according to the image analysis results to maintain the best printing effect. High-precision image acquisition devices are an indispensable part of the intelligent monitoring system of inkjet printers. They not only provide a reliable data source, but also lay a solid foundation for realizing automated quality control.
[0067] In step S12, the inkjet image data is input into an image enhancement convolutional neural network to obtain a first image, including: normalizing the inkjet image data to obtain a normalized image; inputting the normalized image into an image enhancement convolutional neural network to obtain a first image, wherein the value of each pixel of the first image represents the probability of containing inkjet text.
[0068] In one embodiment, the original inkjet image data obtained by a high-precision image acquisition device is fed into a pre-trained image enhancement convolutional neural network. The neural network is specially designed and trained to effectively extract features and enhance the input inkjet image. During the processing of the neural network, the value of each pixel point will be recalculated, and the new value reflects the probability that the position contains the inkjet text. The output after the neural network processing is the first image, in which the value of each pixel point represents the possibility that the original inkjet image contains the inkjet text.
[0069] It is worth mentioning that normalization is a common preprocessing step that can improve the training efficiency and performance of the model. Assume that the data type of the original image is uint8, which means that the range of each pixel value is from 0 to 255. Normalization can be achieved by dividing each pixel value of the image by 255, so that the pixel value ranges from 0 to 1. The dimension of the image should be kept unchanged during the normalization process, that is, the normalized image should have the same width, height, and number of channels as the original image.
[0070] In one embodiment, normalized images are input into the neural network, and these images have been normalized to grayscale images. The encoder part of the image enhancement convolutional network consists of multiple convolutional layers, each layer extracts different features of the image through convolution operations. The output of each layer is subjected to a maximum pooling operation to reduce the spatial dimension and increase the number of channels. The decoder part is symmetrical with the encoder, and gradually restores the spatial resolution of the image through transposed convolution or bilinear interpolation. The decoder part also merges the feature map of the encoder through jump connections to retain more detailed information. After multiple layers of convolution and pooling operations, the encoder part generates multiple feature maps of different scales. These feature maps contain high-level semantic information in the image. The decoder part gradually restores the resolution of the image through upsampling operations, and combines low-level features with high-level features through jump connections to form a richer feature representation. In the last layer of the decoder, a 1x1 convolution kernel is usually used to generate the final output feature map. Each pixel of this feature map represents the probability value of the location containing the coded text. The activation function of the output layer can be a sigmoid function to ensure that the output value is between [0, 1]. In order to train the network, it is necessary to prepare a labeled data set, in which each pixel has a label indicating whether it belongs to the coded text area. Furthermore, commonly used loss functions include Binary Cross-Entropy Loss, which is used to measure the difference between the predicted probability and the true label. An optimization algorithm is used to minimize the loss function, thereby adjusting the network parameters so that the model can better fit the training data.
[0071] In step S13, clustering is performed on the first image to calculate a first degree of confusion, including:
[0072] comparing the value of each pixel of the first image with a preset text threshold;
[0073] Extracting a sample image from the first image, wherein a value of each pixel of the sample image is greater than a preset text threshold;
[0074] Performing cluster analysis on the sample images to obtain sample centers of various categories;
[0075] Calculating the distance between the sample centers;
[0076] The first disorder degree is calculated by the following formula:
[0077]
[0078] Among them, H1 is the first degree of confusion, N is the total number of categories, d(c i , c j ) is the distance between category i and category j, ni is the total number of pixels of category i, n j is the total number of pixels of category j, is the average distance.
[0079] It is worth noting that the preset text threshold is used to distinguish which pixels belong to the coded text area and which belong to the background area. The threshold can be determined by analyzing the pixel value histogram of the first image. Specifically, a double peak in the histogram can be found, one corresponding to the background and the other corresponding to the text, and then the valley value between the two peaks is selected as the threshold.
[0080] In another implementation, some sample images can be manually annotated to clearly indicate which pixels belong to text and which belong to background. A suitable threshold can be calculated from these annotated data. A machine learning method, such as support vector machine or logistic regression, is used to learn a classifier from the annotated data, which can directly output the probability of whether each pixel belongs to text. Then the threshold is set according to the probability.
[0081] In one embodiment, a sample image is extracted from a first image, wherein the value of each pixel of the sample image is greater than a preset text threshold. Then, a K-means clustering algorithm is used to perform cluster analysis on the pixels in the sample image. Specifically, a suitable number of clusters K is selected, K center points are initialized, and then each pixel point is assigned to the category to which the center point closest to it belongs through an iterative optimization process, and the position of the center point is updated until the center point no longer changes significantly or a predetermined number of iterations is reached. Ultimately, each category will have a sample center representing the category, and these center points are the average values of the positions of all pixels in the category. In this way, the pixels in the sample image can be effectively grouped, and the representative center point of each category can be determined, providing a basis for the subsequent calculation of the distance between the sample centers and the first degree of confusion.
[0082] It is worth noting that the text area in the inkjet image has many specific features. The inkjet text usually has a high contrast, and the grayscale value of the text area will be significantly different from the background. For example, black text will appear as a low grayscale value on a white background. The edges of the text area are usually clear and can be extracted by edge detection algorithms (such as the Canny operator). Edge strength and direction are important features for distinguishing text from the background. Furthermore, the text is usually connected, that is, the pixels in the text are connected to each other. Independent text areas can be identified through connected domain analysis. The text has a specific shape and structure, such as straight lines, curves, and closed areas. These geometric features can be extracted and analyzed through morphological operations. The text area usually has a uniform texture, while the background contains noise or other interference. Methods such as Gabor filters can be used to extract texture features. The text usually has directional consistency, that is, the text in the same row or column has basically the same direction. This consistency can be analyzed by calculating methods such as the histogram of oriented gradients (HOG). In color images, the color of the text is usually significantly different from the background color. Color space conversion (such as RGB to HSV) and color segmentation techniques can be used to extract the text area. Text usually has a certain size range and proportion relationship. Through size screening and proportion constraints, some non-text areas can be excluded.
[0083] In step S14, the first image is filtered to obtain a feature point set, including: establishing a positive sample set and a negative sample set based on the distance between each feature point in the feature point set and all feature points, and the image edge pixel value in the first image; using the positive sample set and the negative sample set, through an integrated learning method, to train a first classification model.
[0084] In one embodiment, first, the first image is filtered to extract feature points that can effectively represent the text area. Common filtering methods include Gabor filtering, Sobel operator, Canny edge detection, etc. These methods can highlight the local structure and edge information in the image, thereby helping to identify the key features of the text area. Specifically, the texture features of the image can be extracted in multiple directions and scales using the Gabor filter. Further, after filtering, a series of feature points are extracted from the first image. These feature points are usually pixel positions with significant local changes, such as edges, corners, or areas with rich textures. In order to ensure the effectiveness and representativeness of the feature points, some feature detection algorithms can be applied, such as Harris corner detection, SIFT (Scale-Invariant Feature Transform) or SURF (Speeded Up Robust Features), which can stably detect feature points at different scales and rotations. The extracted feature point set is then used as a training sample set. Each feature point can be represented as a feature vector, which contains the position information of the point and the local feature descriptors around it. These feature vectors constitute a training data set for training the first classification model. The goal of the first classification model is to distinguish which feature points belong to the coded text and which belong to the background or other interference factors. The first classification model is usually trained using supervised learning methods, which requires the preparation of labeled training data. These data contain positive samples (known text feature points) and negative samples (non-text feature points). Common classification algorithms include support vector machines (SVM), random forests, Adaboost, etc. During the training process, the parameters of the classifier are optimized to maximize the model's ability to distinguish between positive and negative samples.
[0085] In step S15, the feature point set is input into a first classification model to obtain a similar feature set.
[0086] In one embodiment, a set of feature points extracted from the first image is used as input data and sent to a first classification model that has been trained. After the previous training stage, the classification model has the ability to distinguish between text feature points and non-text feature points. Each feature point is usually composed of its position coordinates and local feature descriptors, which can capture the texture, edges and other important information around the feature point. Further, based on the output of the classification model, those feature points that are judged to have a high probability of belonging to the text area are screened out. These feature points constitute a similar feature set. The screening criterion can be to set a threshold, for example, only when the probability given by the classification model exceeds a preset text threshold, such as 0.8, the feature point is included in the similar feature set. In addition, other methods can also be used, such as selecting the top N feature points with the highest scores, or using non-maximum suppression (NMS) to remove redundant feature points. Finally, the similar feature set obtained by the above steps contains those feature points with the highest probability of belonging to the coded text area.
[0087] In step S16, a second degree of confusion is calculated based on the similar feature set, including: calculating the distance between any two similar features in the similar feature set to obtain a distance matrix; and calculating the average value of all elements in the distance matrix to obtain the second degree of confusion.
[0088] It is worth noting that the second degree of chaos is the average value of all elements in the distance matrix. This average value reflects the consistency and dispersion between feature points in the similar feature set. If the distance between feature points is small and relatively consistent, it means that these feature points are relatively concentrated and the degree of chaos is low; on the contrary, if the distance between feature points is large and the difference is obvious, it means that these feature points are relatively dispersed and the degree of chaos is high.
[0089] In step S17, an offset is calculated according to the first degree of confusion and the second degree of confusion by an offset algorithm, and the offset is compared with a preset detection threshold to obtain a detection result, including: performing a weighted operation according to the first degree of confusion, the second degree of confusion and a preset preset factor to obtain a second image; using an edge detection operator to process the second image to obtain an offset; if the offset is greater than the preset detection threshold, the detection result is that the coding position is inaccurate; if the offset is less than the preset detection threshold, the detection result is that the coding position is accurate.
[0090] It is worth noting that the first degree of chaos represents the noise, irregularity or complexity in the image. The second degree of chaos represents the degree of chaos after some processing, which is the average distance calculated after screening the feature points using the classification model. The weight coefficient is used to adjust the degree of influence on the final result. The weighting operation can be implemented in many ways, the most common of which is a simple linear combination. Furthermore, in addition to linear combinations, nonlinear methods can also be used, such as multiplication, exponential functions or other custom functions. The generated second image is a new image. By adjusting the weight factor, the noise in the original image can be reduced to a certain extent. For example, if the first degree of chaos contains more noise, and the second degree of chaos is cleaner after screening, the impact of noise can be reduced by increasing the weight of the second degree of chaos. The second image can better reflect the consistency of the coding area.
[0091] In one embodiment, edge detection is performed on the second image and an offset is calculated. The purpose of edge detection is to extract the boundary of the coding area from the second image. This can be achieved by a variety of edge detection algorithms, such as Canny edge detection and Sobel operator. It is assumed that it is known that the coding should be located at a certain position in the image, and the actual edge position of the coding area has been extracted from the edge detection result. For each edge point, the Euclidean distance between it and the expected position is calculated to obtain the offset.
[0092] It is worth explaining the principle of edge detection. Edge detection is a basic task in computer vision and image processing. Its purpose is to identify areas in the image where the brightness or color changes significantly, which usually correspond to the boundaries of objects. The basic principle of edge detection is based on the grayscale or brightness changes between the local area of the image and the surrounding area. When this change reaches a certain degree, it is regarded as an edge. The core idea of edge detection is to calculate the gradient of each pixel in the image (that is, the direction and rate of brightness change). The magnitude of the gradient reflects the intensity of the brightness change, so the edge point usually corresponds to the pixel with a larger gradient. The edge detection algorithm can be based on the first-order derivative (gradient) or second-order derivative (Laplacian operator, etc.) of the image. The first-order derivative is used to detect the position of the edge, while the second-order derivative is used to detect the change of the edge.
[0093] It is worth noting that the offset often refers to the distance and direction that an object or feature in an image moves from one position to another. The offset can be estimated using the grayscale projection method by calculating the grayscale projections of the rows and columns of the two images and finding the difference between these projections. This method is based on the assumption that if an image is translated, the grayscale distribution of its rows or columns should change.
[0094] It is worth noting that the preset detection threshold sets a reasonable threshold based on historical data or industry standards. This threshold is used to distinguish between acceptable and unacceptable ranges of variation. If the offset is less than or equal to the preset threshold, the coding quality is considered to be within the acceptable range and the test result is "qualified". If the offset is greater than the preset threshold, the coding quality is considered to be beyond the acceptable range, the test result is "unqualified", and the printer may need to be adjusted or maintained. The fluctuation range of the degree of chaos during normal operation can be determined by analyzing the data of the printer's operation over a period of time. Perform multiple tests under controlled conditions to observe the changes in the coding effect under different settings, and use this to set the threshold.
[0095] In summary, the present invention discloses an intelligent monitoring method for inkjet printers, which aims to improve the efficiency of inkjet quality control and reduce manual intervention. This method is of great significance in modern industrial production. The method first collects various key parameters in the inkjet process in real time through a high-precision sensor installed on the inkjet printer, including but not limited to nozzle pressure, ink droplet speed, nozzle position, etc. These data provide a basis for subsequent analysis. Then, the printing pattern is captured and analyzed using advanced image recognition technology. The quality indicators of the pattern, such as clarity, consistency, offset, etc., are quantified by comparing the standard template with the actual printing result. Among them, the offset is one of the key indicators for measuring the accuracy of inkjet printing, and its calculation is based on the difference between the first degree of confusion (i.e., the inkjet quality under ideal conditions) and the second degree of confusion (i.e., the actual inkjet quality currently detected). This difference can be achieved through a variety of algorithms, such as direct difference method or more complex feature matching technology. Once a specific offset value is obtained, it is compared with a preset detection threshold. The determination of the preset detection threshold usually depends on a comprehensive consideration of historical data, statistical characteristics, industry standards and field experience. When the offset exceeds the set threshold, it indicates that there are quality problems with the current inkjet printing, and corresponding measures need to be taken to correct it. In addition, in order to further improve the intelligence level of the system, a machine learning model is introduced to predict potential failure trends, automatically adjust working parameters, and optimize the entire production line process to achieve optimal performance. The intelligent monitoring method for inkjet printers provided by the present invention not only improves the degree of automation of product quality management, reduces the uncertainty caused by human factors, and improves overall competitiveness.
[0096] Reference Figure 2 The second embodiment of the present invention provides an intelligent monitoring system for inkjet printers, comprising:
[0097] A data acquisition module, used to acquire coding image data;
[0098] A first image module, used for inputting the coding image data into an image enhancement convolutional neural network to obtain a first image;
[0099] A first disorder module, used for performing clustering processing on the first image to calculate a first disorder degree;
[0100] A feature extraction module, used for performing filtering processing on the first image to obtain a feature point set;
[0101] A similar feature module, used for inputting the feature point set into a first classification model to obtain a similar feature set;
[0102] A second chaos module, used for calculating a second chaos degree according to the similar feature set;
[0103] The result detection module is used to calculate an offset according to the first disorder degree and the second disorder degree through an offset algorithm, and compare the offset with a preset detection threshold to obtain a detection result.
[0104] Preferably, the data acquisition module is used to:
[0105] Get the coding image data.
[0106] Preferably, the first image module is used to:
[0107] The coding image data is input into an image enhancement convolutional neural network to obtain a first image, including:
[0108] Normalizing the inkjet coding image data to obtain a normalized image;
[0109] The normalized image is input into an image enhancement convolutional neural network to obtain a first image, wherein the value of each pixel of the first image represents the probability of containing coded text.
[0110] Preferably, the first confusion module is used to:
[0111] Performing clustering processing on the first image to calculate a first disorder degree includes:
[0112] comparing the value of each pixel of the first image with a preset text threshold;
[0113] Extracting a sample image from the first image, wherein a value of each pixel of the sample image is greater than a preset text threshold;
[0114] Performing cluster analysis on the sample images to obtain sample centers of various categories;
[0115] Calculating the distance between the sample centers;
[0116] The first disorder degree is calculated by the following formula:
[0117]
[0118] Among them, H1 is the first degree of confusion, N is the total number of categories, d(c i , c j ) is the distance between category i and category j, n i is the total number of pixels of category i, n j is the total number of pixels of category j, is the average distance.
[0119] Preferably, the feature extraction module is used to:
[0120] The first image is filtered to obtain a feature point set.
[0121] The training process of the first classification model includes:
[0122] Acquire historical inkjet image data; obtain a historical first image through the image enhancement convolutional neural network based on the historical inkjet image data; filter the historical first image to obtain a historical feature point set; establish a positive sample set and a negative sample set based on the distance between each feature point and all feature points in the historical feature point set, and the image edge pixel value in the first image; use the positive sample set and the negative sample set to train a first classification model through an ensemble learning method.
[0123] Preferably, the similar feature module is used to:
[0124] The feature point set is input into a first classification model to obtain a similar feature set.
[0125] Preferably, the second chaos module is used to:
[0126] Calculating a second degree of confusion according to the similar feature set includes:
[0127] Calculating the distance between any two similar features in the similar feature set to obtain a distance matrix;
[0128] The average value of all elements in the distance matrix is calculated to obtain the second disorder degree.
[0129] Preferably, the result detection module is used to:
[0130] According to the first disorder degree and the second disorder degree, an offset is calculated by an offset algorithm, and the offset is compared with a preset detection threshold to obtain a detection result, including:
[0131] Performing a weighted operation according to the first disorder degree, the second disorder degree and a preset factor to obtain a second image;
[0132] Processing the second image using an edge detection operator to obtain an offset;
[0133] If the offset is greater than the preset detection threshold, the detection result is that the coding position is inaccurate;
[0134] If the offset is less than the preset detection threshold, the detection result is that the coding position is accurate.
[0135] Preferably, the sample image includes a plurality of local images, each of which has a pixel size of 64×64; and the local images contain pixel points whose pixel values are greater than a preset threshold.
[0136] It should be noted that the intelligent monitoring system for inkjet printers provided in an embodiment of the present invention is used to execute all process steps of the intelligent monitoring method for inkjet printers in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be elaborated on.
[0137] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as an edge detection program. When the processor executes the computer program, the steps in the above-mentioned embodiments of the intelligent monitoring method for inkjet printers are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the data acquisition module.
[0138] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.
[0139] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0140] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.
[0141] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0142] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0143] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0144] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for intelligent monitoring of inkjet printers, characterized in that: include: Obtain coding image data; Inputting the coding image data into an image enhancement convolutional neural network to obtain a first image; Performing clustering processing on the first image to calculate a first disorder degree; Performing filtering processing on the first image to obtain a set of feature points; Inputting the feature point set into a first classification model to obtain a similar feature set; Calculating a second degree of confusion according to the similar feature set; According to the first disorder degree and the second disorder degree, an offset is calculated by an offset algorithm, and the offset is compared with a preset detection threshold to obtain a detection result.
2. The intelligent monitoring method for inkjet printer according to claim 1 is characterized in that: The step of inputting the coding image data into an image enhancement convolutional neural network to obtain a first image comprises: Normalizing the inkjet coding image data to obtain a normalized image; The normalized image is input into an image enhancement convolutional neural network to obtain a first image, wherein the value of each pixel of the first image represents the probability of containing coded text.
3. The intelligent monitoring method for inkjet printer according to claim 1 is characterized in that: The performing clustering processing on the first image to calculate a first disorder degree includes: comparing the value of each pixel of the first image with a preset text threshold; Extracting a sample image from the first image, wherein a value of each pixel of the sample image is greater than a preset text threshold; Performing cluster analysis on the sample images to obtain sample centers of various categories; Calculating the distance between the sample centers; The first disorder degree is calculated by the following formula: Among them, H1 is the first degree of confusion, N is the total number of categories, d(c i , c j ) is the distance between category i and category j, n i is the total number of pixels of category i, n j is the total number of pixels of category j, is the average distance.
4. The intelligent monitoring method for inkjet printer according to claim 1 is characterized in that: The training process of the first classification model includes: Obtain historical inkjet image data; According to the historical inkjet image data, a historical first image is obtained through the image enhancement convolutional neural network; Performing filtering processing on the historical first image to obtain a set of historical feature points; Establishing a positive sample set and a negative sample set based on the distance between each feature point and all feature points in the historical feature point set and the image edge pixel value in the first image; The positive sample set and the negative sample set are used to train a first classification model through an ensemble learning method.
5. The intelligent monitoring method for inkjet printer according to claim 1 is characterized in that: The calculating a second degree of confusion according to the similar feature set comprises: Calculating the distance between any two similar features in the similar feature set to obtain a distance matrix; The average value of all elements in the distance matrix is calculated to obtain the second disorder degree.
6. The intelligent monitoring method for inkjet printer according to claim 1, characterized in that: The method of calculating an offset according to the first disorder degree and the second disorder degree by using an offset algorithm, and comparing the offset with a preset detection threshold to obtain a detection result includes: Performing a weighted operation according to the first disorder degree, the second disorder degree and a preset factor to obtain a second image; Processing the second image using an edge detection operator to obtain an offset; If the offset is greater than the preset detection threshold, the detection result is that the coding position is inaccurate; If the offset is less than the preset detection threshold, the detection result is that the coding position is accurate.
7. The intelligent monitoring method for inkjet printer according to claim 3 is characterized in that: The sample image includes a plurality of local images, each of which has a pixel size of 64×64; the local images contain pixel points whose pixel values are greater than a preset threshold.
8. An intelligent monitoring system for inkjet printers, characterized in that: include: A data acquisition module, used to acquire coding image data; A first image module, used for inputting the coding image data into an image enhancement convolutional neural network to obtain a first image; A first disorder module, used for performing clustering processing on the first image to calculate a first disorder degree; A feature extraction module, used for performing filtering processing on the first image to obtain a feature point set; A similar feature module, used for inputting the feature point set into a first classification model to obtain a similar feature set; A second chaos module, used for calculating a second chaos degree according to the similar feature set; The result detection module is used to calculate an offset according to the first disorder degree and the second disorder degree through an offset algorithm, and compare the offset with a preset detection threshold to obtain a detection result.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the intelligent monitoring method for the inkjet printer as claimed in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the inkjet printer intelligent monitoring method as described in any one of claims 1 to 7.