CN114881969A - Wood knot detection method and detection system based on computer vision on wood board surface - Google Patents

Wood knot detection method and detection system based on computer vision on wood board surface Download PDF

Info

Publication number
CN114881969A
CN114881969A CN202210490792.XA CN202210490792A CN114881969A CN 114881969 A CN114881969 A CN 114881969A CN 202210490792 A CN202210490792 A CN 202210490792A CN 114881969 A CN114881969 A CN 114881969A
Authority
CN
China
Prior art keywords
curve
wood
knot
detected
unimodal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202210490792.XA
Other languages
Chinese (zh)
Inventor
蔡志刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202210490792.XA priority Critical patent/CN114881969A/en
Publication of CN114881969A publication Critical patent/CN114881969A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G06T5/92
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8854Grading and classifying of flaws
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30161Wood; Lumber
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to a wood knot detection method and a wood knot detection system based on computer vision, wherein the method comprises the steps of collecting an image of the surface of a wood board to be detected, and processing the collected image of the surface of the wood board to obtain a gray inverse image; acquiring a gray value in a gray inversion diagram, and accumulating the acquired gray value to obtain a gray accumulation curve of rows and columns; dividing the row gray scale accumulation curve and the column gray scale accumulation curve into a forward curve and a vertical curve according to the fluctuation degree of the row gray scale accumulation curve and the column gray scale accumulation curve, and intercepting a single peak curve to be detected on the corresponding curves; calculating the total probability of the corresponding knots in the knot judging area by using the knot probability in the judging area on each corresponding to-be-detected single-peak curve on the forward curve and the vertical curve; detecting the wooden knots of the wood boards by using the total probability of the corresponding knots in the wooden knot judging area; the method not only can accurately distinguish the wood knot defects on the surface of the wood board, but also can grade the quality of the wood board with the wood knots.

Description

