A fiberboard quality assessment method based on image processing

By performing grayscale processing, attention calculation and regional growth method classification on the surface images of the fiberboard, the problem of difficulty in detecting defects such as dust spots in fiberboards in the existing technology is solved, and a more accurate and efficient quality evaluation is achieved.

CN114419025BActive Publication Date: 2025-05-09GAOZHOU HUIZHENG WOOD IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210103039.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2025-05-09
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

In the prior art, it is difficult to accurately detect defects in airspace characteristics in fiberboard quality evaluation, such as dust spots, which lead to inaccurate detection results and inefficient efficiency.

Method used

By obtaining the grayscale map of the fiberboard, the attention degree of each pixel point is calculated, and the confidence of each pixel point is calculated using the region growth method. Finally, the probability of dust spot defects is calculated based on the distance from the edge pixel point to the center point, and the quality evaluation is carried out.

Benefits of technology

Accurate detection of defects with insignificant characteristics of hollow space in fiberboard is achieved, the accuracy and efficiency of quality evaluation is improved, labor intensity is reduced, and production efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419025B_ABST
    Figure CN114419025B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence, and specifically to a fiberboard quality assessment method based on image processing, comprising: obtaining a fiberboard grayscale image; obtaining a background grayscale value; obtaining the degree of attention of each pixel point; obtaining suspected defect points according to the degree of attention, classifying the suspected defect points using a region growing method, and obtaining a first suspected defect area; calculating the credibility of each pixel point in the first suspected defect area, retaining the pixel points with higher credibility in the first suspected defect area using a region growing method, and obtaining a second suspected defect area; obtaining the probability that the second suspected defect area is a dust spot defect according to the distance from the edge pixel point to the center point in the second suspected defect area, and then obtaining a dust spot defect area; and assessing the quality of the fiberboard according to the dust spot defect area. The above method is used to assess the quality of the fiberboard, and the accuracy of the quality assessment can be improved by the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of artificial intelligence, and in particular to a fiberboard quality assessment method based on image processing. Background Art

[0002] Medium density fiberboard is widely used in construction, decoration and other fields due to its advantages of easy processing, corrosion resistance and long product life. In the production process of fiberboard, due to improper working environment and operation, dust spots, water spots, impurities and other defects may appear on the surface of fiberboard, which not only affects the appearance of fiberboard, but also affects the service life of fiberboard. Therefore, it is essential to conduct quality assessment of fiberboard after production.

[0003] At present, the main methods for fiberboard quality assessment are manual and threshold segmentation. The manual method is to sample and inspect fiberboard after production, and the inspectors use human eyes to identify; the threshold segmentation method is to segment the defect area according to the difference between the defect and the background, and evaluate the quality of the fiberboard according to the defect.

[0004] However, the manual method has a high defect miss rate, low detection efficiency, high labor costs, and the human eye cannot accurately quantify the defect grade and size; and the threshold segmentation method can only detect defects with obvious spatial characteristics such as impurities, water spots, spots, etc., and dust spots are difficult to observe and detect with the naked eye. Therefore, a method is urgently needed to improve the accuracy and efficiency of fiberboard quality assessment. Summary of the invention

[0005] The present invention provides a fiberboard quality assessment method based on image processing, comprising: obtaining a fiberboard grayscale image; obtaining a background grayscale value; obtaining a degree of attention of each pixel point; obtaining suspected defect points according to the degree of attention, classifying the suspected defect points by using a region growing method, and obtaining a first suspected defect area; calculating the credibility of each pixel point in the first suspected defect area, retaining the pixel points with higher credibility in the first suspected defect area by using a region growing method, and obtaining a second suspected defect area; obtaining the probability that the second suspected defect area is a dust spot defect according to the distance from the edge pixel point to the center point in the second suspected defect area, and then obtaining a dust spot defect area; assessing the quality of the fiberboard according to the dust spot defect area, compared with the prior art, the present invention calculates the defect probability by analyzing the relationship between the pixel points of the surface image of the medium-density fiberboard, replacing the traditional threshold segmentation method, and can detect defects with unclear spatial characteristics, making the detection result more accurate, and improving the accuracy of product classification, while combining with computer vision can effectively reduce labor intensity and improve production efficiency, which is of great significance to improving the product qualification rate.

