A wood product processing quality inspection system based on industrial vision
Through an industrial vision-based detection system, the early and late materials areas on the surface of wood products are identified, and the degree of separation and transition indicators are calculated. The problem of low accuracy in detection of wood grain bump defects is solved, and the quality of wood products is detected is realized. High accuracy.
Patent Information
- Application Number
- CN202411364372.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-29
AI Technical Summary
In the prior art, in the quality inspection of wood product processing, the grayscale difference between the wood grain convex defect area and the surface area of the wood product is not obvious, resulting in misjudgment of the pixel points of the convex defect, thereby reducing the detection accuracy.
Using an industrial vision-based detection system, the early and late materials areas are identified by obtaining visible light images on the surface of wood products, and the grayscale values of the grayscale values of these areas, standard deviations, and the grayscale values of normal pixels on the crossing line are calculated. The degree of separation of morning and evening materials and transition indicators, quantify the wood grain raised defect indicators to improve detection accuracy.
By quantifying multiple indicators related to wood grain raised defects, accurately identifying wood grain raised defect areas, improving the accuracy of wood product processing quality inspection. Compared with relying solely on grayscale value detection, the accuracy of detection is significantly improved sex.
Smart Images

Figure CN118864482B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of wood testing and analysis, and in particular to a wood product processing quality detection system based on industrial vision. Background Art
[0002] Wood products are products made from wood raw materials after processing and manufacturing. They are widely used in industries such as construction, furniture and decoration. Therefore, it is very important to inspect the processing quality of wood products. Since wood grain protrusion defects are a common defect that affects the processing quality of wood products, it is often possible to detect the processing quality of wood products by performing wood grain protrusion defect detection on wood products. At present, when performing defect detection, the commonly used method is to detect defect areas from the collected image according to different grayscale values to achieve defect detection.
[0003] However, when detecting the grain convex defect area from the collected wood product surface image according to the gray value to realize the wood product processing quality inspection, the following technical problems often occur:
[0004] Since the grayscale difference between the wood grain raised defect area and the surface area of the wood product is often not obvious, if only the difference in grayscale values is considered when detecting the wood grain raised defect area from the surface image of the wood product, it may often cause misjudgment of the wood grain raised defect pixel points, resulting in poor accuracy in detecting the wood grain raised defect area, and further resulting in poor accuracy in detecting the processing quality of the wood product. Summary of the invention
[0005] In order to solve the technical problem of poor accuracy in wood product processing quality inspection, the present invention proposes a wood product processing quality inspection system based on industrial vision.
[0006] The present invention provides a wood product processing quality detection system based on industrial vision, the system comprising:
[0007] An acquisition and recognition module is used to acquire a surface visible light image corresponding to the wood product to be detected, identify an earlywood area and a latewood area from the surface visible light image, and use a junction line between the earlywood area and the latewood area as a target junction line;
[0008] An earlywood and latewood separation determination module is used to determine the degree of earlywood and latewood separation corresponding to each pixel point on each target intersection line according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale value corresponding to the pixel point on the normal line corresponding to each pixel point on each target intersection line;
[0009] An early-late wood transition processing module is used to perform early-late wood transition distribution analysis on each pixel point on each target intersection line to obtain an early-late wood transition index corresponding to each pixel point on each target intersection line;
[0010] A defect index determination module is used to determine the wood grain protrusion defect index corresponding to each pixel point on each target intersection line according to the early and late wood separation degree and the early and late wood transition index corresponding to each pixel point on each target intersection line;
[0011] The processing quality detection module is used to perform processing quality detection on the wooden product to be detected according to the wood grain protrusion defect indicators corresponding to all pixel points on all target intersection lines.
[0012] Optionally, determining the degree of earlywood and latewood separation corresponding to each pixel point on each target intersection line according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale value corresponding to the pixel point on the normal line corresponding to each pixel point on each target intersection line comprises:
[0013] Determine any target intersection line as a marked intersection line, and determine any pixel point on the marked intersection line as a marked pixel point;
[0014] Intercepting a target normal segment corresponding to the marked pixel point from the normal line corresponding to the marked pixel point, wherein the marked pixel point is located at the center of the target normal segment corresponding to it, and the length of the target normal segment is a preset length;
[0015] Determine the target abnormality degree corresponding to each pixel point on the target normal segment corresponding to the marked pixel point according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale value corresponding to each pixel point on the target normal segment corresponding to the marked pixel point;
[0016] The earlywood and latewood separation degree corresponding to the marked pixel point is determined according to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point.
[0017] Optionally, the formula corresponding to the target abnormality degree corresponding to the pixel point on the target normal segment corresponding to the pixel point on the target intersection line is:
[0018] ;in, is the target abnormality degree corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line; i is the serial number of the target intersection line; j is the serial number of the pixel on the i-th target intersection line; k is the serial number of the pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line; It is the absolute value function; is the gray value corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line; It is the mean of the gray values corresponding to all pixels in the early wood area; is the mean of the gray values corresponding to all pixels in the latewood area; is the standard deviation of the grayscale values corresponding to all pixels in the early wood area; is the standard deviation of the grayscale values corresponding to all pixels in the latewood area; and is a pre-set factor greater than 0.
[0019] Optionally, determining the earlywood and latewood separation degree corresponding to the marked pixel point according to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point includes:
[0020] According to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point, the abnormality degree threshold corresponding to the marked pixel point is determined through the Otsu threshold;
[0021] The pixel point whose target abnormality degree on the target normal segment corresponding to the marked pixel point is greater than the corresponding abnormality degree threshold is determined as an abnormal pixel point, and the longest abnormal pixel point segment is selected from the abnormal pixel point segments formed by continuous abnormal pixel points as the target abnormal pixel point segment corresponding to the marked pixel point;
[0022] The degree of earlywood and latewood separation corresponding to the marked pixel is determined according to the mean and standard deviation of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the marked pixel, the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, and the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area.
[0023] Optionally, the formula corresponding to the degree of separation of early and late wood corresponding to the pixel points on the target intersection line is:
[0024] ;in, is the degree of separation of early and late wood corresponding to the jth pixel point on the i-th target intersection line; i is the serial number of the target intersection line; j is the serial number of the pixel point on the i-th target intersection line; is the normalization function; is the length of the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line; It is the absolute value function; It is the mean of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line; It is the mean of the gray values corresponding to all pixels in the early wood area; is the mean of the gray values corresponding to all pixels in the latewood area; is the standard deviation of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line; is the standard deviation of the grayscale values corresponding to all pixels in the early wood area; is the standard deviation of the grayscale values corresponding to all pixels in the latewood area; , and is a pre-set factor greater than 0.
[0025] Optionally, performing early-late wood transition distribution analysis processing on each pixel point on each target intersection line to obtain an early-late wood transition index corresponding to each pixel point on each target intersection line includes:
[0026] Determine any target intersection line as a marked intersection line, and determine any pixel point on the marked intersection line as a marked pixel point;
[0027] Intercepting a target normal segment corresponding to the marked pixel point from the normal line corresponding to the marked pixel point, wherein the marked pixel point is located at the center of the target normal segment corresponding to it, and the length of the target normal segment is a preset length;
[0028] Determine the absolute value of the difference between the grayscale values corresponding to each pixel point in the target normal segment corresponding to the marked pixel point and the grayscale values corresponding to the adjacent pixel point as the grayscale difference corresponding to each pixel point in the target normal segment corresponding to the marked pixel point;
[0029] The representative standard deviation is determined as the average of the standard deviation of the grayscale values corresponding to all the pixels in the earlywood region and the standard deviation of the grayscale values corresponding to all the pixels in the latewood region;
[0030] Determine the difference between the grayscale difference corresponding to each pixel in the target normal segment corresponding to the marked pixel and the representative standard deviation as the grayscale fluctuation degree corresponding to each pixel in the target normal segment corresponding to the marked pixel;
[0031] Determine the pixel points whose grayscale fluctuation degree on the target normal segment corresponding to the marked pixel point is greater than 0 as the fluctuating pixel points, and select the longest fluctuating pixel point segment from the fluctuating pixel point segments formed by the continuous fluctuating pixel points as the target fluctuating pixel point segment corresponding to the marked pixel point;
[0032] The absolute value of the difference between the grayscale values corresponding to each adjacent fluctuation pixel point in the target fluctuation pixel point segment corresponding to the marked pixel point is determined as the grayscale fluctuation difference between each adjacent fluctuation pixel point;
[0033] The early-late wood transition index corresponding to the marked pixel point is determined according to the average of the grayscale fluctuation differences between all adjacent fluctuation pixels in the target fluctuation pixel point segment corresponding to the marked pixel point and the length of the target fluctuation pixel point segment corresponding to the marked pixel point.
[0034] Optionally, the formula corresponding to the early and late wood transition index corresponding to the pixel point on the target intersection line is:
[0035] ;in, is the early-late material transition index corresponding to the jth pixel point on the i-th target intersection line; i is the serial number of the target intersection line; j is the serial number of the pixel point on the i-th target intersection line; is the normalization function; It is the mean value of the grayscale fluctuation difference between all adjacent fluctuation pixels in the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line; is the length of the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line; is a pre-set factor greater than 0.
[0036] Optionally, determining the wood grain protrusion defect index corresponding to each pixel point on each target junction line according to the earlywood and latewood separation degree and the earlywood and latewood transition index corresponding to each pixel point on each target junction line includes:
[0037] The product of the early-late wood separation degree and the early-late wood transition index corresponding to each pixel point on each target intersection line is determined as the wood grain protrusion defect index corresponding to each pixel point on each target intersection line.
[0038] Optionally, the processing quality inspection of the to-be-inspected wooden product according to the wood grain protrusion defect indexes corresponding to all pixel points on all target intersection lines includes:
[0039] When the wood grain bulge defect index corresponding to the pixel point on the target intersection line is greater than the preset defect threshold, the pixel point on the target intersection line is determined as a wood grain bulge defect pixel point;
[0040] If there are wood grain raised defect pixels in the surface visible light image, it is determined that the wood product to be inspected has a wood grain raised defect quality problem.
[0041] Optionally, identifying the earlywood area and the latewood area from the surface visible light image comprises:
[0042] Segmenting the wood product area from the surface visible light image by threshold segmentation;
[0043] By using the K-means algorithm, the pixels in the wood product area are clustered into two clusters, and the area where the cluster with a larger average grayscale value in the two clusters is located is determined as the earlywood area, and the area where the cluster with a smaller average grayscale value in the two clusters is located is determined as the latewood area.
[0044] The present invention has the following beneficial effects:
[0045] A wood product processing quality detection system based on industrial vision of the present invention realizes the processing quality detection of wood products by optical means, specifically by using visible light means to perform wood analysis and testing, solves the technical problem of poor accuracy in processing quality detection of wood products, and improves the accuracy of processing quality detection of wood products. First, since the surface visible light image contains the surface information of the wood product to be detected, the surface visible light image is obtained, which can facilitate the subsequent detection of whether there is a wood grain protrusion defect on the surface of the wood product to be detected. Secondly, since the wood grain protrusion defect often exists at the junction between the early wood area and the late wood area, the early wood area and the late wood area are identified, and the intersection line between the early wood area and the late wood area is used as the target intersection line, which can facilitate the subsequent analysis of whether there is a wood grain protrusion defect pixel point on the target intersection line. Then, in actual situations, when there is a wood grain protrusion defect in a wood product, it often causes separation between the early wood and the late wood of the wood product. Therefore, the greater the degree of separation of the early and late wood corresponding to the pixel point on the quantified target intersection line, the more likely it is that the pixel point is a wood grain protrusion defect pixel point. Then, wood grain raised defects are often caused by the difference in physical properties between early wood and late wood, so wood grain raised defects often occur in the transition area from late wood to early wood. Therefore, the early-late wood transition index corresponding to the pixel point on the quantified target intersection line can characterize whether the pixel point is a wood grain raised defect pixel point to a certain extent. Therefore, the larger the wood grain raised defect index corresponding to the pixel point on the quantified target intersection line, the more likely the pixel point is a wood grain raised defect pixel point. Finally, since the wood grain raised defect index can be used to identify wood grain raised defect pixels, based on the wood grain raised defect index corresponding to all pixels on all target intersection lines, it can be convenient to subsequently identify the wood grain raised defect area from the surface visible light image, thereby realizing the processing quality inspection of the wood products to be inspected. Compared with only considering the difference in grayscale values, the wood grain raised defect area is detected from the surface visible light image to realize the processing quality inspection of the wooden products to be inspected. The present invention quantifies multiple indicators related to the characteristics of wood grain raised defects, such as the degree of separation of early wood and late wood, the early wood and late wood transition index and the wood grain raised defect index, etc., thereby more accurately realizing the identification of wood grain raised defects of the wooden products to be inspected, thereby improving the accuracy of the processing quality inspection of the wooden products to be inspected. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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 work.
[0047] Figure 1 It is a structural schematic diagram of a wood product processing quality inspection system based on industrial vision of the present invention. DETAILED DESCRIPTION
[0048] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the technical solutions proposed by the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0049] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0050] refer to Figure 1 , shows a schematic diagram of the structure of a wood product processing quality detection system based on industrial vision according to the present invention. The wood product processing quality detection system based on industrial vision includes:
[0051] The acquisition and recognition module 101 is used to acquire the surface visible light image corresponding to the wood product to be detected, identify the early wood area and the late wood area from the surface visible light image, and use the intersection line between the early wood area and the late wood area as the target intersection line.
[0052] Among them, the wood product to be tested can be a wood product to be tested for wood grain raised defect. The characteristic of wood grain raised defect is that the early wood and late wood parts on the cutting surface cannot form the same smooth surface and present concave-convex wood grain. Wood products are products formed by processing and manufacturing wood raw materials. The early wood area and the late wood area can be the early wood part and the late wood part of the wood product to be tested, respectively. The intersection line between the early wood area and the late wood area, that is, the boundary curve between the early wood area and the late wood area, is a curve that characterizes the boundary between the early wood area and the late wood area.
[0053] It should be noted that, since the surface visible light image contains the surface information of the wood product to be inspected, obtaining the surface visible light image can facilitate the subsequent detection of whether there is a wood grain protrusion defect on the surface of the wood product to be inspected. Secondly, since wood grain protrusion defects often exist at the junction between the early wood area and the late wood area, the early wood area and the late wood area are identified, and the intersection line between the early wood area and the late wood area is used as the target intersection line, which can facilitate the subsequent analysis of whether there are wood grain protrusion defect pixels on the target intersection line.
[0054] As an example, this step may include the following steps:
[0055] The first step is to obtain the surface visible light image corresponding to the wooden product to be inspected.
[0056] For example, an industrial camera can be used to capture the surface image of the wood product to be inspected, and the captured surface image can be grayscaled, and the grayscaled surface image can be used as the surface visible light image. When capturing the surface image of the wood product to be inspected, the wood product to be inspected can be placed flat on the inspection table, and a surface light source can be set above the wood product to be inspected, and the surface light source can be used to illuminate the wood product to be inspected so that it can better show the defect characteristics. An industrial camera can also be installed directly above the wood product to be inspected, and the surface image of the wood product to be inspected can be captured by the industrial camera.
[0057] In the second step, the wood product area is segmented from the above surface visible light image through threshold segmentation.
[0058] The wood product area is the area where the wood product to be detected is located in the surface visible light image.
[0059] In the third step, the pixels in the above-mentioned wood product area are clustered into two clusters through the K-means (K-means clustering algorithm), and the area where the cluster with the larger average grayscale value is located is determined as the earlywood area, and the area where the cluster with the smaller average grayscale value is located is determined as the latewood area.
[0060] The fourth step is to use the boundary curve between the earlywood area and the latewood area as the target intersection line.
[0061] The earlywood and latewood separation determination module 102 is used to determine the degree of earlywood and latewood separation corresponding to each pixel point on each target intersection line according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale values corresponding to the pixels on the normal line corresponding to each pixel point on each target intersection line.
[0062] The normal corresponding to the pixel point on the target intersection line is a straight line perpendicular to the tangent line of the target intersection line at the pixel point. The normal corresponding to the pixel point on the target intersection line can be obtained by fitting the normal corresponding to the pixel point on the target intersection line through the least squares method.
[0063] It should be noted that in actual situations, when wood products have wood grain convex defects, it often causes separation between the early wood and late wood of the wood products. Therefore, the greater the degree of separation between the early wood and late wood corresponding to the pixel point on the quantified target intersection line, the more likely the pixel point is a wood grain convex defect pixel point.
[0064] As an example, this step may include the following steps:
[0065] In the first step, any target intersection line is determined as a marked intersection line, and any pixel point on the marked intersection line is determined as a marked pixel point.
[0066] The second step is to intercept the target normal segment corresponding to the above-mentioned marked pixel point from the normal line corresponding to the above-mentioned marked pixel point.
[0067] The above-mentioned marked pixel point may be located at the center of the corresponding target normal segment. The length of the target normal segment may be a preset length. The preset length may be a pre-set length. The length in the embodiment of the present invention may be represented by the number of pixels. For example, the preset length may be 31. If the preset length is 31, the number of pixels in the target normal segment may be 31.
[0068] The third step is to determine the target abnormality degree corresponding to each pixel point on the target normal segment corresponding to the marked pixel point based on the mean and standard deviation of the grayscale values corresponding to all pixels in the early wood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the late wood area, and the grayscale value corresponding to each pixel point on the target normal segment corresponding to the marked pixel point.
[0069] For example, the formula for determining the target abnormality degree corresponding to the pixel point on the target normal segment corresponding to the pixel point on the target intersection line can be:
[0070] ;in, is the target abnormality degree corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line. i is the serial number of the target intersection line. j is the serial number of the pixel on the i-th target intersection line. k is the serial number of the pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line. It is the absolute value function. It is the gray value corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line. It is the mean of the gray values corresponding to all pixels in the early wood area. It is the mean of the gray values corresponding to all pixels in the latewood area. It is the standard deviation of the grayscale values corresponding to all pixels in the early wood area. is the standard deviation of the grayscale values corresponding to all pixels in the latewood area. and It is a pre-set factor greater than 0, mainly used to prevent the denominator from being 0, for example, and It can be 0.001.
[0071] It should be noted that wood grain convex defects are often caused by the hardness difference between early wood and late wood during cutting. Therefore, an important feature of wood grain convex defects is that early wood and late wood are separated from each other. Due to lighting reasons, there may be an abnormal gray value caused by shadows in the gray value distribution on both sides of the intersection, which is often quite different from the gray value difference between early wood and late wood. The larger the value is, the more likely it is that the grayscale value corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line is to deviate relatively from the grayscale value in the early material area. When the value is larger, it often means that the gray value corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line is more likely to deviate from the gray value in the latewood area. When it is larger, it often means that the grayscale value corresponding to the k-th pixel on the target normal segment corresponding to the j-th pixel on the ith target intersection line is more likely to deviate from the grayscale values in the earlywood area and the latewood area; it often means that the grayscale value corresponding to the k-th pixel on the target normal segment corresponding to the j-th pixel on the ith target intersection line is more likely to be an abnormal grayscale value, and it often means that the k-th pixel on the target normal segment corresponding to the j-th pixel on the ith target intersection line is more likely to be an abnormal pixel.
[0072] The fourth step, according to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point, determines the earlywood and latewood separation degree corresponding to the marked pixel point, which may include the following sub-steps:
[0073] In the first sub-step, according to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point, the abnormality degree threshold corresponding to the marked pixel point is determined by using the Otsu threshold.
[0074] The abnormality level threshold corresponding to the marked pixel point may be: a segmentation threshold value obtained by performing threshold segmentation through an Otsu threshold based on the target abnormality level corresponding to all pixels on the target normal segment corresponding to the marked pixel point.
[0075] In the second sub-step, the pixel points on the target normal segment corresponding to the above-mentioned marked pixel points, whose target abnormality degree is greater than the corresponding abnormality degree threshold, are determined as abnormal pixels, and the longest abnormal pixel segment is selected from the abnormal pixel segment composed of continuous abnormal pixel points as the target abnormal pixel segment corresponding to the above-mentioned marked pixel points.
[0076] For example, if the target normal segment corresponding to the marked pixel point is {first pixel point, second pixel point, third pixel point, fourth pixel point, fifth pixel point, sixth pixel point, seventh pixel point}, and the target abnormality levels corresponding to the first pixel point, the second pixel point, the fourth pixel point, the fifth pixel point, the sixth pixel point and the seventh pixel point are greater than the abnormality level threshold corresponding to the marked pixel point, then at this time, there can be two abnormal pixel segments corresponding to the marked pixel point, which can be {first pixel point, second pixel point} and {fourth pixel point, fifth pixel point, sixth pixel point, seventh pixel point} respectively; at this time, the target abnormal pixel segment corresponding to the marked pixel point can be {fourth pixel point, fifth pixel point, sixth pixel point, seventh pixel point}.
[0077] The third sub-step is to determine the degree of earlywood and latewood separation corresponding to the marked pixel point according to the mean and standard deviation of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the marked pixel point, the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, and the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area.
[0078] For example, the formula for determining the degree of separation of early and late wood corresponding to the pixel point on the target intersection line can be:
[0079] ;in, is the degree of separation of early and late wood corresponding to the jth pixel on the i-th target intersection line. i is the serial number of the target intersection line. j is the serial number of the pixel on the i-th target intersection line. is a normalization function. It is the length of the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line. It is the absolute value function. It is the mean of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line. It is the mean of the gray values corresponding to all pixels in the early wood area; It is the mean of the gray values corresponding to all pixels in the latewood area. It is the standard deviation of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line. It is the standard deviation of the grayscale values corresponding to all pixels in the early wood area. is the standard deviation of the grayscale values corresponding to all pixels in the latewood area. , and It is a pre-set factor greater than 0, mainly used to prevent the denominator from being 0, such as, , and It can be 0.001.
[0080] It should be noted that the wider the abnormal grayscale value spatial distribution in the grayscale value distribution on both sides of the earlywood and latewood junction, that is, the longer the target abnormal pixel segment, the greater the separation between the earlywood and latewood. When it is larger, it often means that the target abnormal pixel segment corresponding to the jth pixel on the ith target intersection line is longer, which often means that the separation degree between the earlywood and the latewood at the jth pixel on the ith target intersection line is greater. The greater the difference between the abnormal gray value and the gray value of the early and late wood in the gray value distribution on both sides of the early and late wood intersection line, that is, the greater the difference between the gray value of the target abnormal pixel segment and the gray value of the early and late wood, it often means that the separation degree between the earlywood and the latewood is greater. Therefore, when When the value is larger, it often means that the grayscale value in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line is more likely to deviate from the grayscale values in the earlywood area and the latewood area; it often means that the grayscale value in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line is larger than the grayscale value of the earlywood and latewood, and the separation degree between the earlywood and latewood at the jth pixel on the i-th target intersection line is larger. The smaller it is, the more uniform the grayscale distribution of the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line is, and the higher the recognition accuracy of the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line is. When it is larger, it often indicates that the degree of separation between the early wood and the late wood at the jth pixel point on the i-th target intersection line is greater, which often indicates that the jth pixel point on the i-th target intersection line is more likely to be a wood grain raised defect pixel point.
[0081] The early-late wood transition processing module 103 is used to perform early-late wood transition distribution analysis processing on each pixel point on each target intersection line to obtain the early-late wood transition index corresponding to each pixel point on each target intersection line.
[0082] It should be noted that wood grain defects are often caused by the difference in physical properties between earlywood and latewood, so wood grain defects often occur in the transition area from latewood to earlywood. Therefore, the early-late wood transition index corresponding to the pixel point on the quantitative target intersection line can, to a certain extent, characterize whether the pixel point is a wood grain defect pixel point.
[0083] As an example, this step may include the following steps:
[0084] In the first step, any target intersection line is determined as a marked intersection line, and any pixel point on the marked intersection line is determined as a marked pixel point.
[0085] The second step is to intercept the target normal segment corresponding to the above-mentioned marked pixel point from the normal line corresponding to the above-mentioned marked pixel point.
[0086] The marked pixel point may be located at the center of the corresponding target normal segment. The length of the target normal segment may be a preset length.
[0087] In the third step, the absolute value of the difference between the grayscale values corresponding to each pixel point in the target normal segment corresponding to the marked pixel point and the adjacent pixel point is determined as the grayscale difference corresponding to each pixel point in the target normal segment corresponding to the marked pixel point.
[0088] For example, the grayscale difference corresponding to the first pixel in the target normal segment corresponding to the marked pixel may be: the absolute value of the difference between the grayscale value corresponding to the first pixel and the grayscale value corresponding to the second pixel in the target normal segment corresponding to the marked pixel. The method for determining the grayscale difference corresponding to the pixels other than the first pixel in the target normal segment corresponding to the marked pixel may be: any pixel other than the first pixel in the target normal segment corresponding to the marked pixel may be determined as a reference pixel, and the absolute value of the difference between the grayscale value corresponding to the reference pixel and the grayscale value corresponding to the pixel before the reference pixel may be determined as the grayscale difference corresponding to the reference pixel.
[0089] In the fourth step, the mean of the standard deviation of the grayscale values corresponding to all the pixels in the earlywood region and the standard deviation of the grayscale values corresponding to all the pixels in the latewood region is determined as the representative standard deviation.
[0090] For example, the standard deviation of the grayscale values corresponding to all pixels in the early wood area can be determined as the first standard deviation; the standard deviation of the grayscale values corresponding to all pixels in the late wood area can be determined as the second standard deviation; and the average of the first standard deviation and the second standard deviation can be determined as the representative standard deviation.
[0091] In the fifth step, the difference between the grayscale difference corresponding to each pixel in the target normal segment corresponding to the marked pixel and the representative standard deviation is determined as the grayscale fluctuation degree corresponding to each pixel in the target normal segment corresponding to the marked pixel.
[0092] The grayscale fluctuation degree corresponding to the pixel point may be equal to the grayscale difference corresponding to the pixel point minus the representative standard deviation.
[0093] In the sixth step, the pixels whose grayscale fluctuation degree on the target normal segment corresponding to the above-mentioned marked pixel points is determined as fluctuating pixels, and the longest fluctuating pixel segment is selected from the fluctuating pixel segment composed of continuous fluctuating pixel points as the target fluctuating pixel segment corresponding to the above-mentioned marked pixel points.
[0094] In the seventh step, the absolute value of the difference between the grayscale values corresponding to each adjacent fluctuating pixel point in the target fluctuating pixel point segment corresponding to the above-mentioned marked pixel point is determined as the grayscale fluctuation difference between each adjacent fluctuating pixel point.
[0095] The eighth step is to determine the early-late wood transition index corresponding to the marked pixel point according to the average of the grayscale fluctuation differences between all adjacent fluctuation pixels in the target fluctuation pixel segment corresponding to the marked pixel point and the length of the target fluctuation pixel segment corresponding to the marked pixel point.
[0096] For example, the formula for determining the early-late wood transition index corresponding to the pixel point on the target intersection line can be:
[0097] ;in, is the early-late material transition index corresponding to the jth pixel on the i-th target intersection line. i is the serial number of the target intersection line. j is the serial number of the pixel on the i-th target intersection line. is a normalization function. It is the mean of the grayscale fluctuation differences between all adjacent fluctuation pixels in the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line. It is the length of the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line. It is a pre-set factor greater than 0, mainly used to prevent the denominator from being 0, for example, It can be 0.001.
[0098] It should be noted that there are generally two reasons for the junction line between earlywood and latewood: one is the transition from earlywood to latewood. At this time, due to the slow changes in climate and tree growth, the transition from earlywood to latewood is often smoother, and the grayscale value distribution on both sides of the junction line is often smoother; the other is the transition from latewood to earlywood. At this time, the growth of earlywood is relatively rapid, resulting in a rapid transition between earlywood and latewood. At this time, the grayscale value distribution on both sides of the junction line is quite different. Wood grain defects are often caused by the difference in physical properties between earlywood and latewood, which causes wood grain defects to often occur in the transition area from latewood to earlywood. Therefore, the greater the difference in grayscale value distribution on both sides of the junction line, it often indicates that wood grain defects are more likely to occur. Since the fluctuating pixels in the target fluctuating pixel segment are pixels with large grayscale fluctuations, when When the value is larger, it often means that the grayscale change speed between the fluctuating pixels in the target fluctuating pixel segment corresponding to the jth pixel on the i-th target intersection line is faster, and the grayscale value distribution difference on both sides of the jth pixel on the i-th target intersection line may be greater, which often means that the jth pixel on the i-th target intersection line is more likely to be located in the transition area from late wood to early wood, and it is relatively easier to produce wood grain protrusion defects. When it is larger, it often means that the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line is longer, and the early and late wood intersection area at the jth pixel on the i-th target intersection line is wider, which often means that the grayscale difference at the jth pixel on the i-th target intersection line may change more slowly, and it is more likely to be the transition area from early wood to late wood, and it is relatively less likely to produce wood grain protrusion defects. Therefore, when When the value is larger, it often indicates that the jth pixel on the i-th target intersection line is more likely to be a wood grain bulge defect pixel.
[0099] Optionally, the early-late material transition index corresponding to the jth pixel point on the i-th target intersection line is The corresponding formula can also be:
[0100] .
[0101] The defect index determination module 104 is used to determine the wood grain protrusion defect index corresponding to each pixel point on each target junction line according to the early wood and late wood separation degree and the early wood and late wood transition index corresponding to each pixel point on each target junction line.
[0102] It should be noted that the larger the wood grain convex defect index corresponding to the pixel point on the quantified target intersection line is, the more likely the pixel point is a wood grain convex defect pixel point.
[0103] As an example, the product of the earlywood and latewood separation degree and the earlywood and latewood transition index corresponding to each pixel point on each target intersection line may be determined as the wood grain protrusion defect index corresponding to each pixel point on each target intersection line.
[0104] For example, the formula for determining the wood grain protrusion defect index corresponding to the pixel point on the target intersection line can be:
[0105] ;in, is the wood grain convex defect index corresponding to the jth pixel point on the i-th target intersection line. i is the serial number of the target intersection line. j is the serial number of the pixel point on the i-th target intersection line. It is the early-late material transition index corresponding to the j-th pixel point on the i-th target intersection line. It is the degree of separation between early and late materials corresponding to the jth pixel point on the i-th target intersection line.
[0106] It should be noted that when When the value is larger, it often indicates that the separation degree between the early wood and the late wood at the jth pixel point on the i-th target intersection line is greater, and it often indicates that the jth pixel point on the i-th target intersection line is more likely to be a wood grain convex defect pixel point. The larger the value is, the more likely the jth pixel on the i-th target intersection line is to be a wood grain convex defect pixel. When the value is larger, it often indicates that the jth pixel on the i-th target intersection line is more likely to be a wood grain bulge defect pixel.
[0107] The processing quality detection module 105 is used to perform processing quality detection on the wood product to be detected according to the wood grain protrusion defect indicators corresponding to all pixel points on all target intersection lines.
[0108] It should be noted that since the wood grain raised defect index can be used to identify wood grain raised defect pixel points, the wood grain raised defect index corresponding to all pixel points on all target intersection lines can facilitate the subsequent identification of the wood grain raised defect area from the surface visible light image, thereby realizing the processing quality inspection of the wood products to be inspected.
[0109] As an example, this step may include the following steps:
[0110] In the first step, when the wood grain bulge defect index corresponding to the pixel point on the target intersection line is greater than a preset defect threshold, the pixel point on the target intersection line is determined as a wood grain bulge defect pixel point.
[0111] The preset defect threshold may be a preset threshold, for example, the preset defect threshold may be 0.6.
[0112] In the second step, if there are wood grain raised defect pixels in the above surface visible light image, it is determined that the above wooden product to be inspected has a wood grain raised defect quality problem.
[0113] In summary, compared with only considering the difference in grayscale values, the wood grain raised defect area is detected from the surface visible light image to realize the processing quality inspection of the wooden products to be inspected. The present invention quantifies multiple indicators related to the characteristics of wood grain raised defects, such as the degree of separation of early wood and late wood, the early wood and late wood transition index and the wood grain raised defect index, etc., thereby more accurately realizing the identification of wood grain raised defects of the wooden products to be inspected, thereby improving the accuracy of the processing quality inspection of the wooden products to be inspected.
[0114] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A wood product processing quality inspection system based on industrial vision, characterized in that: The system comprises: An acquisition and recognition module is used to acquire a surface visible light image corresponding to the wood product to be detected, identify an earlywood area and a latewood area from the surface visible light image, and use a junction line between the earlywood area and the latewood area as a target junction line; An earlywood and latewood separation determination module is used to determine the degree of earlywood and latewood separation corresponding to each pixel point on each target intersection line according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale value corresponding to the pixel point on the normal line corresponding to each pixel point on each target intersection line; An early-late wood transition processing module is used to perform early-late wood transition distribution analysis on each pixel point on each target intersection line to obtain an early-late wood transition index corresponding to each pixel point on each target intersection line; A defect index determination module is used to determine the wood grain protrusion defect index corresponding to each pixel point on each target intersection line according to the early and late wood separation degree and the early and late wood transition index corresponding to each pixel point on each target intersection line; A processing quality detection module, used to perform processing quality detection on the wood product to be detected according to wood grain protrusion defect indicators corresponding to all pixel points on all target intersection lines; Determining the degree of earlywood and latewood separation corresponding to each pixel point on each target intersection line according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale values corresponding to the pixels on the normal line corresponding to each pixel point on each target intersection line, comprises: Determine any target intersection line as a marked intersection line, and determine any pixel point on the marked intersection line as a marked pixel point; Intercepting a target normal segment corresponding to the marked pixel point from the normal line corresponding to the marked pixel point, wherein the marked pixel point is located at the center of the target normal segment corresponding to it, and the length of the target normal segment is a preset length; Determine the target abnormality degree corresponding to each pixel point on the target normal segment corresponding to the marked pixel point according to the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area, and the grayscale value corresponding to each pixel point on the target normal segment corresponding to the marked pixel point; The earlywood and latewood separation degree corresponding to the marked pixel point is determined according to the target abnormality degree corresponding to all pixel points on the target normal segment corresponding to the marked pixel point.
2. The wood product processing quality inspection system based on industrial vision according to claim 1 is characterized in that: The formula corresponding to the target abnormality degree corresponding to the pixel point on the target normal segment corresponding to the pixel point on the target intersection line is: ;in, is the target abnormality degree corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line; i is the serial number of the target intersection line; j is the serial number of the pixel on the i-th target intersection line; k is the serial number of the pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line; It is the absolute value function; is the gray value corresponding to the kth pixel on the target normal segment corresponding to the jth pixel on the i-th target intersection line; It is the mean of the gray values corresponding to all pixels in the early wood area; is the mean of the gray values corresponding to all pixels in the latewood area; is the standard deviation of the grayscale values corresponding to all pixels in the early wood area; is the standard deviation of the grayscale values corresponding to all pixels in the latewood area; and is a pre-set factor greater than 0.
3. The wood product processing quality inspection system based on industrial vision according to claim 1 is characterized in that: The determining the earlywood and latewood separation degree corresponding to the marked pixel point according to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point comprises: According to the target abnormality degree corresponding to all pixels on the target normal segment corresponding to the marked pixel point, the abnormality degree threshold corresponding to the marked pixel point is determined through the Otsu threshold; The pixel point whose target abnormality degree on the target normal segment corresponding to the marked pixel point is greater than the corresponding abnormality degree threshold is determined as an abnormal pixel point, and the longest abnormal pixel point segment is selected from the abnormal pixel point segments formed by continuous abnormal pixel points as the target abnormal pixel point segment corresponding to the marked pixel point; The degree of earlywood and latewood separation corresponding to the marked pixel is determined according to the mean and standard deviation of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the marked pixel, the mean and standard deviation of the grayscale values corresponding to all pixels in the earlywood area, and the mean and standard deviation of the grayscale values corresponding to all pixels in the latewood area.
4. The wood product processing quality inspection system based on industrial vision according to claim 3 is characterized in that: The formula corresponding to the degree of separation of early and late wood corresponding to the pixel points on the target intersection line is: ;in, is the degree of separation of early and late wood corresponding to the jth pixel point on the i-th target intersection line; i is the serial number of the target intersection line; j is the serial number of the pixel point on the i-th target intersection line; is the normalization function; is the length of the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line; It is the absolute value function; It is the mean of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line; It is the mean of the gray values corresponding to all pixels in the early wood area; is the mean of the gray values corresponding to all pixels in the latewood area; is the standard deviation of the grayscale values corresponding to all abnormal pixels in the target abnormal pixel segment corresponding to the jth pixel on the i-th target intersection line; is the standard deviation of the grayscale values corresponding to all pixels in the early wood area; is the standard deviation of the grayscale values corresponding to all pixels in the latewood area; , and is a pre-set factor greater than 0.
5. The wood product processing quality inspection system based on industrial vision according to claim 1 is characterized in that: The early-late wood transition distribution analysis processing is performed on each pixel point on each target intersection line to obtain the early-late wood transition index corresponding to each pixel point on each target intersection line, including: Determine any target intersection line as a marked intersection line, and determine any pixel point on the marked intersection line as a marked pixel point; Intercepting a target normal segment corresponding to the marked pixel point from the normal line corresponding to the marked pixel point, wherein the marked pixel point is located at the center of the target normal segment corresponding to it, and the length of the target normal segment is a preset length; The absolute value of the difference between the grayscale values corresponding to each pixel point and the adjacent pixel point in the target normal segment corresponding to the marked pixel point is determined as the grayscale difference corresponding to each pixel point in the target normal segment corresponding to the marked pixel point; the grayscale difference corresponding to the first pixel point in the target normal segment corresponding to the marked pixel point is: the absolute value of the difference between the grayscale value corresponding to the first pixel point and the grayscale value corresponding to the second pixel point in the target normal segment corresponding to the marked pixel point; the method for determining the grayscale difference corresponding to the pixels other than the first pixel point in the target normal segment corresponding to the marked pixel point is: any pixel point other than the first pixel point in the target normal segment corresponding to the marked pixel point is determined as a reference pixel point, and the absolute value of the difference between the grayscale value corresponding to the reference pixel point and the grayscale value corresponding to the pixel point before the reference pixel point is determined as the grayscale difference corresponding to the reference pixel point; The representative standard deviation is determined as the average of the standard deviation of the grayscale values corresponding to all the pixels in the earlywood region and the standard deviation of the grayscale values corresponding to all the pixels in the latewood region; Determine the difference between the grayscale difference corresponding to each pixel in the target normal segment corresponding to the marked pixel and the representative standard deviation as the grayscale fluctuation degree corresponding to each pixel in the target normal segment corresponding to the marked pixel; Determine the pixel points whose grayscale fluctuation degree on the target normal segment corresponding to the marked pixel point is greater than 0 as the fluctuating pixel points, and select the longest fluctuating pixel point segment from the fluctuating pixel point segments formed by the continuous fluctuating pixel points as the target fluctuating pixel point segment corresponding to the marked pixel point; The absolute value of the difference between the grayscale values corresponding to each adjacent fluctuation pixel point in the target fluctuation pixel point segment corresponding to the marked pixel point is determined as the grayscale fluctuation difference between each adjacent fluctuation pixel point; The early-late wood transition index corresponding to the marked pixel point is determined according to the average of the grayscale fluctuation differences between all adjacent fluctuation pixels in the target fluctuation pixel point segment corresponding to the marked pixel point and the length of the target fluctuation pixel point segment corresponding to the marked pixel point.
6. The wood product processing quality inspection system based on industrial vision according to claim 5 is characterized in that: The formula corresponding to the early and late wood transition index corresponding to the pixel point on the target intersection line is: ;in, is the early-late material transition index corresponding to the jth pixel point on the i-th target intersection line; i is the serial number of the target intersection line; j is the serial number of the pixel point on the i-th target intersection line; is the normalization function; It is the mean value of the grayscale fluctuation difference between all adjacent fluctuation pixels in the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line; is the length of the target fluctuation pixel segment corresponding to the jth pixel on the i-th target intersection line; is a pre-set factor greater than 0.
7. The wood product processing quality inspection system based on industrial vision according to claim 1 is characterized in that: Determining the wood grain protrusion defect index corresponding to each pixel point on each target intersection line according to the earlywood and latewood separation degree and the earlywood and latewood transition index corresponding to each pixel point on each target intersection line includes: The product of the early-late wood separation degree and the early-late wood transition index corresponding to each pixel point on each target intersection line is determined as the wood grain protrusion defect index corresponding to each pixel point on each target intersection line.
8. The wood product processing quality inspection system based on industrial vision according to claim 1 is characterized in that: The processing quality inspection of the wood product to be inspected is performed according to the wood grain protrusion defect indicators corresponding to all pixel points on all target intersection lines, including: When the wood grain bulge defect index corresponding to the pixel point on the target intersection line is greater than the preset defect threshold, the pixel point on the target intersection line is determined as a wood grain bulge defect pixel point; If there are wood grain raised defect pixels in the surface visible light image, it is determined that the wood product to be inspected has a wood grain raised defect quality problem.
9. The wood product processing quality inspection system based on industrial vision according to claim 1 is characterized in that: The step of identifying the earlywood area and the latewood area from the surface visible light image comprises: Segmenting the wood product area from the surface visible light image by threshold segmentation; By using the K-means algorithm, the pixels in the wood product area are clustered into two clusters, and the area where the cluster with a larger average grayscale value in the two clusters is located is determined as the earlywood area, and the area where the cluster with a smaller average grayscale value in the two clusters is located is determined as the latewood area.