Wood knot detection method and detection system based on computer vision on wood board surface
Technical Field
The invention relates to the technical field of wood board detection, in particular to a method and a system for detecting wood knots on the surface of a wood board based on computer vision.
Background
The solid wood board is a decorative material formed by drying and processing a natural wood board, has the advantages of nature, beauty, safety, environmental protection, durability, electric heat insulation and the like, and is widely applied to furniture manufacturing, indoor and outdoor decoration and the like. In board science and engineering, the quality grade of a board determines its utility in production applications. The surface defects of the wood board, such as wood knots, bugles, holes and the like, not only affect the aesthetic property of the finished wood in the wood board industry, but also only the wood board with the defects of the wood knots can be used, and the wood board with the defects of the bugles and the holes can be directly treated as waste materials, so the detection of the surface defects of the wood board is preferably used as one of important processes in the processing of the wood board.
In the related art, the method for detecting the defects of the wood board is mainly based on X rays, stress waves, ultrasonic waves, infrared rays, laser, optical cameras and the like. In addition, a digital image processing technology, a computer vision technology and a pattern recognition technology can be applied to detection of the defects of the wood board, a fractal theory, wavelet multi-resolution analysis and an artificial neural network pattern recognition technology are combined, and the problems of texture segmentation, feature extraction, pattern recognition and the like of the defects on the surface of the wood board are researched, so that a novel detection method is formed.
In the prior art, most of texture segmentation in the wood board defect detection method adopts a threshold segmentation method, the threshold segmentation method usually adopts manual work to define a threshold, and the wood board defects are found out by adjusting the size of the threshold. However, the found defects of the wood board cannot effectively distinguish the influence factors such as the wooden knots, the wormholes and the stains, and the wood board with the defects of the wooden knots is easily treated as waste, so that the waste of the wood board material is caused.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a wood knot detection method and a detection system based on computer vision for accurately determining a wood knot defect board.
In order to achieve the purpose, the invention adopts the following technical scheme,
a wood panel surface wood knot detection method based on computer vision specifically comprises the following steps:
collecting an image of the surface of the wood board to be detected, and processing the collected image of the surface of the wood board to obtain a gray-scale inversion diagram;
acquiring a gray value in a gray inverse image, respectively acquiring a row gray accumulation sequence and a column gray accumulation sequence by gray value pixel accumulation, and fitting a row gray accumulation curve and a column gray accumulation curve by using the row gray accumulation sequence and the column gray accumulation sequence;
dividing the row gray scale accumulation curve and the column gray scale accumulation curve into a forward curve and a vertical curve according to the fluctuation degree of the row gray scale accumulation curve and the fluctuation degree of the column gray scale accumulation curve;
intercepting the unimodal curve to be detected on the forward curve and the vertical curve, and respectively obtaining the judgment areas of the unimodal curve to be detected on the forward curve and the vertical curve; judging the corresponding wood grain change degree in the region by using the unimodal curve to be detected on the forward curve to obtain the knot probability in the judged region; judging the corresponding fluctuation degree in the area by using the unimodal curve to be detected on the vertical curve to obtain the node probability in the judged area;
calculating the total probability of the corresponding knots in the knot judging area on each unimodal curve to be detected by utilizing the knot probability in the judging area on each unimodal curve to be detected corresponding to the forward curve and the vertical curve;
and detecting the wood knot defect of the wood board to be detected by using the total probability of the corresponding knots in the wood knot judging area on each unimodal curve to be detected.
Further, the method for obtaining the corresponding fluctuation degree of the row accumulation curve and the column accumulation curve is as follows:
acquiring a fluctuation ratio corresponding to the row accumulation curve/column accumulation curve according to the number of wave crests and the number of wave troughs on the row accumulation curve/column accumulation curve;
acquiring average peak and trough difference values on a row accumulation curve/column accumulation curve according to the sum of differences of pixel values between all adjacent peaks and troughs and the number of peaks and troughs on the row accumulation curve/column accumulation curve;
and acquiring the fluctuation degree corresponding to the row accumulation curve/column accumulation curve by utilizing the fluctuation ratio corresponding to the row accumulation curve/column accumulation curve and the average peak and trough difference value on the row accumulation curve/column accumulation curve.
Further, the method for acquiring the judgment area is as follows:
obtaining a left judging area of a wood knot on each unimodal curve to be detected by using the horizontal distance from the left end point position of the unimodal curve to be detected to the peak value position and the vertical distance from the left end point position to the peak value position;
obtaining a right judging area of the wood knots on each unimodal curve to be detected by using the horizontal distance from the right end point position of the unimodal curve to be detected to the peak value position and the vertical distance from the right end point position to the peak value position;
and acquiring a wood knot judgment region corresponding to each unimodal curve to be detected by using the wood knot left judgment region on each unimodal curve to be detected and the wood knot right judgment region corresponding to each unimodal curve to be detected.
Further, the method for acquiring the knot probability in the judging area of each wood knot of the unimodal curve to be detected on the forward curve and the vertical curve respectively comprises the following steps:
calculating and obtaining the probability of the corresponding joint in each unimodal curve wood section judgment region to be tested on the forward curve by using the corresponding wood grain change degree and the reference density in each unimodal curve wood section judgment region to be tested on the forward curve;
and calculating and obtaining the probability of the corresponding knot in each unimodal curve wood node judgment area to be detected on the vertical curve by utilizing the corresponding fluctuation degree and the reference fluctuation degree in each unimodal curve wood node judgment area to be detected on the vertical curve.
Further, the method for acquiring the wood grain change degree and the reference density in the wood section judgment region on the forward curve comprises the following steps:
acquiring the wood grain cycle density in the judging wood knot region according to the number of wave crests and wave troughs in each single-peak curve wood knot judging region to be detected on the forward curve and the corresponding wood knot judging region;
calculating the average period density of the original curve after intercepting all to-be-detected unimodal curves, and taking the average period density as a reference density;
the method for acquiring the fluctuation degree and the reference fluctuation degree in the wood knot judgment area on the vertical curve comprises the following steps:
obtaining the fluctuation degree in the judging area of the wood knots on the vertical curve according to the fluctuation ratio in the judging area of the wood knots on the vertical curve and the difference of the pixel values between the average wave crests and the wave troughs in the judging area on the vertical curve;
and calculating the average fluctuation degree of the original curve after intercepting all the to-be-detected unimodal curves, and taking the average fluctuation degree as the reference fluctuation degree.
Further, the expression of the total probability of the corresponding nodes in the judging area of the wood nodes on each unimodal curve to be measured is as follows:
Figure BDA0003628754210000031
in the formula: p is the total probability of the corresponding nodes in the judging area of the wood nodes on each unimodal curve to be detected,
Figure BDA0003628754210000032
the probability in the judging area of each unimodal curve segment to be measured on the curve is determined,
Figure BDA0003628754210000033
judging the probability in the area for each unimodal curve segment to be measured on the other curve;
the above-mentioned
Figure BDA0003628754210000034
The expression of (a) is:
Figure BDA0003628754210000035
in the formula: Δ ρ k Judging the degree of wood grain change in the region for the wood sections on the first class of curves, wherein rho is reference density;
the above-mentioned
Figure BDA0003628754210000036
The expression of (a) is:
Figure BDA0003628754210000041
in the formula: delta k As another type of curveAnd (4) judging the fluctuation degree in the area by using the upper knots, wherein delta is the reference fluctuation degree.
Further, the method also comprises a quality grade evaluation method for the wood board with the wood knots, and specifically comprises the following steps:
acquiring one-to-one corresponding knot surrounding frames by utilizing each unimodal curve to be detected on the forward curve and each unimodal curve to be detected on the other vertical curve;
acquiring a wood board quality evaluation index with wood knots by utilizing the number of the wood knot surrounding frames, the total probability of the wood knots in each wood knot surrounding frame and the area of the wood knots in each wood knot surrounding frame;
and evaluating the board quality of the wood knots by using the board quality evaluation index.
Further, the expression of the wood board quality evaluation index of the wood knot is as follows:
Figure BDA0003628754210000042
in the formula: z is the wood board quality evaluation index of the wood knots, k' is the total number of the wood knots, p M For each section the total probability, s, of the section in the frame M Each wood knot is surrounded by the area of the wood knot within the frame.
A wood knot detection system based on computer vision on the surface of a wood board comprises an image acquisition processing module, a gray scale accumulation curve fitting module, a curve classification module, a node probability calculation module in a judgment area, a node total probability calculation module and a wood knot defect wood board detection module;
the image acquisition processing module is used for acquiring an image of the surface of the wood board to be detected and processing the acquired image of the surface of the wood board to obtain a gray scale inversion diagram;
the gray scale accumulation curve fitting module is used for acquiring a gray value in a gray scale inversion diagram, pixel accumulation of the gray value respectively obtains a row gray scale accumulation sequence and a column gray scale accumulation sequence, and a row gray scale accumulation curve and a column gray scale accumulation curve are fitted by utilizing the row gray scale accumulation sequence and the column gray scale accumulation sequence;
the curve classification module is used for dividing the row gray scale accumulation curve and the column gray scale accumulation curve into a forward curve and a vertical curve according to the fluctuation degree of the row gray scale accumulation curve and the fluctuation degree of the column gray scale accumulation curve;
the judging region inner node calculating module is used for intercepting the unimodal curve to be detected on the forward curve and the vertical curve and respectively obtaining the judging regions of the unimodal curve to be detected on the forward curve and the vertical curve; judging the corresponding wood grain change degree in the region by using the unimodal curve to be detected on the forward curve to obtain the knot probability in the judged region; judging the corresponding fluctuation degree in the area by using the unimodal curve to be detected on the vertical curve to obtain the node probability in the judged area;
the knot total probability calculating module is used for calculating and obtaining the total probability of the corresponding knot in the knot judging area on each unimodal curve to be detected by utilizing the knot probability in the judging area on each unimodal curve to be detected corresponding to the forward curve and the vertical curve;
the wood knot defect wood board detection module is used for detecting the wood knot defects of the wood boards to be detected by using the total probability of the corresponding knots in the wood knot judgment area on each single-peak curve to be detected.
The invention has the beneficial effects that:
1. compared with the prior art, the method can accurately distinguish the surface defect of the wood board as the wood knot defect, and can grade the quality of the wood board with the wood knot, thereby reducing waste materials, calibrating the price according to the wood quality grade of the wood knot and improving the economic value for manufacturers.
Drawings
FIG. 1 is a block flow diagram of the method of the present invention;
FIG. 2 is an RGB image of a board to be tested in the method of the present invention;
FIG. 3 is a gray scale inversion diagram of a wood board to be tested in the method of the present invention;
FIG. 4 is a line gray scale accumulation curve corresponding to a gray scale inversion diagram in the method of the present invention;
FIG. 5 is a row gray scale accumulation curve corresponding to a gray scale inversion diagram in the method of the present invention;
FIG. 6 is a plot of all of the unimodal curves tested on the P, Q types of curves and all of the unimodal curves fitted to the P, Q curve using a Gaussian mixture model in the method of the present invention;
FIG. 7 is a unimodal plot of a P or Q curve truncated using a Gaussian fit unimodal curve in the method of the present invention;
FIG. 8 is a schematic diagram of a single-peak curve cut corresponding to a judging area of a wood knot in the method of the present invention;
FIG. 9 is a schematic diagram of the corresponding wood knot probability bounding boxes on the two types of unimodal curves of P, Q in the method of the present invention;
fig. 10 is a schematic diagram of the structure of the system of the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and examples.
In the description of the present invention, it is to be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are only for convenience of description and simplicity of description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention.
The terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature; in the description of the present invention, "a plurality" means two or more unless otherwise specified.
Application scenarios of the present embodiment: for the furniture manufacturing industry and other industries needing to use the wood board as a raw material to produce products, the defects of the wood board are important factors determining the quality of the products. The embodiment provides a method for detecting the wood knot defects, which are natural defects existing in the wood board and formed by the natural growth of the wood board, namely the wood knot defects.
Example 1
As shown in fig. 1, the present embodiment provides a method for detecting wooden knots on a wood board surface based on computer vision, which specifically includes the following steps:
referring to fig. 2 and 3, step one: acquiring an RGB image of the board to be detected, carrying out gray scale conversion on the RGB image to obtain a gray scale image, and carrying out gray scale inversion on the obtained gray scale image to obtain a gray scale inversion image.
Step two: performing pixel gray scale accumulation on lines by using data of the gray scale inversion diagram to obtain a line gray scale accumulation sequence corresponding to the wood board surface gray scale diagram; and constructing a line gray scale accumulation curve corresponding to the wood board surface gray scale map by using the line gray scale accumulation sequence of the wood board surface gray scale map. Performing row-column gray scale accumulation according to the obtained gray scale image data of the board surface to obtain a row gray scale accumulation sequence corresponding to the board surface gray scale image; and constructing a column gray scale accumulation curve by using the column gray scale accumulation sequence. The method comprises the following steps:
and accumulating the gray scales of all pixels of the gray scale reversal image in the row direction and the column direction to obtain a row and column gray scale accumulation sequence.
Figure BDA0003628754210000061
Figure BDA0003628754210000062
Wherein H i The ith row and the ith row in the row gray scale accumulation sequence. Wherein L is j The j-th column sum in the column gray scale accumulation sequence. Where m is the number of rows of the grayscale inversion map and n is the number of columns of the grayscale inversion map. I (I, j) represents the gray scale value of the ith row and jth column pixel of the gray scale inversion chart.
Referring to fig. 4 and 5, a row gray scale accumulation curve is recursively fitted with a row gray scale accumulation sequence and is labeled H, and a column gray scale accumulation curve is recursively fitted with a column gray scale accumulation sequence and is labeled L.
Step three: and calculating the fluctuation degree corresponding to the acquired H curve. The method comprises the following specific steps:
obtaining the number H of wave crests on the H curve 1 Number g of wave troughs 1
By using h 1 And g 1 By calculation of formula
Figure BDA0003628754210000071
Acquiring a corresponding fluctuation ratio on the H curve;
in the formula: b is H The corresponding fluctuation ratio on the H curve.
And acquiring pixel values and positions thereof corresponding to all wave crests and wave troughs on the H curve. Arranging pixel values corresponding to all peaks and troughs on the H curve according to size, calculating the difference of pixel values between all adjacent peaks and troughs, and summing to obtain delta I 1
Using Delta I 1 、h 1 、g 1 By calculation of formula
Figure BDA0003628754210000072
Calculating to obtain the difference value of the average wave crest and the average wave trough on the H curve;
in the formula:
Figure BDA0003628754210000073
the average peak and trough difference on the H curve.
By means of B H And
Figure BDA0003628754210000074
by calculation of formula
Figure BDA0003628754210000075
Acquiring the fluctuation degree corresponding to the H curve;
in the formula: delta H The fluctuation degree corresponding to the H curve.
And calculating to obtain the corresponding fluctuation degree on the L curve. The method comprises the following specific steps:
obtaining the peak on the L curveNumber h 2 Number g of wave troughs 2
By using h 2 And g 2 By calculation of formula
Figure BDA0003628754210000076
Acquiring a corresponding fluctuation ratio on the H curve;
in the formula: b is L The corresponding fluctuation ratio on the L curve.
And acquiring pixel values and positions thereof corresponding to all wave crests and wave troughs on the L curve. Arranging pixel values corresponding to all wave crests and wave troughs on the L curve according to the size, calculating the difference of the pixel values between all adjacent wave crests and wave troughs, and summing to obtain delta I 2
Using Delta I 2 、h 2 、g 2 By calculation of formula
Figure BDA0003628754210000077
Calculating to obtain the difference value between the average peak and the average trough on the L curve;
in the formula:
Figure BDA0003628754210000078
the average peak and trough difference on the H curve.
By means of B L And
Figure BDA0003628754210000079
by calculation of formula
Figure BDA00036287542100000710
Acquiring the fluctuation degree corresponding to the L curve; in the formula of L The fluctuation degree corresponding to the L curve.
Step four: for delta H And delta L And comparing the sizes, marking the corresponding curve with a large comparison value as a forward curve and using a letter Q to represent the forward curve, and marking the corresponding curve with a small comparison value as a vertical curve and using a letter P to represent the vertical curve.
Step five: and identifying and intercepting the unimodal curves to be detected on Q and P respectively, and acquiring the knot judgment area corresponding to each unimodal curve to be detected by using each unimodal curve to be detected identified on Q and P. The specific process is as follows:
referring to fig. 6 and 7, all the unimodal curves to be measured on the P and Q curves are obtained, and all the fitted unimodal curves are obtained by fitting P, Q curves by using a gaussian mixture model.
Referring to fig. 8, for the gaussian-fitted unimodal curve, k unimodal curves to be measured on the original P curve and Q curve are intercepted and labeled to obtain P, Q curve unimodal curve F to be measured on the curve k (k is the index, P, Q k each): (f) kl ,f k ,f kr ) Wherein f is k Representing the peak position of the unimodal curve to be measured, f kl Representing the position of the left end point of the truncated unimodal curve to be measured, f kr Representing the position of the right end point of the intercepted unimodal curve to be measured.
According to each identified F k Calculate each F k Corresponding knot judging region J k . The specific process is as follows:
according to each F intercepted k (f kl ,f k ,f kr ) Obtaining F k The horizontal distance from the left end point position to the peak position and the horizontal distance from the right end point position to the peak position; and F k The vertical distance of the left end point position from the peak position and the vertical distance of the right end point position from the peak position. The calculation formula is as follows:
w kl =f k -f kl
w kr =f kr -f k
w k =w kl +w kr
in the formula w kl Horizontal distance, w, of the left end point from the peak position kr The horizontal distance from the right end point to the peak position; w is a k Is F k Horizontal distance between the left end point and the right end point.
By using the w kl Vertical distance from left end position to peak position is obtained F k Judging the area on the left of the wood knots; using w kr The vertical distance from the right end point position to the peak position is obtained F k Judging the area on the right side of the wood knots.
F is to be k Left judging area of knot and F k Adding the right judging areas of the wood knots to obtain a wood knot judging area J corresponding to each unimodal curve to be detected of the forward curve and the vertical curve k And the wood section judging area is an area on the horizontal axis. The calculation formula of the corresponding wood knot judgment area of each unimodal curve to be measured is as follows:
J k =J kl +J kr
in the formula: j. the design is a square kl Is F k Left judgment area of knots, J kr And judging the area for the right side of the wood knot.
J kl The expression of (a) is:
Figure BDA0003628754210000091
in the formula: w is a kl Horizontal distance of the left end point from the peak position, A kl Is the vertical distance of the left end point from the peak position.
J kr The expression of (a) is:
Figure BDA0003628754210000092
in the formula: w is a kr Is the horizontal distance of the right end point from the peak position, A kr The vertical distance of the right end point from the peak position.
Step six: and calculating the probability of the knots in the judging area of each unimodal curve wood knot to be detected on the Q curve. For the Q curve, the region between the two end points of the single peak represents the range of the detected knots, but it is also desirable to detect the wood grain around the knots, with the grain being denser near the knots. Other defects such as wormholes and smudges caused by the single peak have no dense wood grain characteristics near two ends, so the method has high evaluation and detection accuracy of the wood knot defects. The specific calculation process is as follows:
by calculation of formula
Figure BDA0003628754210000093
Calculating to obtain the wood grain period densityDegree (the larger the fluctuation degree of the curve, the more the appearance period of the wave crest and the wave trough of the curve can represent the appearance period of the wood grain).
In the formula: h is k Indicates the number of peaks appearing in the judgment region on the forward curve, g k The number of valleys appearing in the judgment region on the forward curve is shown.
By calculation of formula
Figure BDA0003628754210000094
And obtaining the reference density by ten calculations.
In the formula: h 'is the number of wave crests on the original curve after intercepting all the unimodal curves to be detected, g' is the number of wave troughs on the original curve after intercepting all the unimodal curves to be detected, k is the number of the unimodal curves to be detected, m is the number of rows of the gray inversion graph,
Figure BDA0003628754210000095
for F on all the forward curves k The sum of the horizontal distances between the left and right endpoints.
By calculating the formula Δ ρ k =ρ k And calculating rho to obtain the wood grain change degree in each unimodal curve wood node judgment area to be measured on the forward curve.
In the formula: Δ ρ k And judging the wood grain change degree in the region for each unimodal curve wood node to be detected on the forward curve.
According to a calculation formula
Figure BDA0003628754210000096
And calculating the probability of the knots in the judging area of each unimodal curve wood knot to be detected on the Q curve. The larger the degree of change of the wood grain in the judgment region, that is, the denser the wood grain, the higher the probability that the wood grain is a wood knot.
Step seven: and calculating the probability of the knots in the judging area of each unimodal curve wood knot to be detected on the L curve. For the vertical curve, the region between two end points of the single-peak curve represents the range of the detected wood knots, but wood grains around the wood knots need to be detected, the wood grains are denser as the vertical curve is closer to the knots, and the wood grains are gathered only around the wood knots as the vertical curve is not greatly influenced by the wood grains at other positions, so that the greater the oscillation amplitude of the vertical curve is, the greater the fluctuation degree in the region is judged as the vertical curve is closer to the knots. The specific calculation process is as follows:
by calculation of formula
Figure BDA0003628754210000101
And calculating and obtaining the fluctuation ratio in the judgment area on the vertical curve.
In the formula: b is k Determining the fluctuation ratio, h, in the region for the vertical curve k Determining the number of peaks, g, in the region for a vertical curve k The number of the wave troughs in the area is judged on the vertical curve.
By calculation of formula
Figure BDA0003628754210000102
And calculating to obtain the difference of the pixel values between the average wave crests and the wave troughs in the judgment area on the vertical curve.
In the formula:
Figure BDA0003628754210000103
the difference of pixel values between the average wave crests and wave troughs in the area is judged on the vertical curve, delta I k The sum of the pixel differences between all adjacent wave crests and wave troughs in the judgment area on the vertical curve is obtained.
By calculation of formula
Figure BDA0003628754210000104
And calculating and obtaining the fluctuation degree in the judgment area on the vertical curve.
In the formula: delta k And judging the fluctuation degree in the area on the vertical curve.
By calculation of formula
Figure BDA0003628754210000105
Computation acquisition intercept F k And the fluctuation ratio of the original curve to be measured.
In the formula: b is a cut of F k The fluctuation ratio of the original curve to be measured is h, g, n, h and g, wherein h is the number of wave crests on the original curve after interception, g is the number of wave troughs on the original curve after interception, and n isThe number of columns in the grayscale inversion map,
Figure BDA0003628754210000106
for F on all vertical curves k The sum of the horizontal distances between the left and right endpoints.
By calculation of formula
Figure BDA0003628754210000107
And calculating to obtain the pixel difference between adjacent wave crests and wave troughs on the intercepted original curve.
In the formula: and delta I is the sum of pixel differences between adjacent wave crests and wave troughs on the original curve after interception, and k is the number of all single-peak curves to be detected after interception.
By calculation of formula
Figure BDA0003628754210000108
And calculating and obtaining the probability of the knots in the judging area of each unimodal curve wood knot to be detected on the vertical curve.
In the formula: d is a pair of all unimodal curves F to be measured k The latter original curves average the fluctuation degree, and δ is taken as the reference fluctuation degree.
By calculation of formula
Figure BDA0003628754210000111
And calculating and obtaining the probability of the vertical wood knots in the judgment area of each unimodal curve wood knot to be detected on the P curve.
In the formula:
Figure BDA0003628754210000112
and judging the probability of the vertical wood knot in the area for each unimodal curve wood knot to be detected on the P curve.
Step eight: using all unimodal curves F on P, Q k (f) of kl ,f k ,f kr ) And obtaining a wood section surrounding frame by using three description values. The method comprises the following steps:
referring to FIG. 9, each f on Q k And each f on P k The intersection point is the center of the wood knot. Pairwise crossing f kl 、f kr The wood sections surround the frame.
And acquiring the total probability of the wood knots in each wood knot surrounding frame by utilizing the probability of the corresponding forward knots and the probability of the corresponding vertical knots in each wood knot surrounding frame.
And when the total probability of the wood knots in the wood knot surrounding frame is larger than 0.5, judging that the wood board to be detected is the wood knot scar defective wood board. And if the number of the wood sections is less than 0.5, removing the wood section surrounding frame.
And screening the number of the wooden knot enclosure frames according to the total probability of the wooden knots in each wooden knot enclosure frame.
Calculating the probability and the area of the wood knots in the wood knot surrounding frame, wherein the calculation process is as follows:
section 1(M ═ 1):
Figure BDA0003628754210000113
section 2(M ═ 2):
Figure BDA0003628754210000114
section 3(M ═ 3):
Figure BDA0003628754210000115
and acquiring the quality evaluation index of the wood board with the wood knots by utilizing the number of the wood knot surrounding frames, the total probability of the wood knots in each wood knot surrounding frame and the area of the wood knots in each wood knot surrounding frame. The expression of the wood board quality evaluation index is as follows:
Figure BDA0003628754210000116
in the formula: z is the wood board quality evaluation index of the wood knots, k' is the total number of the wood knots, p M For each section the total probability, s, of the section in the frame M Each wood knot is surrounded by the area of the wood knot within the frame. Judging the grade of the wood board with the wood knots by utilizing the ratio of the wood board quality evaluation index to the surface area of the wood board to be detected, wherein the ratio is excellent within the range of 0-10%, the ratio is good within the range of 10-50%, and the ratioThe values are poor within the range of 50% to 100%.
The embodiment can accurately distinguish the surface defects of the wood boards into the wood knot defects, and can grade the wood boards with the wood knots, thereby not only reducing waste materials, but also calibrating the price according to the wood quality grade of the wood knots, and improving the economic value for manufacturers.
Example 2
As shown in fig. 10, a wood knot detection system based on computer vision for wood panel surface comprises an image acquisition processing module, a gray scale accumulation curve fitting module, a curve classification module, a calculating module for knot in judgment area, a calculating module for total probability of knot and a wood knot defect wood panel detection module;
the image acquisition processing module is used for acquiring the image of the surface of the wood board to be detected and processing the acquired image of the surface of the wood board to obtain a gray scale inversion diagram.
The gray scale accumulation curve fitting module is used for acquiring a gray value in a gray scale inversion diagram, pixel accumulation of the gray value respectively obtains a row gray scale accumulation sequence and a column gray scale accumulation sequence, and a row gray scale accumulation curve and a column gray scale accumulation curve are fitted by utilizing the row gray scale accumulation sequence and the column gray scale accumulation sequence.
The curve classification module is used for dividing the row gray scale accumulation curve and the column gray scale accumulation curve into a forward curve and a vertical curve according to the fluctuation degree of the row gray scale accumulation curve and the fluctuation degree of the column gray scale accumulation curve.
The judging region inner node calculating module is used for intercepting the unimodal curve to be detected on the forward curve and the vertical curve and respectively obtaining the judging regions of the unimodal curve to be detected on the forward curve and the vertical curve; judging the corresponding wood grain change degree in the region by using the unimodal curve to be detected on the forward curve to obtain the knot probability in the judged region; and judging the corresponding fluctuation degree in the area by using the unimodal curve to be detected on the vertical curve to obtain the node probability in the judged area.
And the knot total probability calculating module is used for calculating and acquiring the total probability of the corresponding knot in the knot judging area on each unimodal curve to be detected by utilizing the knot probability in the judging area on each unimodal curve to be detected corresponding to the forward curve and the vertical curve.
The wood knot defect wood board detection module is used for detecting wood knot defects of the wood boards to be detected by using the total probability of corresponding knots in the wood knot judgment area on each single-peak curve to be detected.
The above embodiments are merely illustrative of the present invention, and should not be construed as limiting the scope of the present invention, and all designs identical or similar to the present invention are within the scope of the present invention.