[0006] To achieve the above object, the present invention adopts the following technical solution, a fiberboard quality assessment method based on image processing, comprising:

[0007] Get the surface image of the medium density fiberboard and its grayscale image.

[0008] A Gaussian distribution is established based on the grayscale value with the largest frequency in the grayscale image and the grayscale value mean to obtain the background grayscale value.

[0009] The difference between the mean grayscale value of each pixel and its neighborhood pixels in the grayscale image and the background grayscale value is calculated to obtain the attention level of each pixel.

[0010] The attention level of each pixel is compared with the attention level threshold to obtain suspected defective pixels.

[0011] The suspected defect pixels are classified using the region growing method to obtain all the first suspected dust spot defect regions.

[0012] According to the gradient direction of each pixel point in the first suspected dust spot defect area and the direction of the line connecting each pixel point and the central pixel point, the credibility of all the pixel points in each first suspected dust spot defect area is obtained.

[0013] The pixel points with higher credibility in each first suspected dust spot defect region are retained by using the region growing method to obtain all second suspected dust spot defect regions.

[0014] According to the distance from the edge pixel point to the center point in each second suspected dust spot defect area, the probability that all the second suspected dust spot defect areas are dust spot defects is obtained.

[0015] The dust spot defect region is obtained according to the probability that each second suspected dust spot defect region is a dust spot defect.

[0016] The quality of medium density fiberboard is evaluated based on the number and size of dust spot defect areas.

[0017] Furthermore, in the fiberboard quality assessment method based on image processing, the background grayscale value is obtained in the following manner:

[0018] Calculate the frequency and mean gray value of each gray level in the grayscale image of the medium density fiberboard surface.

[0019] A Gaussian distribution is established, and the mean and variance of the Gaussian distribution are calculated based on the maximum grayscale value of the frequency and the grayscale value mean.

[0020] According to the mean and variance of the Gaussian distribution, the probability that each gray level in the grayscale image belongs to the background is obtained.

[0021] The gray level corresponding to the maximum probability value is selected as the background to obtain the background gray value in the grayscale image.

[0022] Furthermore, in the fiberboard quality assessment method based on image processing, the expression of the attention degree of each pixel point is as follows:

[0023]

[0024] In the formula, C represents the attention level of the e-th pixel, F im represents the gray value of the background pixel, e represents the target pixel, and e j represents the gray value of the jth pixel of the target pixel e, J represents the number of neighboring pixels of the target pixel e, tanh is the hyperbolic tangent function, and ψ is a hyperparameter.

[0025] Furthermore, in the fiberboard quality assessment method based on image processing, all the first suspected dust spot defect areas are obtained in the following manner:

[0026] The pixel with the highest degree of concern among the suspected defect points is used as the growth seed point.

[0027] The suspected defect points within the 8-neighborhood of the growth seed point are merged to obtain a region.

[0028] The obtained area is used as a new growth seed point, and the suspected defect points within the 8-neighborhood of the new growth seed point are merged to obtain an updated area. The updated area is used as a new growth seed point and merged iteratively until there are no suspected defect points within the 8-neighborhood of the updated growth seed point, thereby obtaining the first suspected dust spot defect area.

[0029] All first suspected dust spot defect regions are obtained according to the method for obtaining the first suspected dust spot defect region.

[0030] Furthermore, in the fiberboard quality assessment method based on image processing, the credibility of all pixels in each first suspected dust spot defect area is obtained in the following manner:

[0031] The center point of each first suspected dust spot defect area is obtained.

