Decorative paper defect detection method integrated with machine vision
By integrating machine vision technology, using the principles of inspection video and lens detection, and combining image feature quantization strategies, the problem of insufficient refined identification and positioning capabilities in decorative paper defect detection is solved, and high-accurate defect detection and positioning is achieved, and production efficiency and quality control are improved.
Patent Information
- Application Number
- CN202411938009.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2044-12-26
AI Technical Summary
The existing decorative paper defect detection technology has insufficient in the ability to identify and position in a refined manner, resulting in inaccurate defect identification and unclear classification, which cannot meet production needs, and affects quality control and production efficiency.
The method of fused machine vision is adopted to collect the inspection video of decorative paper through patrol inspection, segment the video based on the lens detection principle, extract the image sequence of the first lens, and then integrate the image through calibration enhancement processing, introduce an image feature quantization strategy, acquire feature values and compare with the predetermined feature value threshold, remove the first frame image to generate the image sequence to be detected, and determine whether the feature value of the image to be detected meets the threshold. If it is matched, the first frame image will be identified as a defective image.
It realizes accurate identification and positioning of surface defects of decorative paper, improves the accuracy and efficiency of defect detection, meets production needs, and improves quality control and production efficiency.
Smart Images

Figure CN119693854B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of defect detection, and in particular to a decorative paper defect detection method integrating machine vision. Background Art
[0002] Decorative paper is widely used in industries such as furniture, home appliances, construction and packaging, and its quality directly affects the appearance and service life of the final product. Traditional decorative paper defect detection relies on manual inspection or simple automated equipment. Existing methods are inefficient, costly and prone to human errors. With the development of intelligent manufacturing and industrial automation, machine vision and image processing technologies are gradually applied to the automated defect detection of decorative paper. However, the existing technology is insufficient in refined identification and positioning capabilities, and cannot accurately and comprehensively identify and locate various defects, resulting in low accuracy of defect identification, unclear classification, and even missed detection and false detection. Insufficiently accurate detection technology cannot meet production needs, affecting quality control and production efficiency. Therefore, there is an urgent need for a technical method that can solve the above problems and improve the accuracy and efficiency of defect detection, so as to improve the quality monitoring level in the production process of decorative paper and ensure that the product meets high quality requirements.
[0003] In the current related technologies, there is a lack of refined recognition and positioning capabilities in the decorative paper defect detection method, which leads to technical problems such as inaccurate defect identification and unclear classification. Summary of the invention
[0004] The present application provides a decorative paper defect detection method integrated with machine vision, which collects inspection videos of target decorative paper through inspection; segments the video based on the lens detection principle to extract the image sequence of the first lens; fuses the image sequence after calibration and enhancement to obtain a first decorative fused image; introduces an image feature quantization strategy to obtain the eigenvalue of the image and compares it with a predetermined eigenvalue threshold; if the eigenvalue does not meet the threshold, the first frame image is discarded to generate a sequence of images to be inspected; determines whether the eigenvalue of the image to be inspected meets the threshold, and if so, identifies the first frame image as a defective image, thereby achieving the technical effect of accurately identifying and locating surface defects of decorative paper.
[0005] This application provides a decorative paper defect detection method integrating machine vision, including:
[0006] Step S100: inspect and collect the target decorative paper to obtain the target inspection video; Step S200: segment the target inspection video based on the lens detection principle to obtain the target segmentation result, and extract the first image sequence of the first lens in the target segmentation result; Step S300: fuse the first lens image sequence after calibration and enhancement to obtain the first decoration fusion image; Step S400: introduce the image feature quantization strategy to obtain the first eigenvalue of the first decoration fusion image, and judge whether the first eigenvalue meets the first predetermined eigenvalue threshold of the first lens; Step S500: if the first eigenvalue does not meet the first predetermined eigenvalue threshold, remove the first frame image in the first image sequence to obtain the first image sequence to be inspected; Step S600: judge whether the second eigenvalue of the first decoration fusion image to be inspected obtained by fusing the first image sequence to be inspected meets the first predetermined eigenvalue threshold; Step S700: if the first eigenvalue meets the first predetermined eigenvalue threshold, take the first frame image as the defective image.
[0007] The decorative paper defect detection method integrating machine vision proposed in the present application first collects inspection videos of the target decorative paper through inspections; segment the video based on the lens detection principle to extract the image sequence of the first lens; after calibration and enhancement processing, the image sequence is fused to obtain a first decorative fused image; an image feature quantization strategy is introduced to obtain the eigenvalue of the image and compare it with a predetermined eigenvalue threshold; if the eigenvalue does not meet the threshold, the first frame image is discarded to generate a sequence of images to be inspected; it is determined whether the eigenvalue of the image to be inspected meets the threshold, and if so, the first frame image is identified as a defective image, thereby achieving the technical effect of accurately identifying and locating surface defects of decorative paper. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the accompanying drawings of the embodiment of the present invention will be briefly introduced below. A flow chart is used in the present application to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, various steps can be processed in reverse order or simultaneously as needed. At the same time, other operations can also be added to these processes, or one or more operations can be removed from these processes.
[0009] Figure 1 A schematic diagram of a flow chart of a decorative paper defect detection method integrating machine vision provided in an embodiment of the present application;
[0010] Figure 2 A schematic diagram of a defect location determination process of a decorative paper defect detection method integrating machine vision provided in an embodiment of the present application. DETAILED DESCRIPTION
[0011] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below.
[0012] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0013] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict, and the terms "first\second" involved are merely to distinguish similar objects and do not represent a specific ordering of objects. The terms "including" and "having" and any variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products, or devices. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of this application. The terms used herein are for the purpose of describing the embodiments of the present application only.
[0014] The present application embodiment provides a method for detecting decorative paper defects by integrating machine vision, such as Figure 1 As shown, the method includes:
[0015] Step S100: Inspect the target decorative paper and collect the target inspection video. Specifically, when inspecting the target decorative paper and collecting the target inspection video, you need to first select the camera equipment according to the size, shape, environment and detection accuracy of the decorative paper and install it stably, and adjust the shooting angle and other parameters. Then plan a reasonable inspection path, such as using a linear path for fixed plane decorative paper and a complex path for irregular ones, and combine the field of view and moving speed to avoid image problems. Then set the video acquisition parameters, such as resolution, frame rate, etc. At the same time, monitor the equipment and the picture in real time during the inspection, stop the inspection and adjust in time if there is a problem, and finally store the collected video in a large-capacity device in time, classify and record the collected information according to the rules, and provide reliable data for subsequent detection and evaluation.
[0016] Step S200: Segment the target inspection video based on the lens detection principle to obtain the target segmentation result, and extract the first image sequence of the first lens in the target segmentation result. Specifically, based on the lens detection principle, segment the target inspection video and extract the first image sequence of the first lens. The video needs to be read into the memory frame by frame, and then a multi-faceted feature analysis is performed. For the brightness feature, the image is converted to grayscale mode and the brightness difference matrix, mean, and standard deviation of adjacent frames are calculated, and compared with the set threshold; for the color histogram feature, the image is converted to HSV space, the histogram of each channel is counted and the difference is measured by Bhattacharyya distance, and it is marked if it exceeds the threshold; for the edge intensity feature, the Sobel operator is used to detect the edge, and the change rate of the number of edge pixels and the degree of direction change of adjacent frames are counted, and it is judged if it exceeds the threshold range; the texture feature uses the grayscale co-occurrence matrix to extract parameters, calculate the difference value of adjacent frames and compare it with the threshold. After the lens switching point is determined by combining the results of each feature analysis, the video is segmented, and the first segment is taken as the first lens in chronological order, and images are extracted frame by frame from it to form the first image sequence for subsequent operations.
[0017] Step S300: The first lens image sequence after calibration and enhancement is subjected to fusion processing to obtain a first decorative fused image. Specifically, the first lens image sequence after calibration and enhancement is subjected to fusion processing to obtain a first decorative fused image. Image calibration is required first, and the transformation matrix of adjacent frame images is determined by a method based on feature point matching (such as SIFT or SURF algorithm), and the geometric position is corrected. At the same time, the brightness and color balance are adjusted by brightness histogram and CIELAB color space conversion in optical characteristics to ensure consistency. Then, enhancement techniques such as spatial domain sharpening filtering and frequency domain high-pass filtering are used to improve image quality and clarity, and highlight edges and details. Then, a suitable fusion algorithm is selected, such as a pixel-level weighted average fusion algorithm, which calculates the fused pixel value by allocating weights according to image quality indicators, or a feature-level fusion method is used to extract image features (such as Haar and HOG features), and then fuse and reconstruct the image according to feature importance and stability, so as to obtain a first decorative fused image that integrates the advantage information of each frame, providing strong support for subsequent work.
[0018] Step S400: Introduce an image feature quantization strategy to obtain a first eigenvalue of the first decorative fusion image, and determine whether the first eigenvalue meets the first predetermined eigenvalue threshold of the first lens. Specifically, when introducing an image feature quantization strategy to obtain a first eigenvalue of the first decorative fusion image and determining whether it meets the first predetermined eigenvalue threshold, firstly, a quantization strategy should be selected based on the characteristics of the target decorative paper and possible defect types, such as using a grayscale co-occurrence matrix to calculate texture features such as contrast and energy, combining color histogram statistics to calculate color moments, and obtaining shape features through an edge detection algorithm, and then performing feature analysis and calculation on the first decorative fusion image, weighting and combining feature parameters of various aspects to obtain a first eigenvalue, and the weighting coefficient is determined based on experiments and data, and finally the first eigenvalue is compared with a first predetermined eigenvalue threshold determined by analyzing a large number of normal decorative paper images and combining with the detection requirements. If it is within the range, there is a high probability that there is no defect, and if it exceeds the range, there may be an abnormality, which provides a basis for subsequent defect troubleshooting and improves detection efficiency and accuracy.
[0019] In a possible implementation, step S400: introduce an image feature quantization strategy to obtain a first feature value of the first decoration fusion image, and determine whether the first feature value meets the first predetermined feature value threshold of the first lens. Step S400 further includes step S410, performing discrete cosine transform processing on the first decoration fusion image to obtain a first discrete cosine coefficient value. Specifically, the first decoration fusion image is subjected to discrete cosine transform processing to obtain the first discrete cosine coefficient value. The image needs to be divided into a number of non-overlapping sub-blocks of a size of usually 8×8 or 16×16 pixels to balance the amount of calculation and the effect of feature extraction. Then, for each sub-block, calculation is performed according to the discrete cosine transform formula, such as the frequency domain DCT coefficient F(u,v) corresponding to the pixel point (x, y) in the 8×8 sub-block, which is calculated by a specific formula, wherein the low-frequency coefficient reflects information such as large-area brightness, and the high-frequency coefficient corresponds to information such as edges and is concentrated at different positions of the sub-block. Finally, the coefficients of each sub-block are sorted and stored in row-first or column-first order to form the first discrete cosine coefficient value set, which provides an important data basis for subsequent image analysis, compression, defect detection and other tasks.
[0020] Step S420, weighted calculation is performed on the first DC coefficient value and the first AC coefficient value in the first discrete cosine coefficient value according to the image feature quantization strategy to obtain the first eigenvalue. Specifically, weighted calculation is performed on the first DC coefficient value and the first AC coefficient value in the first discrete cosine coefficient value according to the image feature quantization strategy to obtain the first eigenvalue. First, the DC coefficient value located at the upper left corner of the sub-block is extracted from the result of discrete cosine transform of the first decorative fusion image, which represents the average brightness information, and the rest are AC coefficient values, which reflect the details and texture features. Then, according to the target decorative paper characteristics, defect type and feature sensitivity analysis, and combined with the detection accuracy requirements and misjudgment tolerance, the weighted coefficients of the DC and AC coefficient values are determined, and appropriate weights are set according to sample analysis and accuracy requirements. Then, the DC and AC coefficients of each sub-block are calculated according to the weighted coefficients to obtain the sub-block eigenvalue, and finally all the sub-block eigenvalues are averaged to comprehensively obtain the first eigenvalue that can represent the overall characteristics of the image, so as to provide a quantitative basis for the subsequent judgment of whether the image has defects.
[0021] In a possible implementation, step S400: introduce an image feature quantization strategy to obtain a first feature value of the first decorative fusion image, and determine whether the first feature value meets the first predetermined feature value threshold of the first lens. Step S400 further includes step S430, obtaining a first image reference of the first lens. Specifically, to obtain the first image reference of the first lens, it is necessary to ensure that the shooting equipment parameters (such as resolution, frame rate, exposure time, white balance, etc.) are stable and appropriate when shooting the target inspection video, and set them according to the decorative paper situation, such as high resolution to detect minor defects, select the frame rate according to the dynamic scene, and shoot along the preset path to obtain a video containing the first lens. Then, based on the lens detection principle, the algorithm for analyzing the changes of multiple features of the image is used to segment the video to determine the first lens, which can be selected according to the order of appearance or the correlation with the key feature area. Then, the first lens image sequence is preprocessed, including calibrating the geometric position by feature point matching method, calibrating the optical characteristics by statistical brightness histogram and converting color space, and enhancing the image by spatial sharpening filtering and frequency domain high-pass filtering. Finally, according to the criteria such as the best image quality or the most representative average state, a frame is selected from the processed sequence as the first image benchmark to provide a reference for subsequent detection.
[0022] Step S440, according to the image feature quantization strategy, the first discrete cosine coefficient value benchmark after the discrete cosine transform of the first image benchmark is calculated to obtain the first eigenvalue benchmark. Specifically, to obtain the first eigenvalue benchmark, the first image benchmark needs to be discrete cosine transformed first, divided into common 8×8 or 16×16 pixel sub-blocks, and the DC and AC coefficients of each sub-block are calculated to obtain the first discrete cosine coefficient value benchmark set. Then, according to the material, pattern, texture and possible defect type of the target decorative paper, the image feature quantization strategy parameters are determined, such as the texture feature quantization parameters based on the gray level co-occurrence matrix, and the color and shape feature quantization methods. Then, the first discrete cosine coefficient value benchmark is calculated based on this, and the feature parameters such as texture, color, shape, etc. are combined and weighted to highlight the important features. Finally, the feature quantization results of all sub-blocks are summed or averaged, and the first eigenvalue benchmark that can represent the first image benchmark feature and is used for comparison and judgment with other image feature values is comprehensively obtained to detect decorative paper defects and evaluate quality.
[0023] Step S450, setting the first predetermined eigenvalue threshold according to the first eigenvalue benchmark. Specifically, to set the first predetermined eigenvalue threshold according to the first eigenvalue benchmark, firstly, a large number of target decorative paper sample images covering various subtle differences and various defects under normal conditions must be collected, and the sample images are processed in the same process as that of obtaining the first eigenvalue benchmark to obtain eigenvalue data. Then, statistical analysis is performed on the eigenvalues of normal samples, and statistical quantities such as the mean and standard deviation are calculated. A histogram is drawn to determine its distribution law, and the normal range is preliminarily determined with the mean ± kσ (k is determined according to actual conditions) as a reference. At the same time, the difference between the eigenvalues of defective samples and normal samples is analyzed, and the lower and upper limits of different defect types in each characteristic dimension are determined. The distribution of the eigenvalues of normal and defective samples is combined, and finally the complete first predetermined eigenvalue threshold range is determined for subsequent decorative paper defect detection and judgment to ensure product quality.
[0024] Step S500: If the first eigenvalue does not meet the first predetermined eigenvalue threshold, the first frame image in the first image sequence is eliminated to obtain the first image sequence to be inspected. Specifically, when it is determined that the first eigenvalue does not meet the first predetermined eigenvalue threshold, since the first frame image may introduce abnormal features due to the instability of the shooting start or the particularity of the initial position of the decorative paper, which affects the overall eigenvalue calculation result, the first image sequence needs to be processed and the first frame image is eliminated to obtain the first image sequence to be inspected. Thereafter, the sequence will be used as a new data source to re-experience operations such as image calibration, enhancement, feature quantization and eigenvalue calculation, and will be compared with the first predetermined eigenvalue threshold again. If it still does not meet the requirements, the first frame image of the new sequence will continue to be eliminated, and the cycle will be repeated until the eigenvalue meets the threshold, indicating that the decorative paper area represented by the image sequence is basically normal, or the remaining number of frames is too small to be effectively analyzed. At this time, it is necessary to re-evaluate the detection process, adjust relevant parameters and strategies, and ensure the effective execution of the decorative paper quality control process.
[0025] Step S600: Determine whether the second eigenvalue of the first decoration fusion image to be inspected obtained by fusion processing the first image sequence to be inspected meets the first predetermined eigenvalue threshold. Specifically, firstly, the first image sequence to be inspected is fused by pixel-level weighted average or feature-level fusion method, such as pixel-level weighted average, weights are assigned according to the image quality index of each frame to calculate the fusion pixel value, or feature-level fusion is performed by first extracting features and then fusing and reconstructing the image according to importance to obtain the first decoration fusion image to be inspected. Then, based on the characteristics and defect types of the target decorative paper, gray level co-occurrence matrix, color histogram, edge detection and other methods are selected to quantify the image features, and the second eigenvalue is calculated by weighted combination, and its weight coefficient is determined by the decorative paper sample experiment. Finally, the second eigenvalue is compared with the first predetermined eigenvalue threshold determined by analyzing a large number of normal and defective decorative paper images, combining detection accuracy and misjudgment tolerance. If all dimensions meet the requirements, it is preliminarily judged that there is no obvious defect. If any dimension exceeds the range, it is necessary to further investigate the defect type and position, so as to provide a basis for the quality detection of decorative paper.
[0026] In a possible implementation, step S600: determine whether the second eigenvalue of the first decoration fusion image to be tested obtained by fusion processing the first image sequence to be tested meets the first predetermined eigenvalue threshold, and step S600 further includes step S610, if the first eigenvalue does not meet the first predetermined eigenvalue threshold, issue an iterative positioning instruction. Specifically, when the first eigenvalue calculated by the processed first lens image sequence using the image feature quantization strategy is compared with the pre-set first predetermined eigenvalue threshold, if the first eigenvalue exceeds the threshold range in some feature dimensions, it is determined that the image sequence is abnormal, and an iterative positioning instruction is issued. The instruction contains basic data such as the starting image sequence, the current eigenvalue and the threshold, sets stop conditions such as the amplitude of the eigenvalue change and the number of iterations, clarifies the image sequence processing and eigenvalue calculation method for each iteration, and the goal is to make the final eigenvalue meet the threshold. After issuing the command, the iteration loop is started, and the image sequence is processed according to the rules (such as eliminating part of the image or subdividing and reorganizing), the features are recalibrated, enhanced, quantified, and the feature values are calculated and compared with the threshold. If they do not match, the iteration continues until the stop condition is met, thereby accurately locating the abnormal area of the decorative paper image to ensure quality inspection and production.
[0027] Step S620, iteratively repeating steps S300 to S600 based on the iterative positioning instruction until the first eigenvalue meets the first predetermined eigenvalue threshold. Specifically, when the first eigenvalue does not meet the first predetermined eigenvalue threshold, the system starts iteration according to the iterative positioning instruction. First, the instruction is parsed to obtain key data and initialize the iteration parameters, and then the operations of steps S300 to S600 are repeated for the first lens image sequence. In step S300, a more optimal algorithm is used to accurately calibrate the image geometry and optical characteristics, and the enhancement parameters are adjusted according to feedback; step S400 recalculates DCT and optimizes the parameter and coefficient calculation method; step S500 uses an improved quantization strategy to accurately calculate the eigenvalue from multiple aspects; step S600 compares the eigenvalue with the threshold, and if it does not meet and meets the conditions, the iteration count is updated and returned to step S300, otherwise an alarm is issued for manual intervention. Until the eigenvalue meets the threshold, the results are recorded for generating a report to provide a basis for production decisions and ensure the quality and efficiency of decorative paper.
[0028] Step S700: If the first eigenvalue meets the first predetermined eigenvalue threshold, the first frame image is taken as a defective image. Specifically, when the first eigenvalue obtained by accurate feature extraction and quantitative calculation of the preprocessed first lens image sequence is carefully compared with the first predetermined eigenvalue threshold set based on a large number of sample analyses, it is determined that the first eigenvalue meets the threshold, which means that there may be potential defects in the image sequence. Since the first frame image is at the initial stage of shooting, the equipment may not be completely stable, and there are problems such as inaccurate focus and uneven exposure, and the corresponding decorative paper part is easily affected by special factors at the beginning of production, such as uneven tension of the coil, handling collision, etc., resulting in minor defects, so based on these factors, the first frame image is taken as a key suspect and preliminarily determined as a defective image, and it is clearly marked and recorded in detail in the database, including information such as defect cause, eigenvalue data, comparison results, location and lens number, etc., to provide a basis for subsequent analysis and evaluation, and to ensure the quality and production efficiency of decorative paper.
[0029] In one possible implementation, Figure 2 As shown, step S700: if the first eigenvalue meets the first predetermined eigenvalue threshold, the first frame image is taken as a defective image, and step S700 further includes step S710, grid division of the defective image to obtain a defective grid set. Specifically, the defective image is grid-divided to obtain a defective grid set. First, the number of rows, columns or side lengths of the grids must be determined based on the resolution, size, and detection accuracy requirements of the defective image, while analyzing the computing resources and the actual characteristics of the decorative paper. Then, a suitable image segmentation algorithm is selected, such as a simple and fast equal-interval division method based on rules, which is suitable for conventional situations; a threshold-based method can adaptively divide according to pixel value differences, which is suitable for images with significantly different brightness or color; and a region growing-based method is based on pixel similarity, which has a better effect on the division of images with continuous textures or color gradients. Then, the division operation is performed according to the selected parameters and algorithms to ensure that the grids are independent of each other, have no overlap, and completely cover the image, and record the position, size, pixel information, etc. of each grid. Finally, all grids are organized into a defect grid set using a suitable data structure. The attribute information of each grid contained in it provides basic data for subsequent accurate detection, positioning and classification of decorative paper defects, thereby ensuring product quality and production efficiency.
[0030] Step S720, extract the first grid in the defective grid set, and match the first grid reference corresponding to the first grid in the first image reference. Specifically, extract the first grid from the defective grid set in a predetermined order (such as upper left corner row first), obtain its position, size, pixel value and other information, and preliminarily determine the possible defect type. Then, the first image reference is grid-divided according to the same parameter settings as the defective image to ensure that the two have comparable basic frameworks. Then, feature vectors are extracted for each grid in the first grid and the first image reference, including multi-dimensional features such as pixel statistics, texture (such as gray level co-occurrence matrix parameters) and shape (such as edge features) to fully reflect its image features. Then, the similarity values of the first grid and each grid of the first image reference are calculated using measurement methods such as Euclidean distance and cosine similarity, and sorted, and the grid with the highest similarity is selected as the corresponding first grid reference, thereby providing a key comparison reference for analyzing the cause of the defect and evaluating the degree of impact, and realizing in-depth analysis and quality evaluation of decorative paper defects.
[0031] Step S730, according to the image feature quantization strategy, the discrete cosine coefficient value of the first grid of the first grid after discrete cosine transform processing is calculated to obtain a third eigenvalue. Specifically, the first grid is extracted from the defective grid set, and its pixels are subjected to discrete cosine transform according to a rule (such as 8×8 pixel sub-block division) to obtain a set of discrete cosine coefficient values of the first grid. Then, according to the target decorative paper material, pattern, texture and possible defect types of the grid, the image feature quantization strategy parameters are refined and determined, such as reducing the GLCM calculation pixel distance and increasing the direction for texture defects, optimizing the color space conversion and statistical calculation for color features, and selecting a more sensitive algorithm and precise descriptor for shape features and adjusting parameters. Then, based on this strategy, GLCM is combined with DCT coefficients to calculate texture feature parameters, color histogram is optimized to calculate color feature quantization values in combination with DCT, edge detection and shape descriptors are combined with DCT to calculate shape feature quantization values, these results are weighted to obtain an intermediate value set, and finally the weighted summation or average considering the sub-block position is obtained to obtain the third eigenvalue, which provides key local feature information for decorative paper defect detection and quality assessment, and improves accuracy and reliability.
[0032] Step S740, determine whether the third eigenvalue meets the second predetermined eigenvalue threshold corresponding to the first grid reference. Specifically, determine whether the third eigenvalue meets the second predetermined eigenvalue threshold corresponding to the first grid reference. First, the second predetermined eigenvalue threshold is set based on a large number of normal and various defective decorative paper image samples, which are processed by the same grid division and feature quantization strategy, and the distribution of each grid eigenvalue is analyzed to provide a reference for judgment. Then, the processed third eigenvalue and the pre-set threshold are obtained, and the threshold is an interval value containing a reasonable range of multi-dimensional features. Then, the third eigenvalue is compared one by one in the feature parameters of each dimension such as texture, color, shape, etc. with the threshold range. As long as any key dimension exceeds the range, it means that the feature is abnormal and there may be defects. Finally, the comparison results of each dimension are combined. If they are all within the range, it is preliminarily judged that the first grid is normal. Otherwise, there may be defects. Further analysis is required to determine the defect type, location and severity, etc., so as to take quality improvement or repair measures to ensure the quality of decorative paper.
[0033] Step S750, if the third eigenvalue does not meet the second predetermined eigenvalue threshold, obtain the first position of the first grid. Specifically, when the third eigenvalue obtained by processing the first grid according to the established image feature quantification strategy is compared with the second predetermined eigenvalue threshold determined by in-depth analysis of a large number of normal and defective decorative paper corresponding grids, it is found that the third eigenvalue exceeds the threshold range in the key feature dimension, and it is determined that the first grid is abnormal and may have decorative paper defects, and its position in the image needs to be determined. The decorative paper image is in a two-dimensional plane coordinate system, with the upper left corner as the origin. Its position is determined by recording the coordinates of the upper left corner (x1, y1) and the lower right corner (x2, y2) of the first grid. These coordinates are extracted from the image data structure as the first position and recorded, which can be stored in a special list or array, with a grid identifier attached, and can also be integrated with the third eigenvalue, etc., to provide data support for subsequent defect investigation, quality assessment and correlation analysis, and improve the efficiency of decorative paper quality control and defect detection.
[0034] Step S760, taking the first position as the defect position of the defect image. Specifically, after it is clear that the third eigenvalue of the first grid does not meet the second predetermined eigenvalue threshold, first obtain and organize the first position information, that is, the precise coordinates of the first grid in the image coordinate system (such as the upper left corner (x1, y1) and the lower right corner (x2, y2)), and store it in association with other feature data of the grid. Then, use the image annotation tool to visually annotate the area corresponding to the first position on the defect image in a prominent manner such as a red border or fill, to ensure that the annotation and the coordinates match accurately. Then, the first position information is recorded in the defect database, associated with metadata such as image number and acquisition time, and a special field is created to store coordinates and establish an index, which may trigger automated processes such as statistical analysis of the distribution of defect positions of the same batch of decorative paper to provide support for quality decision-making. Finally, the defect position information will be passed to subsequent processes, such as providing positioning for automated repair equipment, and incorporating it into quality reports to help quality management personnel formulate improvement plans, thereby ensuring the quality and efficiency of decorative paper production.
[0035] In a possible implementation, the first position is used as the defect position of the defect image, and step S760 further includes step S761, extracting the first grid DC coefficient value from the first grid discrete cosine coefficient value. Specifically, to extract the first grid DC coefficient value from the first grid discrete cosine coefficient value, it is necessary to first review the discrete cosine transform principle and prepare the first grid. If the 8×8 pixel sub-block division method is adopted, the size of the first grid needs to be preprocessed, such as edge filling or cropping, so that it meets the division requirements. Then, the processed first grid is calculated using the two-dimensional discrete cosine transform formula for each sub-block to obtain a discrete cosine coefficient value set of the entire first grid. In the coefficient matrix, the DC coefficient value is located at the upper left corner of each sub-block (i.e., F(0,0) when u=0 and v=0), which represents the average brightness information of the sub-block. These DC coefficient values are extracted in sequence according to the sub-block order to form a first grid DC coefficient value set, which can reflect the overall brightness characteristics of the first grid, provide data support for feature quantization and defect detection of the decorative paper image, and is used to determine whether there are brightness-related defects.
[0036] Step S762, obtaining the first hue reference of the first grid reference. Specifically, to obtain the first hue reference of the first grid reference, it is first necessary to make it clear that it comes from a representative standard image data set or a non-defective decorative paper sample, and that it follows the same grid division rule as the first grid of the defective image to ensure that the two correspond. Then, the area where the first grid reference is located is converted from RGB to a color space suitable for hue analysis, such as HSV, and the hue, saturation and lightness components are decomposed through a specific conversion formula, with the hue value being extracted in particular. Then, these hue values are statistically analyzed, such as making a histogram and dividing bins to count the number or proportion of pixels in each bin, and calculating statistics such as the mean, median, and standard deviation to quantify its hue characteristics. Finally, the first hue reference is determined based on the statistical results. It can be a specific hue value or a vector composed of multiple statistics, which is recorded and stored for subsequent comparison with the hue characteristics of the first grid, providing a key basis for determining whether there are decorative paper defects such as hue anomalies, thereby ensuring product quality.
[0037] Step S763, when the DC coefficient value of the first grid does not meet the first hue reference, a hue abnormality defect signal is issued. Specifically, when it is determined whether the DC coefficient value of the first grid meets the first hue reference, it is first necessary to clarify the acquired DC coefficient value of the first grid (which reflects the average brightness information of the first grid, obtained by extracting the upper left corner coefficient after discrete cosine transformation of the first grid) and the first hue reference of the first grid reference (obtained by color space conversion of the corresponding area of the standard image and statistical analysis of the hue value). Then, a comparative analysis is performed, and through a brightness-hue association model based on an empirical or statistical model, factors such as the material, pattern, and process of the decorative paper are comprehensively considered to determine whether the brightness range corresponding to the DC coefficient value matches the hue represented by the hue reference. For example, the DC coefficient value corresponding to a specific hue interval should be within a certain range, and if it actually exceeds the range, it is determined to be unsatisfactory. Once it is determined that it is unsatisfactory, a hue abnormality defect signal is issued in time. In the automated detection system, the software interface sends a specific digital signal to the control system and displays the defect and location information in a pop-up window on the interface. In the production line, the signal can also be transmitted to other devices through a network protocol to trigger sorting, recording, and other operations to ensure the quality and efficiency of decorative paper production.
[0038] Step S764, based on the abnormal hue defect signal, the first position of the defective image is marked as abnormal in hue. Specifically, based on the abnormal hue defect signal, the first position of the defective image is marked as abnormal in hue. First, a reliable signal receiving mechanism is used to receive and verify the signal to ensure that it is accurate and occurs due to the abnormal hue of the first grid. Then, the corresponding area is located based on the previously recorded upper left and lower right corner coordinate information of the first position, and the target range is clearly marked. Then, according to actual needs, marking methods such as drawing a specific color border, filling color or pattern, adding text annotations, etc. are selected, and the operation is implemented with the help of tools such as OpenCV library drawing functions. Finally, the selected method and tools are used to accurately perform the marking to ensure clarity and accuracy, and at the same time record the time, method, operator and other related information of the marking to provide data support for quality control, defect analysis and production process improvement, and ensure the quality and consistency of decorative paper.
[0039] In a possible implementation, the first position of the defective image is marked as abnormal in hue based on the abnormal hue defect signal, and step S764 further includes step S7641, when the first grid DC coefficient value does not meet the first hue reference, extracting the first grid AC coefficient value in the first grid discrete cosine coefficient value. Specifically, when it is determined that the first grid DC coefficient value does not meet the first hue reference, it means that the brightness of the grid is abnormally associated with the hue, and at this time, the AC coefficient value in the first grid discrete cosine coefficient value needs to be extracted. Previously, the coefficient matrix has been obtained by discrete cosine transform of the first grid, in which the upper left corner is the DC coefficient value, which reflects the average brightness, and the first hue reference is obtained by color space conversion and hue statistical analysis of the corresponding defect-free area. After clarifying the structure of the coefficient matrix, the DC coefficient value is excluded, and the remaining elements are extracted as the first grid AC coefficient value, which can be stored in order in an array or list, so as to subsequently mine its abnormalities in texture and details through statistical analysis, comparison with normal grids, etc., to provide data support for quality control and defect repair of decorative paper, and improve the quality inspection level and product quality assurance capabilities.
[0040] Step S7642, obtaining the first texture reference of the first grid reference. Specifically, to obtain the first texture reference of the first grid reference, it is necessary to first select a representative image from a large number of defect-free decorative paper sample images as a data source, divide the sample image according to the same grid division rule as the first grid in the defective image (such as 8×8 pixels), and perform noise removal filtering and grayscale preprocessing on the pixel values in the grid. Then, according to the texture characteristics of the decorative paper and common texture analysis techniques, select a texture feature extraction method such as gray level co-occurrence matrix (GLCM), wavelet transform, local binary pattern (LBP), etc. For the GLCM method, the GLCM of each grid is calculated according to the preset direction and distance parameters and statistics such as contrast are extracted; the wavelet transform method decomposes the grid and then counts the eigenvalues of the wavelet coefficients; the LBP method calculates the feature histogram and extracts key statistical features. Afterwards, the texture feature values are calculated for the corresponding grids of each sample image using the selected method, and then these values are statistically analyzed. The first texture reference vector composed of multiple texture feature statistics is determined by calculating the mean and standard deviation, which provides a key basis for judging whether the texture of the first grid of the defective image is abnormal, thereby ensuring the quality of decorative paper.
[0041] Step S7643, determine whether the first grid AC coefficient value meets the first texture benchmark. Specifically, to determine whether the first grid AC coefficient value meets the first texture benchmark, firstly, the relevant data that has been obtained must be clarified. The first grid AC coefficient value is extracted after the DC coefficient value does not meet the first tone benchmark, reflecting high-frequency information such as image detail texture; the first texture benchmark is obtained by extracting and statistically analyzing the texture features of the corresponding grid areas of a large number of defect-free sample images, covering a variety of feature quantities such as GLCM, wavelet transform, and LBP. Then, feature dimension matching and normalization processing are performed to ensure that the dimensions of the two are consistent and map each feature component of the AC coefficient value to the same range as the texture benchmark. Then, a distance measurement method such as Euclidean distance is used to quantify the degree of difference between the two, and a reasonable threshold is set according to the material, process stability and quality requirements of the decorative paper. Finally, the calculated distance value is compared with the threshold. If it is less than or equal to the threshold, it is satisfied, indicating that the texture is normal; if it is greater than the threshold, it is not satisfied, which means that there may be texture abnormalities, and further measures need to be taken, such as detailed analysis, manual review or adjustment of process parameters to ensure the quality of the decorative paper.
[0042] Step S7644: If the first grid AC coefficient value does not meet the first texture benchmark, a texture abnormality defect signal is issued. Specifically, when it is determined that the first grid AC coefficient value does not meet the first texture benchmark, a texture abnormality defect signal needs to be issued. First, this judgment is based on the quantitative comparison of the two in multiple texture feature dimensions (such as GLCM, wavelet, LBP features, etc.), and is obtained by comparing the Euclidean distance metric and the threshold. Then, according to the production detection system architecture and requirements, the signal transmission method is selected. In the automated production line, industrial Ethernet or field bus is often used to transmit signals to the control system; small laboratories or specific scenarios can output to indicator lights and other equipment in a level or code through the GPIO interface, and when there is a host computer monitoring software, data packets can also be sent through the software communication mechanism. Then determine the signal content (including texture abnormality identification, defect grid position, quantitative description of abnormality, etc.) and format (follow the selected transmission method specification, such as industrial protocol PDO format, GPIO simple encoding rules, JSON or XML format for host computer software communication, etc.). Finally, the signal is sent in the selected method and format, and the integrity and accuracy are guaranteed through the verification and retransmission mechanism. The sending status is verified based on the feedback from the receiver or the log to ensure the effective transmission of the signal, so as to start the subsequent processing flow to ensure the quality and production efficiency of decorative paper.
[0043] Step S7645, based on the texture abnormality defect signal, the first position of the defect image is marked with texture abnormality. Specifically, based on the texture abnormality defect signal, the first position of the defect image is marked with texture abnormality. First, a reliable signal receiving mechanism should be established. In the automated detection system, a specific module is used to monitor and receive the signal from the image analysis unit according to a predetermined communication protocol, and the received signal is checked and analyzed to confirm its integrity and accuracy to prevent misidentification. Then, based on the first position information (in the form of coordinate values or grid numbers) carried by the signal, the positioning function of the image processing library or algorithm is used to accurately locate the target area in the defect image. This is the basis for effective identification. Any positioning error will affect subsequent judgment and processing. Then, according to the actual application scenario and requirements, select the identification method and tool such as drawing a red border, filling color or pattern, adding text annotation, etc. using the OpenCV library function to ensure that the identification is eye-catching and intuitive. Finally, the selected method and tool are used to perform the identification operation to ensure the stability of the identification quality. At the same time, the identification time, method, parameters and key signal information are recorded in detail and stored in the database or log file for traceability analysis, providing data support for quality control and improvement, and ensuring the quality and stability of decorative paper.
[0044] In a possible implementation, if the first grid AC coefficient value does not meet the first texture reference, a texture abnormality defect signal is issued, and step S7644 further includes step S76441, if the first grid AC coefficient value meets the first texture reference, a scratch or hole defect signal of the target decorative paper is issued. Specifically, when it is determined that the first grid AC coefficient value meets the first texture reference, a scratch or hole defect signal of the target decorative paper needs to be issued. First, this judgment is based on the comparison of the distance measurement and threshold between the two in multiple texture feature dimensions (such as GLCM, wavelet, LBP features, etc.) to determine that the conditions are met, but scratch or hole defects still need to be checked. Then the system switches the detection mode, collects grayscale, edge and other information in the previous image preprocessing stage, loads the detection algorithm model for such defects (such as a machine learning classification model or a traditional image processing algorithm) and its parameter settings. Then the algorithm is used to detect the first grid area. Based on the machine learning model, the data needs to be preprocessed before inputting the prediction. The traditional algorithm uses morphology, threshold segmentation and other operations to determine whether there is a defect and analyze its characteristics. In the process, the algorithm parameters are optimized to adapt to the characteristics of the decorative paper. Finally, based on the test results, if scratches or holes are found, a signal will be sent out according to the production inspection system architecture, such as industrial Ethernet, fieldbus or GPIO interface. The signal contains a description of the defect type, location and degree, so that the recipient can take sorting, alarm and other measures to ensure the quality of decorative paper and production stability.
[0045] The embodiment of the present application collects inspection videos of target decorative paper through inspection; segments the video based on the lens detection principle to extract the image sequence of the first lens; fuses the image sequence after calibration and enhancement to obtain a first decorative fused image; introduces an image feature quantization strategy to obtain the eigenvalue of the image and compares it with a predetermined eigenvalue threshold; if the eigenvalue does not meet the threshold, the first frame image is discarded to generate a sequence of images to be inspected; determines whether the eigenvalue of the image to be inspected meets the threshold, and if so, identifies the first frame image as a defective image, thereby achieving the technical effect of accurately identifying and locating surface defects of decorative paper.
[0046] The above specific implementation manner does not constitute a limitation to the protection scope of the present application. It should be understood by those skilled in the art that various modifications, combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application. In some cases, the actions or steps recorded in the present application can be performed in an order different from that in the embodiment and can still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A method for detecting decorative paper defects by integrating machine vision, characterized in that: include: Step S100: inspecting the target decorative paper and collecting the target inspection video; Step S200: performing segmentation processing on the target inspection video based on the lens detection principle to obtain a target segmentation result, and extracting a first image sequence of a first lens in the target segmentation result; Step S300: performing fusion processing on the first image sequence after calibration and enhancement processing to obtain a first decoration fused image; Step S400: introducing an image feature quantization strategy to obtain a first feature value of the first decoration fusion image, and determining whether the first feature value meets a first predetermined feature value threshold of the first lens; Step S500: if the first characteristic value does not meet the first predetermined characteristic value threshold, the first frame image in the first image sequence is eliminated to obtain a first image sequence to be inspected; Step S600: determining whether a second eigenvalue of the first decoration fusion image to be inspected obtained by fusion processing the first image sequence to be inspected meets the first predetermined eigenvalue threshold; Step S7 00: if the first characteristic value meets the first predetermined characteristic value threshold, the first frame image is taken as a defect image; Wherein, step S400 includes: Performing discrete cosine transform processing on the first decoration fusion image to obtain a first discrete cosine coefficient value; Performing weighted calculation on a first DC coefficient value and a first AC coefficient value in the first discrete cosine coefficient value according to the image feature quantization strategy to obtain the first feature value; After step S700, the method further includes: Performing grid division on the defect image to obtain a defect grid set; Extracting a first grid from the defective grid set, and matching a first grid reference corresponding to the first grid in a first image reference; Calculating the first grid discrete cosine coefficient value of the first grid after discrete cosine transform processing according to the image feature quantization strategy to obtain a third eigenvalue; Determining whether the third eigenvalue meets a second predetermined eigenvalue threshold corresponding to the first grid reference; If the third eigenvalue does not meet the second predetermined eigenvalue threshold, obtaining the first position of the first grid; The first position is used as the defect position of the defect image.
2. The method for detecting decorative paper defects by integrating machine vision according to claim 1, characterized in that: Step S400 includes: Acquire a first image reference of the first lens; Calculating a first discrete cosine coefficient value benchmark after discrete cosine transform processing of the first image benchmark according to the image feature quantization strategy to obtain a first eigenvalue benchmark; The first predetermined characteristic value threshold is set according to the first characteristic value reference.
3. The method for detecting decorative paper defects by integrating machine vision according to claim 1, characterized in that: After step S600, the method further includes: If the first eigenvalue does not meet the first predetermined eigenvalue threshold, issuing an iterative positioning instruction; Steps S300 to S600 are iteratively repeated based on the iterative positioning instruction until the first eigenvalue meets the first predetermined eigenvalue threshold.
4. The method for detecting decorative paper defects by integrating machine vision according to claim 1, characterized in that: After taking the first position as the defect position of the defect image, the method further includes: Extracting a first grid DC coefficient value from the first grid discrete cosine coefficient values; Acquire a first hue reference of the first grid reference; When the first grid DC coefficient value does not meet the first color tone reference, a color tone abnormality defect signal is issued; The first position of the defective image is marked as having abnormal hue based on the abnormal hue defect signal.
5. The method for detecting decorative paper defects by integrating machine vision according to claim 4, characterized in that: Also includes: When the first grid DC coefficient value does not satisfy the first tone reference, extracting the first grid AC coefficient value from the first grid discrete cosine coefficient value; Acquire a first texture reference of the first grid reference; determining whether the first grid AC coefficient value satisfies the first texture reference; If the first grid AC coefficient value does not meet the first texture reference, a texture abnormality defect signal is issued; The first position of the defect image is marked as having texture abnormality based on the texture abnormality defect signal.
6. The method for detecting decorative paper defects by integrating machine vision according to claim 5, characterized in that: If the first grid AC coefficient value satisfies the first texture reference, a scratch or hole defect signal of the target decorative paper is issued.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and storage medium
CN113409468A
Image processing apparatus, method, and program
US20060034524A1