Claims (9)

1. A wood panel surface wood knot detection method based on computer vision is characterized by specifically comprising the following steps:
collecting an image of the surface of the wood board to be detected, and processing the collected image of the surface of the wood board to obtain a gray scale inversion diagram;
acquiring a gray value in a gray inverse image, respectively acquiring a row gray accumulation sequence and a column gray accumulation sequence by gray value pixel accumulation, and fitting a row gray accumulation curve and a column gray accumulation curve by using the row gray accumulation sequence and the column gray accumulation sequence;
dividing the row gray scale accumulation curve and the column gray scale accumulation curve into a forward curve and a vertical curve according to the fluctuation degree of the row gray scale accumulation curve and the fluctuation degree of the column gray scale accumulation curve;
intercepting the unimodal curve to be detected on the forward curve and the vertical curve, and respectively obtaining the judging areas of the nodes corresponding to the unimodal curve to be detected on the forward curve and the vertical curve;
judging the corresponding wood grain change degree in the region by using the unimodal curve to be detected on the forward curve to obtain the knot probability in the judged region;
judging the corresponding fluctuation degree in the area by using the unimodal curve to be detected on the vertical curve to obtain the node probability in the judged area;
calculating the total probability of the corresponding knots in the knot judging area on each unimodal curve to be detected by utilizing the knot probability in the judging area on each unimodal curve to be detected corresponding to the forward curve and the vertical curve;
and detecting the wood knot defect of the wood board to be detected by using the total probability of the corresponding knots in the wood knot judging area on each unimodal curve to be detected.
2. The method for detecting the wooden knot on the surface of the wooden board based on the computer vision as claimed in claim 1, wherein the method for acquiring the corresponding fluctuation degree of the row accumulation curve and the column accumulation curve is as follows:
acquiring a fluctuation ratio corresponding to the row accumulation curve/column accumulation curve according to the number of wave crests and the number of wave troughs on the row accumulation curve/column accumulation curve;
acquiring average peak and trough difference values on a row accumulation curve/column accumulation curve according to the sum of differences of pixel values between all adjacent peaks and troughs and the number of peaks and troughs on the row accumulation curve/column accumulation curve;
and acquiring the fluctuation degree corresponding to the row accumulation curve/column accumulation curve by utilizing the fluctuation ratio corresponding to the row accumulation curve/column accumulation curve and the average peak and trough difference value on the row accumulation curve/column accumulation curve.
3. The method for detecting the wooden knot on the surface of the wooden board based on the computer vision as claimed in claim 1, wherein the method for acquiring the judgment area is as follows:
obtaining a left judging area of a wood knot on each unimodal curve to be detected by using the horizontal distance from the left end point position of the unimodal curve to be detected to the peak value position and the vertical distance from the left end point position to the peak value position;
obtaining a right judging area of the wood knots on each unimodal curve to be detected by using the horizontal distance from the right end point position of the unimodal curve to be detected to the peak value position and the vertical distance from the right end point position to the peak value position;
and acquiring a wood knot judgment region corresponding to each unimodal curve to be detected by using the wood knot left judgment region on each unimodal curve to be detected and the wood knot right judgment region corresponding to each unimodal curve to be detected.
4. The method for detecting the wooden panel surface wooden knot based on the computer vision as claimed in claim 1, wherein the method for acquiring the knot probability in each unimodal curve wood knot judgment area to be detected on the forward curve and the vertical curve respectively comprises the following steps:
calculating and obtaining the probability of the corresponding joint in each unimodal curve wood section judgment region to be tested on the forward curve by using the corresponding wood grain change degree and the reference density in each unimodal curve wood section judgment region to be tested on the forward curve;
and calculating and obtaining the probability of the corresponding knot in each unimodal curve wood node judgment area to be detected on the vertical curve by utilizing the corresponding fluctuation degree and the reference fluctuation degree in each unimodal curve wood node judgment area to be detected on the vertical curve.
5. The method for detecting the wooden knot marks on the surface of the wooden board based on the computer vision as claimed in claim 4, wherein the method for acquiring the wood grain change degree and the reference density in the wood knot judgment region on the forward curve comprises the following steps:
acquiring the wood grain cycle density in the judging wood knot region according to the number of wave crests and wave troughs in each single-peak curve wood knot judging region to be detected on the forward curve and the corresponding wood knot judging region;
calculating the average periodic density of the original curve after intercepting all to-be-detected unimodal curves, and taking the average periodic density as a reference density;
the method for acquiring the fluctuation degree and the reference fluctuation degree in the wood knot judgment area on the vertical curve comprises the following steps:
obtaining the fluctuation degree in the judging area of the wood knots on the vertical curve according to the fluctuation ratio in the judging area of the wood knots on the vertical curve and the difference of the pixel values between the average wave crests and the wave troughs in the judging area on the vertical curve;
and calculating the average fluctuation degree of the original curve after intercepting all the unimodal curves to be detected, and taking the average fluctuation degree as the reference fluctuation degree.
6. The method for detecting the wooden board surface wooden knot scar based on the computer vision as claimed in claim 4, wherein the expression of the total probability of the corresponding knot in the wooden knot judgment area on each unimodal curve to be detected is as follows:
Figure FDA0003628754200000031
in the formula: p is the total probability of the corresponding knots in the knot judging area on each unimodal curve to be detected,
Figure FDA0003628754200000032
the probability in the judging area of each unimodal curve segment to be measured on the curve is determined,
Figure FDA0003628754200000033
judging the probability in the area for each unimodal curve knot to be detected on the other type of curve;
the above-mentioned
Figure FDA0003628754200000034
The expression of (c) is:
Figure FDA0003628754200000035
in the formula: Δ ρ k Judging the degree of wood grain change in the region for the wood sections on the first class of curves, wherein rho is reference density;
the above-mentioned
Figure FDA0003628754200000036
The expression of (a) is:
Figure FDA0003628754200000037
in the formula: delta k The fluctuation degree in the area is judged for the wood knots on the other type of curve, and delta is a reference fluctuation degree.
7. The method for detecting wood knot marks on the surface of a wood board based on computer vision according to claim 1, wherein the method further comprises a method for evaluating the quality grade of the wood board with the wood knot marks, and specifically comprises the following steps:
acquiring one-to-one corresponding knot surrounding frames by utilizing each unimodal curve to be detected on the forward curve and each unimodal curve to be detected on the other vertical curve;
acquiring a wood board quality evaluation index with wood knots by utilizing the number of the wood knot surrounding frames, the total probability of the wood knots in each wood knot surrounding frame and the area of the wood knots in each wood knot surrounding frame;
and evaluating the board quality of the wood knots by using the board quality evaluation index.
8. The method for detecting wood knot scars on the surfaces of wood boards based on computer vision as claimed in claim 7, wherein the expression of the wood quality evaluation index of the wood knots is as follows:
Figure FDA0003628754200000038
in the formula: z is the wood board quality evaluation index of the wood knots, k' is the total number of the wood knots, p M For each section the total probability, s, of the section in the frame M Each wood knot is surrounded by the area of the wood knot in the frame.
9. A wood knot detection system based on computer vision on the surface of a wood board is characterized by comprising an image acquisition and processing module, a gray scale accumulation curve fitting module, a curve classification module, a knot calculation module in a judgment area, a knot total probability calculation module and a wood knot defect wood board detection module;
the image acquisition processing module is used for acquiring an image of the surface of the wood board to be detected and processing the acquired image of the surface of the wood board to obtain a gray scale inversion diagram;
the gray scale accumulation curve fitting module is used for acquiring a gray value in a gray scale inversion diagram, pixel accumulation of the gray value respectively obtains a row gray scale accumulation sequence and a column gray scale accumulation sequence, and a row gray scale accumulation curve and a column gray scale accumulation curve are fitted by utilizing the row gray scale accumulation sequence and the column gray scale accumulation sequence;
the curve classification module is used for dividing the row gray scale accumulation curve and the column gray scale accumulation curve into a forward curve and a vertical curve according to the fluctuation degree of the row gray scale accumulation curve and the fluctuation degree of the column gray scale accumulation curve;
the judging region inner node calculating module is used for intercepting the unimodal curve to be detected on the forward curve and the vertical curve and respectively obtaining the judging regions of the unimodal curve to be detected on the forward curve and the vertical curve; judging the corresponding wood grain change degree in the region by using the unimodal curve to be detected on the forward curve to obtain the knot probability in the judged region; judging the corresponding fluctuation degree in the area by using the unimodal curve to be detected on the vertical curve to obtain the node probability in the judged area;
the knot total probability calculating module is used for calculating and obtaining the total probability of the corresponding knot in the knot judging area on each unimodal curve to be detected by utilizing the knot probability in the judging area on each unimodal curve to be detected corresponding to the forward curve and the vertical curve;
the wood knot defect wood board detection module is used for detecting the wood knot defects of the wood boards to be detected by using the total probability of the corresponding knots in the wood knot judgment area on each single-peak curve to be detected.
CN202210490792.XA 2022-05-06 2022-05-06 Wood knot detection method and detection system based on computer vision on wood board surface Withdrawn CN114881969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210490792.XA CN114881969A (en) 2022-05-06 2022-05-06 Wood knot detection method and detection system based on computer vision on wood board surface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210490792.XA CN114881969A (en) 2022-05-06 2022-05-06 Wood knot detection method and detection system based on computer vision on wood board surface