[0032] Get the direction of the lines connecting all pixels within the range of n×n of the center point and the center point.

[0033] Calculate the gradient of the grayscale image within the n×n range of the center point, and obtain the gradient direction of each pixel point within the n×n range of the center point.

[0034] The credibility of all pixels in each first suspected dust spot defect area is calculated according to the direction of the lines connecting all pixels within the n×n range of the center point and the center point and the gradient direction of each pixel within the n×n range of the center point.

[0035] Furthermore, in the fiberboard quality assessment method based on image processing, all the second suspected dust spot defect areas are obtained in the following manner:

[0036] The center point within the range of n×n of each first suspected dust spot defect region is used as the growth seed point.

[0037] A threshold is set, and pixels whose credibility is greater than or equal to the threshold within the 8-neighborhood of the growth seed point are retained, and the retained pixels are used as new growth seed points. Pixels whose credibility is greater than or equal to the threshold within the 8-neighborhood of the new growth seed point are retained, and the newly retained pixels are used as updated growth seed points and retained iteratively until there are no pixels whose credibility is greater than or equal to the threshold within the 8-neighborhood of the updated growth seed point, and the second suspected dust spot defect area is obtained.

[0038] All second suspected dust spot defect regions are obtained according to the method for obtaining the second suspected dust spot defect region.

[0039] Furthermore, in the fiberboard quality assessment method based on image processing, the expression for the probability that all the second suspected dust spot defect regions are dust spot defects is as follows:

[0040]

[0041] Where G represents the probability that each second suspected dust spot defect area is a dust spot defect, tanh is the hyperbolic tangent function, ψ' is a hyperparameter, K is the number of edge points in the connected domain, g represents the distance from the edge pixel to the center point, and g k Represents the distance from the kth edge point to the center point.

[0042] The beneficial effects of the present invention are:

[0043] The present invention calculates the defect probability by analyzing the relationship between pixel points of the surface image of the medium-density fiberboard, replacing the traditional threshold segmentation method. It can detect defects with unclear spatial features, make the detection results more accurate, and improve the accuracy of product classification. At the same time, combined with computer vision, it can effectively reduce labor intensity and improve production efficiency, which is of great significance to improving product qualification rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 A schematic flow chart of a fiberboard quality assessment method provided in Example 1 of the present invention;

[0046] Figure 2 A schematic flow chart of a fiberboard quality assessment method provided in Example 2 of the present invention;

[0047] Figure 3 A schematic diagram of a gradient direction provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0048] 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.

[0049] Example 1

[0050] The embodiment of the present invention provides a fiberboard quality assessment method based on image processing, such as Figure 1 As shown, including:

[0051] S101, obtaining a surface image of a medium density fiberboard and its grayscale image.

[0052] Among them, the grayscale image, also known as the grayscale image, divides white and black into several levels according to the logarithmic relationship, which is called grayscale. The grayscale is divided into 256 levels.

[0053] S102, establishing a Gaussian distribution according to the grayscale value with the largest frequency in the grayscale image and the grayscale value mean, to obtain the background grayscale value.

[0054] The background gray value is obtained by calculating the probability that each gray level belongs to the background.

[0055] S103, calculating the difference between the mean grayscale value of each pixel point and its neighboring pixel points in the grayscale image and the background grayscale value, and obtaining the attention level of each pixel point.

[0056] The greater the difference between the mean value of a pixel point and its neighboring pixels and the background grayscale, the greater the probability that the point is the center of the defect area, that is, the point deserves more attention.

[0057] S104 , comparing the attention level of each pixel with the attention level threshold to obtain suspected defective pixels.

[0058] Among them, the attention level threshold is set to 0.8.

[0059] S105 , classifying the suspected defective pixels using a region growing method to obtain all first suspected dust spot defect regions.

[0060] Region growing is the process of growing groups of pixels or regions into larger regions. Starting from a set of seed points, regions are grown from these points by merging neighboring pixels with similar properties to each seed point, such as intensity, grayscale, texture color, etc., into this region.

[0061] S106. Obtain the credibility of all pixels in each first suspected dust spot defect area according to the gradient direction of each pixel and the direction of the line connecting each pixel and the central pixel.

[0062] The more consistent the gradient direction of the pixel point and the direction of the line connecting the pixel point and the central pixel point are, the higher the credibility of the pixel point being a pixel point in the dust spot defect area.

[0063] S107 , using a region growing method to retain pixels with higher credibility in each first suspected dust spot defect region, to obtain all second suspected dust spot defect regions.

[0064] Among them, retaining pixels with higher credibility means excluding some noise points or pixels that are not defects.

[0065] S108. Obtain the probability that all the second suspected dust spot defect regions are dust spot defects according to the distance from the edge pixel point to the center point in each second suspected dust spot defect region.

[0066] The closer the second suspected dust spot defect region is to a circle, the greater the probability that the region is a dust spot defect.

[0067] S109, obtaining dust spot defect regions according to the probability that each second suspected dust spot defect region is a dust spot defect.

[0068] When the probability that the second suspected dust spot defect region is a dust spot defect is greater than a threshold, the region is a dust spot defect region.

[0069] S110. Evaluate the quality of medium density fiberboard based on the number and size of dust spot defect areas.

[0070] Among them, when the number of dust spot defect areas of the fiberboard is 0, the medium density fiberboard is a high-quality product.

[0071] The beneficial effects of this embodiment are:

[0072] This embodiment calculates the defect probability by analyzing the relationship between the pixels of the surface image of the medium-density fiberboard, replacing the traditional threshold segmentation method. It can detect defects with unclear spatial features, make the detection results more accurate, and improve the accuracy of product classification. At the same time, combined with computer vision, it can effectively reduce labor intensity and improve production efficiency, which is of great significance to improving product qualification rate.

[0073] Example 2

[0074] The main purpose of the present invention is to use computer vision to analyze the acquired grayscale image of the surface of the medium density fiberboard, calculate the probability of the medium density fiberboard having dust spot defects according to the relationship between each pixel point of the grayscale image of the surface of the medium density fiberboard, judge whether the medium density fiberboard has dust spot defects according to the probability, and grade the quality of the board according to the size and number of dust spot defects.

[0075] The embodiment of the present invention provides a fiberboard quality assessment method based on image processing, such as Figure 2 As shown, including:

[0076] S201, obtaining a grayscale image of the surface of a medium density fiberboard.

[0077] This embodiment needs to detect the quality of medium density fiberboard and classify the quality of medium density fiberboard, so it is necessary to first collect the surface image of the medium density fiberboard. Arrange cameras, collect images, and use DNN semantic segmentation to identify targets in the segmented images.

[0078] The relevant content of the DNN network is as follows:

[0079] 1) The dataset used is a product image dataset collected from a bird's-eye view, and the styles of medium-density fiberboard are diverse.

[0080] 2) The pixels that need to be segmented are divided into two categories, that is, the labeling process of the training set is: single-channel semantic label, the corresponding position pixel belongs to the background class and is labeled as 0, and belongs to the medium-density fiberboard class and is labeled as 1.

[0081] 3) The task of the network is classification, and all loss functions used are cross entropy loss functions.

[0082] The 0-1 mask image obtained by semantic segmentation is multiplied with the original image, and the obtained image only contains the medium-density fiberboard image, removing the interference of the background. The obtained image is converted into a grayscale image.

[0083] At this point, the camera is set up to collect images, the DNN network is sampled and classified to obtain the surface image of the medium-density fiberboard, and the image is converted to obtain the grayscale image of the surface of the medium-density fiberboard.

[0084] S202. Obtain the mean and variance of the Gaussian distribution.