Publications (1)

Publication Number Publication Date
CN114881969A true CN114881969A (en) 2022-08-09

Family

ID=82673770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210490792.XA Withdrawn CN114881969A (en) 2022-05-06 2022-05-06 Wood knot detection method and detection system based on computer vision on wood board surface

Country Status (1)

Country Link
CN (1) CN114881969A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115115640A (en) * 2022-08-30 2022-09-27 南通美迪森医药科技有限公司 Capsule shell surface defect detection method based on optical means
CN116309608A (en) * 2023-05-25 2023-06-23 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) Coating defect detection method using ultrasonic image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115115640A (en) * 2022-08-30 2022-09-27 南通美迪森医药科技有限公司 Capsule shell surface defect detection method based on optical means
CN116309608A (en) * 2023-05-25 2023-06-23 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) Coating defect detection method using ultrasonic image
CN116309608B (en) * 2023-05-25 2023-08-04 济宁市质量计量检验检测研究院(济宁半导体及显示产品质量监督检验中心、济宁市纤维质量监测中心) Coating defect detection method using ultrasonic image

Similar Documents

Publication Publication Date Title
CN114881969A (en) Wood knot detection method and detection system based on computer vision on wood board surface
CN109060836B (en) Machine vision-based high-pressure oil pipe joint external thread detection method
CN112651968B (en) Wood board deformation and pit detection method based on depth information
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN115239704B (en) Accurate detection and repair method for wood surface defects
CN113570605B (en) Defect detection method and system based on liquid crystal display panel
CN116645367B (en) Steel plate cutting quality detection method for high-end manufacturing
CN108181316B (en) Bamboo strip defect detection method based on machine vision
CN107328787A (en) A kind of metal plate and belt surface defects detection system based on depth convolutional neural networks
CN114219794B (en) Method and system for evaluating surface quality of shaving board based on machine vision
CN112465743B (en) Periodic structure quality detection method
CN114972356B (en) Plastic product surface defect detection and identification method and system
CN101710081A (en) Method for detecting surface defects of mechanical parts based on image texture and fractal dimension
CN110781913B (en) Zipper cloth belt defect detection method
CN110544233A (en) Depth image quality evaluation method based on face recognition application
CN115311507B (en) Building board classification method based on data processing
CN109785338A (en) The online visible sensation method of screw thread critical size parameter under a kind of movement background
CN114549441A (en) Sucker defect detection method based on image processing
CN114862855A (en) Textile defect detection method and system based on template matching
CN101013126A (en) Method for predicting intensity of wooden artificial panel by computer
CN115511775A (en) Light-weight ceramic tile surface defect detection method based on semantic segmentation
CN103065296B (en) High-resolution remote sensing image residential area extraction method based on edge feature
CN116612097A (en) Method and system for predicting internal section morphology of wood based on surface defect image
CN104655642A (en) Automatic measurement, characterization and classification method for steel cracking defects and system of method
CN115272331A (en) Corrugated paper quality detection method based on image processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220809