[0085] Dust spot defects are usually white and sparsely fall on the board surface. During manual inspection, they are mainly judged based on the color and whether it feels soft. The contrast between the dust spot defect and the background is not obvious, but there are pixels with higher brightness in the middle of the dust spot defect. If the dust spot defect is segmented by threshold segmentation, most of the dust spot defect edge is still missing, and effective detection cannot be achieved. In addition, the segmented highlight pixels may also be noise or other influences, leading to misjudgment.

[0086] In this embodiment, in order to accurately classify the quality of the medium density fiberboard, it is necessary to first calculate the abnormal area, and classify the quality of the medium density fiberboard according to the relationship between the pixels in the abnormal area. The specific process is as follows:

[0087] The dust spot defect of the medium density fiberboard will cause the grayscale value of the image to change. This change is a small change. The grayscale difference at the edge of the dust spot defect is very small compared with the normal fiberboard. The purpose of the present invention is to classify the quality of the medium density fiberboard, so it is necessary to first perform defect judgment and obtain the area where defects may exist. To obtain the area where defects may exist, it is necessary to first obtain the background of the medium density fiberboard. Here, the background refers to the normal area in the fiberboard, and the area with a large difference from the background is more likely to be a defective area.

[0088] Create a grayscale histogram and calculate the frequency of each gray level, that is:

[0089]

[0090] Where P i Indicates the frequency of occurrence of the i-th gray level, A i represents the frequency of occurrence of the pixel corresponding to the i-th gray level, and B represents the total number of pixels in the image.

[0091] Calculate the gray level of background pixels. Use the maximum frequency value or gray mean value of the gray histogram to represent the gray level of background pixels. There is a large deviation, but the ideal background gray level must be between the maximum frequency value and the gray mean value of the gray histogram. Therefore, a Gaussian distribution is established. The mean and variance of the Gaussian distribution are the maximum gray value i m and gray value mean The mean of the gray values ​​between is the mean μ0, and the maximum gray value i is the frequency m and gray value mean The variance of the grayscale value between is the variance σ0 2 The calculation formula is:

[0092]

[0093] In the formula, is the mean gray value, A i represents the frequency of occurrence of the pixel corresponding to the i-th gray level, and B represents the total number of pixels in the image.

[0094]

[0095] Where μ0 is the mean of the Gaussian distribution, P i Indicates the frequency of occurrence of the i-th gray level, i m is the maximum gray value of the frequency, is the mean gray value.

[0096]

[0097] Where σ0 2 is the variance of the Gaussian distribution, μ0 is the mean of the Gaussian distribution, i m is the maximum gray value of the frequency, is the mean gray value.

[0098] S203: Obtain background grayscale.

[0099] The probability formula for the gray level belonging to the background is:

[0100]

[0101] In the formula, F i is the probability that the i-th gray level belongs to the background, μ0 is the mean of the Gaussian distribution, σ0 2 is the variance of the Gaussian distribution.

[0102] Select F i Gray level F corresponding to the maximum value im As the background, the background pixel points are obtained, that is, the gray value of the background in the fiberboard is obtained.

[0103] S204: Obtain the attention level of each pixel.

[0104] Calculate the degree of attention of the pixel, that is:

[0105]

[0106] In the formula, C represents the attention level of the e-th pixel, F im represents the gray value of the background pixel, e represents the target pixel, and e jrepresents the gray value of the jth pixel of the target pixel e, J represents the number of pixels in the neighborhood of the target pixel e, tanh is the hyperbolic tangent function, which plays a normalization role, ψ is a hyperparameter, and ψ is 0.2. When the gray value of the target pixel is greatly different from the background gray value, it can only mean that this pixel may be the middle point of the defect, or it may be noise or other. However, if the target pixel is similar to its neighborhood gray value, that is, the greater the difference between the mean value of the pixel e and its neighborhood pixels and the background gray value, the greater the probability that the point is the center point of the defect area, that is, the point is more worthy of attention.

[0107] S205, obtaining multiple suspected defect areas.

[0108] The suspected defect area is obtained according to the degree of attention, and the entire image is traversed to screen all pixels. When C≥0.8, such pixels are marked as suspected defect points. The suspected defect points are classified by the regional growing method based on the degree of attention. For all marked suspected defect pixels, the pixel with the largest degree of attention C is selected as the growth seed point. If there are multiple maximum C values, one of them is randomly selected and searched in the 8 neighborhoods of the selected pixel. The pixels in the neighborhood with a degree of attention C greater than or equal to 0.8 are retained and merged into a region. At this time, this region is used as the new growth seed point, and the neighborhood of the selected region is searched again. The pixels in the neighborhood with a degree of attention C greater than or equal to 0.8 are retained, and the new region is updated to obtain a new seed point region. It is iterated multiple times until the neighborhood of this region does not contain pixels with a degree of attention C greater than or equal to 0.8. At this time, the first suspected defect area is obtained. For the remaining suspected defect points, the remaining pixels with the largest attention level C are selected as growth seed points in the same way. If there are multiple maximum C values, one of them is randomly selected and searched in the 8 neighborhoods of the selected pixel points. Pixels with attention levels C greater than or equal to 0.8 in the neighborhood are retained and merged into one area. At this time, this area is used as the new growth seed point, and the neighborhood of the selected area is searched again. Pixels with attention levels C greater than or equal to 0.8 in the neighborhood are retained, and the new area is updated to obtain a new seed point area. Iterate multiple times until there are no pixels with attention levels C greater than or equal to 0.8 in the neighborhood of this area. At this time, the second suspected defect area is obtained, and the above operation is repeated for the remaining suspected defect pixels to iterate to obtain multiple suspected defect areas.

[0109] S206, obtaining the direction of the line connecting the pixel points and the center point in each suspected defect area.

[0110] The suspected defect area is analyzed. At this time, the suspected defect area obtained is incomplete and it is unknown whether it is a defect. If it is a defect, this defect area is only the central area of ​​the defect. Using this as the judgment standard will lead to classification errors. If it is not a defect area, it may be affected by noise or light. Dust spot defects generally appear in the shape of circular patches, and the quality grading of dust spot medium density fiberboard is divided according to the diameter of the dust spot. Dust spots with a diameter greater than 3 mm need to be detected. Therefore, it is necessary to first determine the probability that the suspected defect area is a dust spot defect, and then calculate the size of the dust spot.

[0111] Get the center point of the connected domain of the suspected defect area, denoted as P, and get the direction of the connection between all pixels and the central pixel within the range of n×n with the central pixel point P as the center point, denoted as v p .

[0112] S207, obtaining the gradient direction of each pixel point in each suspected defect area.

[0113] Calculate the gradient of the grayscale image in the n×n range, and use the Sobel operator to calculate the gradient g in the x and y directions of the image x , g y . Then the corresponding gradient direction is The gradient direction is Figure 3 As shown, the gradient direction map corresponding to the n×n range image is obtained, that is, each point in the map corresponds to a gradient direction, recorded as v q .

[0114] S208, obtaining the credibility of each pixel in each suspected defect area.

[0115] Calculate the credibility of pixels within the range of n×n. Since dust spot defects generally present a circular patch shape and the brightness of the pixel in the middle of the dust spot defect is higher, the more consistent the gradient direction of the pixel and the direction of the line connecting the pixel and the central pixel are, the higher the credibility of the pixel as a pixel in the dust spot defect area, that is:

[0116]

[0117] In the formula, T represents the credibility of the lth pixel, v pl Indicates the direction of the line connecting the lth pixel and the central pixel p, v ql Indicates the gradient direction of the lth pixel, and l represents the number of pixels in the range of n×n. The larger the value of T, the more consistent the gradient direction of the lth pixel is with the direction of the line connecting the lth pixel and the center pixel p, that is, the higher the credibility of the lth pixel being a dust spot defect.

[0118] S209: Obtain the corrected suspected defect area.

[0119] The connectivity of the pixels within the n×n range is judged, and the credibility-based regional growing method is used to judge and obtain defects. The center point of the pixels within the n×n range is used as the seed point, and the search is performed in its 8 neighborhoods. The pixels with credibility T≥0.7 in the neighborhood are retained, and the iteration is repeated multiple times until there are no pixels with credibility T values ​​greater than or equal to 0.7 in the neighborhood of the center point within the n×n range. Repeat the above operation for all the suspected defect areas obtained to obtain multiple corrected suspected defect areas.

[0120] S210, obtaining a dust spot defect area.

[0121] The circularity of the connected domain is judged. Since dust spot defects generally present a patchy shape that is more circular, the closer the connected domain is to a circle, the greater the probability that the connected domain is a dust spot defect. That is, the distance from the edge pixel point of the connected domain to the center point is recorded as g, then:

[0122]

[0123] Where G represents the probability of dust spot defect, tanh is the hyperbolic tangent function, which plays a normalization role, ψ' is a hyperparameter, ψ' is 0.5, K is the number of edge points in the connected domain, g represents the distance from the edge pixel to the center point, and g k It represents the distance from the kth edge point to the center point. The larger the value of G, the greater the probability that the connected domain is a dust spot defect. The empirical value of G is 0.8, that is, when the G calculated by the connected domain is ≥ 0.8, the connected domain is a dust spot defect. The calculation method of all connected domains is the same.

[0124] At this point, the defect area is obtained by calculating the attention degree and credibility of the pixel points, and the size of the dust spot is obtained according to the distance from the edge pixel point to the center point of the dust spot defect area.

[0125] S211. Evaluate the quality of medium density fiberboard based on the number and size of dust spots.

[0126] If the number of dust spots on the medium-density fiberboard to be tested is 0, the fiberboard is of high quality;

[0127] If the number of dust spots on the tested MDF is ≤5 and the diameter of each dust spot does not exceed 10mm, the fiberboard is a first-class product;

[0128] If the number of dust spots on the medium density fiberboard to be tested is greater than 5, the fiberboard is a second-grade product.

[0129] The quality of medium density fiberboard was evaluated according to the defect judgment standard.

[0130] The beneficial effects of this embodiment are:

[0131] This embodiment calculates the defect probability by analyzing the relationship between the pixels of the surface image of the medium-density fiberboard, replacing the traditional threshold segmentation method. It can detect defects with unclear spatial features, make the detection results more accurate, and improve the accuracy of product classification. At the same time, combined with computer vision, it can effectively reduce labor intensity and improve production efficiency, which is of great significance to improving product qualification rate.

[0132] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A fiberboard quality assessment method based on image processing, characterized in that: include: Get the surface image and grayscale image of medium density fiberboard; Gaussian distribution is established based on the gray value with the largest frequency in the gray image and the gray value mean to obtain the background gray value; Calculate the difference between the mean grayscale value of each pixel and its neighboring pixels in the grayscale image and the background grayscale value to obtain the attention level of each pixel; Compare the attention level of each pixel with the attention level threshold to obtain suspected defective pixels; The suspected defect pixels are classified using the region growing method to obtain all the first suspected dust spot defect regions; According to the gradient direction of each pixel point in the first suspected dust spot defect area and the direction of the line connecting each pixel point and the central pixel point, the credibility of all the pixel points in each first suspected dust spot defect area is obtained; The pixel points with higher credibility in each first suspected dust spot defect region are retained by using the region growing method to obtain all second suspected dust spot defect regions; According to the distance from the edge pixel point to the center point in each second suspected dust spot defect area, the probability that all the second suspected dust spot defect areas are dust spot defects is obtained; Obtaining a dust spot defect region according to the probability that each second suspected dust spot defect region is a dust spot defect; The quality of medium density fiberboard is evaluated based on the number and size of dust spot defect areas.

2. The fiberboard quality assessment method based on image processing according to claim 1, characterized in that: The background gray value is obtained as follows: Calculate the frequency and mean gray value of each gray level in the grayscale image of the medium density fiberboard surface; Establish a Gaussian distribution, and calculate the mean and variance of the Gaussian distribution based on the maximum grayscale value of the frequency and the grayscale value mean; According to the mean and variance of Gaussian distribution, the probability that each gray level in the grayscale image belongs to the background is obtained; The gray level corresponding to the maximum probability value is selected as the background to obtain the background gray value in the grayscale image.

3. The fiberboard quality assessment method based on image processing according to claim 1, characterized in that: The expression of the attention degree of each pixel is as follows: In the formula, C represents the attention level of the e-th pixel, F im represents the gray value of the background pixel, e represents the target pixel, and e j represents the gray value of the jth pixel of the target pixel e, J represents the number of neighboring pixels of the target pixel e, tanh is the hyperbolic tangent function, and ψ is a hyperparameter.

4. The fiberboard quality assessment method based on image processing according to claim 1, characterized in that: All the first suspected dust spot defect areas are obtained as follows: The pixel with the highest degree of concern among the suspected defect points is used as the growth seed point; Merge the suspected defect points within the 8-neighborhood of the growth seed point to obtain a region; The obtained area is used as a new growth seed point, and the suspected defect points in the 8-neighborhood of the new growth seed point are merged to obtain an updated area. The updated area is used as a new growth seed point and merged iteratively until there are no suspected defect points in the 8-neighborhood of the updated growth seed point, thereby obtaining a first suspected dust spot defect area; All first suspected dust spot defect regions are obtained according to the method for obtaining the first suspected dust spot defect region.

5. The fiberboard quality assessment method based on image processing according to claim 1, characterized in that: The credibility of all pixels in each first suspected dust spot defect area is obtained as follows: Obtaining the center point of each first suspected dust spot defect area; Get the direction of the lines connecting all the pixels within the range of n×n and the center point; Calculate the gradient of the grayscale image within the n×n range of the center point, and obtain the gradient direction of each pixel within the n×n range of the center point; The credibility of all pixels in each first suspected dust spot defect area is calculated according to the direction of the lines connecting all pixels within the n×n range of the center point and the center point and the gradient direction of each pixel within the n×n range of the center point.

6. The fiberboard quality assessment method based on image processing according to claim 1, characterized in that: All the second suspected dust spot defect areas are obtained as follows: The center point within the n×n range of each first suspected dust spot defect area is used as the growth seed point; A threshold is set, and pixels whose credibility is greater than or equal to the threshold are retained within the 8-neighborhood of the growth seed point, and the retained pixels are used as new growth seed points. Pixels whose credibility is greater than or equal to the threshold are retained within the 8-neighborhood of the new growth seed point, and the newly retained pixels are used as updated growth seed points and retained iteratively until there are no pixels whose credibility is greater than or equal to the threshold within the 8-neighborhood of the updated growth seed point, thereby obtaining a second suspected dust spot defect area; All second suspected dust spot defect regions are obtained according to the method for obtaining the second suspected dust spot defect region.

7. The fiberboard quality assessment method based on image processing according to claim 1, characterized in that: The expression for the probability that all the second suspected dust spot defect regions are dust spot defects is as follows: Where G represents the probability that each second suspected dust spot defect area is a dust spot defect, tanh is the hyperbolic tangent function, ψ' is a hyperparameter, K is the number of edge points in the connected domain, g represents the distance from the edge pixel to the center point, and g k Represents the distance from the kth edge point to the center point.

Citation Information

Patent Citations

  • Mechanical casting defect detection method and system based on artificial intelligence

    CN113538433A

  • Method for the adaptive recognition of a defect on a structured surface

    EP1491879A2