CN113538428A - Wood defect detection method, apparatus, medium, and computer program product - Google Patents

Wood defect detection method, apparatus, medium, and computer program product Download PDF

Info

Publication number
CN113538428A
CN113538428A CN202111083502.1A CN202111083502A CN113538428A CN 113538428 A CN113538428 A CN 113538428A CN 202111083502 A CN202111083502 A CN 202111083502A CN 113538428 A CN113538428 A CN 113538428A
Authority
CN
China
Prior art keywords
wood
defect
detected
image information
defects
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.)
Pending
Application number
CN202111083502.1A
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.)
Shenzhen Xinrun Fulian Digital Technology Co Ltd
Original Assignee
Shenzhen Xinrun Fulian Digital Technology Co Ltd
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 Shenzhen Xinrun Fulian Digital Technology Co Ltd filed Critical Shenzhen Xinrun Fulian Digital Technology Co Ltd
Priority to CN202111083502.1A priority Critical patent/CN113538428A/en
Publication of CN113538428A publication Critical patent/CN113538428A/en
Pending 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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a wood defect detection method, equipment, a medium and a computer program product, wherein image information of wood to be detected is obtained, and defect detection is carried out on the image information based on a pre-trained deep neural network model to obtain a defect detection result; if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information; and if the defect size is larger than the preset defect size threshold value, outputting the defect information of the wood to be detected based on the defect size. The method and the device have the advantages that the defect detection is carried out on the image information of the wood to be detected based on the depth neural network model trained in advance, whether the wood to be detected has defects can be quickly and accurately determined, when the wood to be detected has defects, whether the defects are within the user allowable range is determined based on the defect size, if the defects are not within the user allowable range, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.

Description

Wood defect detection method, apparatus, medium, and computer program product
Technical Field
The present application relates to the field of detection technologies, and in particular, to a method, an apparatus, a medium, and a computer program product for detecting wood defects.
Background
The wooden board has the advantages of firmness, attractive appearance and the like, and is widely applied to industrial production in China and office and home environments of people. Many wooden boards adopt edge sealing technology, and edge sealing can reduce friction and improve visual and attractive effects. However, in the production process of the wood board, due to uncontrollable factors, various defects such as oblique cutting, overlong, gouging, gaps, pinholes, glue failure, white scraping or edge blasting are inevitably generated, so that the aesthetic degree of inferior products of the wood board is seriously affected, and meanwhile, great economic loss is caused to manufacturers. Therefore, it is necessary to detect the defects in real time and feed back the defects in time during the production of the wood boards. The mode that adopts artifical discernment carries out defect identification to wooden board at present, but because the defect kind is various, artifical discernment speed is slow, inefficiency, and the specific size of defect can't be discerned to people's eye simultaneously for to some less defects, artifical erroneous judgement probability is high, leads to the degree of accuracy of wood defect testing result lower.
Disclosure of Invention
The present application mainly aims to provide a method, an apparatus, a medium, and a computer program product for detecting wood defects, and aims to solve the technical problem of low accuracy of the current wood defect detection result.
In order to achieve the above object, an embodiment of the present application provides a wood defect detecting method, including:
acquiring image information of wood to be detected, and carrying out defect detection on the image information based on a pre-trained deep neural network model to obtain a defect detection result;
if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information;
and if the defect size is larger than a preset defect size threshold value, outputting the defect information of the wood to be detected.
Preferably, the step of determining the defect size of the wood to be detected based on the image information includes:
acquiring point cloud information of the defects in the wood to be detected based on each image in the image information;
and determining the defect size of the wood to be detected based on the point cloud information.
Preferably, the step of acquiring point cloud information of the defects in the wood to be detected based on each image in the image information includes:
and processing each image in the image information based on a binocular vision algorithm to obtain point cloud information of the defects in the wood to be detected.
Preferably, after the step of determining the defect size of the wood to be detected based on the image information, the method further comprises:
and comparing the defect size with a preset defect size threshold value, and determining the size relation between the defect size and the preset defect size threshold value.
Preferably, the step of acquiring the image information of the wood to be detected includes:
detecting whether a material incoming signal exists;
and if the incoming material signal exists, acquiring the image information of the wood to be detected based on a preset camera device.
Preferably, after the step of acquiring the image information of the wood to be detected, the method further includes:
detecting whether the preset camera device is polluted or not based on the image information;
and if the preset camera device is polluted, outputting alarm information.
Preferably, before the step of performing defect detection on the image information based on the pre-trained deep neural network model to obtain a defect detection result, the method further includes:
acquiring historical image information of historical detection wood and the historical detection result as a training data set;
and training a preset deep neural network model according to the training data set to obtain the pre-trained deep neural network model.
Further, to achieve the above object, the present application also provides a wood-defect detecting apparatus, which includes a memory, a processor, and a wood-defect detecting program stored in the memory and operable on the processor, wherein the wood-defect detecting program, when executed by the processor, implements the steps of the wood-defect detecting method.
Further, to achieve the above object, the present application also provides a medium, which is a computer-readable storage medium having a wood defect detecting program stored thereon, the wood defect detecting program, when executed by a processor, implementing the steps of the wood defect detecting method described above.
Further, to achieve the above object, the present application also provides a computer program product comprising a computer program, which when executed by a processor, implements the steps of the above wood defect detecting method.
The embodiment of the application provides a wood defect detection method, equipment, a medium and a computer program product, wherein image information of wood to be detected is obtained, and defect detection is carried out on the image information based on a pre-trained deep neural network model to obtain a defect detection result; if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information; and if the defect size is larger than a preset defect size threshold value, outputting the defect information of the wood to be detected based on the defect size. The method and the device have the advantages that defect detection is carried out on the image information of the wood to be detected based on the depth neural network model trained in advance, whether the wood to be detected has defects or not can be determined quickly and accurately, when the wood to be detected has defects, whether the defects are in the user allowable range or not is determined by determining the defect size of the wood to be detected and comparing the defect size with the preset defect size threshold value, if the defects are not in the user allowable range, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.
Drawings
FIG. 1 is a schematic structural diagram of a hardware operating environment according to an embodiment of a wood defect detection method of the present application;
FIG. 2 is a schematic flow chart of a wood defect detecting method according to a first embodiment of the present application;
FIG. 3 is a side view of a camera layout in a first embodiment of the wood defect detecting method of the present application;
fig. 4 is a schematic flow chart of a wood defect detecting method according to a second embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application provides a wood defect detection method, equipment, a medium and a computer program product, wherein image information of wood to be detected is obtained, and defect detection is carried out on the image information based on a pre-trained deep neural network model to obtain a defect detection result; if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information; and if the defect size is larger than a preset defect size threshold value, outputting the defect information of the wood to be detected based on the defect size. The method and the device have the advantages that defect detection is carried out on the image information of the wood to be detected based on the depth neural network model trained in advance, whether the wood to be detected has defects or not can be determined quickly and accurately, when the wood to be detected has defects, whether the defects are in the user allowable range or not is determined by determining the defect size of the wood to be detected and comparing the defect size with the preset defect size threshold value, if the defects are not in the user allowable range, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a wood defect detecting apparatus in a hardware operating environment according to an embodiment of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The wood defect detection equipment in the embodiment of the application can be a PC, and can also be a mobile terminal equipment such as a tablet personal computer and a portable computer.
As shown in fig. 1, the wood defect detecting apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
It will be understood by those skilled in the art that the construction of the wood-defect detecting apparatus shown in fig. 1 does not constitute a limitation of the wood-defect detecting apparatus, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a wood defect detecting program.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the wood-defect detecting program stored in the memory 1005, and perform the following operations:
acquiring image information of wood to be detected, and carrying out defect detection on the image information based on a pre-trained deep neural network model to obtain a defect detection result;
if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information;
and if the defect size is larger than a preset defect size threshold value, outputting the defect information of the wood to be detected.
Further, the step of determining the defect size of the wood to be detected based on the image information comprises:
acquiring point cloud information of the defects in the wood to be detected based on each image in the image information;
and determining the defect size of the wood to be detected based on the point cloud information.
Further, the step of acquiring point cloud information of the defects in the wood to be detected based on each image in the image information includes:
and processing each image in the image information based on a binocular vision algorithm to obtain point cloud information of the defects in the wood to be detected.
Further, after the step of determining the defect size of the wood to be detected based on the image information, the processor 1001 may be configured to call a wood defect detecting program stored in the memory 1005, and perform the following operations:
and comparing the defect size with a preset defect size threshold value, and determining the size relation between the defect size and the preset defect size threshold value.
Further, the step of acquiring the image information of the wood to be detected comprises:
detecting whether a material incoming signal exists;
and if the incoming material signal exists, acquiring the image information of the wood to be detected based on a preset camera device.
Further, after the step of acquiring the image information of the wood to be detected, the processor 1001 may be configured to call a wood defect detecting program stored in the memory 1005, and perform the following operations:
detecting whether the preset camera device is polluted or not based on the image information;
and if the preset camera device is polluted, outputting alarm information.
Further, before the step of performing defect detection on the image information based on the pre-trained deep neural network model to obtain a defect detection result, the processor 1001 may be configured to call a wood defect detection program stored in the memory 1005, and perform the following operations:
acquiring historical image information of historical detection wood and the historical detection result as a training data set;
and training a preset deep neural network model according to the training data set to obtain the pre-trained deep neural network model.
For a better understanding of the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Referring to fig. 2, a first embodiment of the present application provides a flowchart of a wood defect detecting method. In this embodiment, the wood defect detecting method includes the steps of:
step S10, acquiring image information of the wood to be detected, and carrying out defect detection on the image information based on a pre-trained deep neural network model to obtain a defect detection result;
understandably, the edge sealing process is adopted for many wood boards at present because the edge sealing can reduce friction and improve visual and beautiful effects. However, in the production process of the wood board, due to uncontrollable factors, various defects such as oblique cutting, overlong, gouging, gaps, pinholes, glue failure, white scraping or edge blasting are inevitably generated, so that the aesthetic degree of inferior products of the wood board is seriously affected, and meanwhile, great economic loss is caused to manufacturers. Therefore, it is necessary to detect the defects in real time and feed back the defects in time during the production of the wood boards. The mode that adopts artifical discernment carries out defect identification to wooden board at present, but because the defect kind is various, artifical discernment speed is slow, inefficiency, and the specific size of defect can't be discerned to people's eye simultaneously for to some less defects, artifical erroneous judgement probability is high, leads to the degree of accuracy of wood defect testing result lower.
On this basis, the present application provides a wood defect detecting method, in which the wood defect detecting method is applied to a wood defect detecting system, the wood defect detecting system includes a preset image capturing device and a deep neural network model, wherein the preset image capturing device is an industrial camera in the present embodiment, and the number of the preset image capturing device is preferably 3, and each industrial camera is provided with a corresponding camera serial number, referring to fig. 3, fig. 3 is a camera layout side view in a first embodiment of the wood defect detecting method of the present application, fig. 3 includes a wood board currently undergoing defect detection, a camera (i.e., an industrial camera) 1, a camera 2, and a camera 3, wherein the camera 1 is located above the wood board, the camera 2 is located on a side of the wood board, and the camera 3 is located below the wood board. The deep neural network is used for detecting defects of the wood board according to the input image of the wood board so as to accurately determine whether the defects exist in the wood board, accurately determine the size of the defects when the defects exist in the wood board, and output the size and the type of the defects. For convenience of description, the wood defect detection system is hereinafter referred to as a system for short.
On the one hand, the user can fix the industrial camera at the set detection position, for example, the industrial camera can be fixed in a layout mode as shown in fig. 3, then the wood conveying device takes the wood needing defect detection as the wood to be detected and respectively passes through the shooting areas of the industrial camera, when the wood to be detected reaches a certain position, the industrial camera is triggered to carry out material incoming signals of image shooting, so that the image containing the wood to be detected is shot through the industrial camera, then the defect detection is carried out on the basis of the image through the pre-trained deep neural network model, and whether the wood to be detected has defects or not is accurately determined.
On the other hand, the system shoots the image of the wood to be detected based on the incoming material signal to obtain the image information consisting of a plurality of images containing the wood to be detected. Further, after the system acquires the image information of the wood to be detected, the image information of the wood to be detected is input into a pre-trained deep neural network model, and the image information is subjected to defect detection through parameters obtained through machine learning in the deep neural network model, so that whether the wood to be detected contained in the image information has defects or not is determined, and a defect detection result is obtained, wherein the defect detection result comprises the presence of the defects of the wood to be detected and the absence of the defects of the wood to be detected, and the type and the position of the defects can also be determined. When the wood to be detected has defects, whether the defects are in a user allowable range is determined by determining the defect size of the wood to be detected and comparing the defect size with a preset defect size threshold value, if the defects are not in the user allowable range, the defect information of the target to be detected is output, and the accuracy of the wood defect detection result is effectively improved.
Further, the step of acquiring the image information of the wood to be detected comprises:
step S11, detecting whether there is a material incoming signal;
and step S12, if the incoming material signal exists, acquiring the image information of the wood to be detected based on a preset camera device.
When the image information of the wood to be detected is obtained, the system detects whether a material incoming signal triggered when the wood to be detected reaches a preset trigger position exists in real time, and the wood defect detection requirement of a user is met. Further, if the incoming material signal is detected to exist, the system controls the industrial camera to shoot images of a shooting area facing currently to obtain a plurality of images containing wood to be detected at different angles, and the image information of the wood to be detected is formed by the plurality of images; specifically, in this embodiment, the system controls the industrial cameras disposed at the three positions to respectively perform image shooting on the wood to be detected, so as to obtain 3 images of the wood to be detected, which include different angles, for example, the images of the upper surface, the lower surface, and the side surface of the wood to be detected, which are shot in this embodiment, and form image information of the wood to be detected by the 3 images. The method can improve the efficiency of detecting the wood defects, is convenient for accurately judging whether the wood to be detected has the defects or not according to the image information of the wood to be detected subsequently, determines whether the defects are in a user allowable range or not by determining the defect size of the wood to be detected and comparing the defect size with a preset defect size threshold value when the wood to be detected has the defects, and outputs the defect information of the target to be detected if the defects are not in the user allowable range, thereby effectively improving the accuracy of the wood defect detection result.
Further, after the step of obtaining the image information of the wood to be detected, the method further includes:
step A1, detecting whether the preset camera device is polluted or not based on the image information;
and step A2, if the preset camera device is polluted, outputting alarm information.
It is understood that since the preset image capturing device for capturing the image of the wood to be detected may be contaminated, for example, water mist, dust, etc. exist on the lens of the industrial camera as the preset image capturing device, the sharpness of the captured image may be reduced, which may further result in the accuracy of the result of the wood defect detection performed according to the captured image information. Therefore, after the image information of the wood to be detected is acquired, the system identifies the definition of each image forming the image information, and respectively compares the definition of each image with the definition threshold value set in advance according to the definition requirement. If the definition of each image is greater than or equal to the definition threshold value after comparison, the definition of each image meets the requirement, and the accuracy of the result of wood defect detection through the image information formed by each image is improved. If there are images with the definition smaller than the definition threshold value after comparison, which indicates that the preset image pickup device (i.e. the industrial camera) for shooting the images may be polluted, the system may control the industrial camera to shoot one or more images again, for example, shoot 3 images, identify the definition of the one or more images shot again and compare the identified definition with the definition threshold value. If the definition of the re-shot image is greater than or equal to the definition threshold, it may be that the preset image capturing device encounters interference of external factors when capturing images for the first time, for example, the image capturing device shakes due to some reasons, so that the definition of the shot image is low, and the re-shot image can be used to replace the original image whose definition is less than the definition threshold, thereby avoiding external interference. If the definition of the images is still smaller than the definition threshold value, it is determined that the preset camera device is polluted, the system outputs the polluted prompt information of the preset camera device through an output device such as a display device (display) or a voice device (loudspeaker), for example, the industrial camera 1, the industrial camera 2 and/or the industrial camera 3 are/is polluted through the display, so that a manager can timely process the preset camera device, the situation that the whole defect detection system cannot normally work after the lens of a single industrial camera is polluted is avoided, and the extremely high identification accuracy rate is achieved on the premise that the production efficiency is guaranteed.
Further, before the step of performing defect detection on the image information based on the pre-trained deep neural network model to obtain a defect detection result, the method further includes:
step B1, acquiring historical image information of the historical detection wood and the historical detection result as a training data set;
and step B2, training a preset deep neural network model according to the training data set to obtain the pre-trained deep neural network model.
It can be understood that before the defect detection is performed on the image information based on the pre-trained deep neural network model to obtain the defect detection result, the system needs to construct and train the deep neural network model first, so that whether the wood to be detected has the defect can be accurately judged by combining the trained deep neural network model with the image information. Specifically, the system firstly obtains a historical image of the historical detection wood and a historical detection result of the historical detection wood, and a training data set is formed by the historical detection wood and the historical detection result corresponding to the historical detection wood, wherein the historical image of the historical detection wood can be obtained by shooting through a preset camera device, and the historical detection result can be a result which is manually judged and labeled based on the historical image and the wood to be detected. And the training data set may be divided into a training set, a test set, and a validation set in a certain ratio (e.g., 8: 1: 1). Further, the system trains the preset deep neural network model through the acquired training data set, specifically, the preset deep neural network model can be trained through the training set firstly, then the preset deep neural network model is subjected to model test through the test set, and finally the preset deep neural network model is subjected to model verification through the verification set to obtain the trained deep neural network model, wherein the preset deep neural network model is provided with a linear relation, an activation function, a loss function and the like between an input layer and an output layer in the neural network, and a hidden layer exists between the input layer and the output layer in the neural network. The preset deep neural network model is trained through the training data set, so that the defect detection result obtained by detecting the defects of the image information through the trained deep neural network model is more accurate, and the detection efficiency can be improved. When the wood to be detected has defects, whether the defects are within the user allowable range is determined by determining the defect size of the wood to be detected and comparing the defect size with a preset defect size threshold value, and if the defects are not within the user allowable range, the defect information of the target to be detected is output based on the defect size, so that the accuracy of the wood defect detection result is effectively improved.
Step S20, if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information;
the method comprises the steps of carrying out defect detection on image information based on a pre-trained deep neural network model to obtain a defect detection result, if the defect detection result is determined that the wood to be detected has defects, firstly determining point cloud information of the defects in the wood to be detected based on images in the wood to be detected and combining a binocular vision principle, and then accurately determining the size of the defects in the wood to be detected through the point cloud information of the defects, so that whether the defects are in a user allowed range or not can be determined based on comparison between the size of the defects and a preset defect size threshold value, and if the defects are not in the user allowed range, outputting the defect information of a target to be detected, so that the accuracy of the wood defect detection result is effectively improved, wherein the preset defect size threshold value is a value set according to user requirements, and can be an acceptable defect size value. It will be appreciated that one or more defects may be present in a piece of timber to be inspected and that the size of all defects can be determined based on the image information in this step. The defect size with the maximum numerical value can be compared with a preset defect threshold value, and if the defect size with the maximum numerical value is larger than the preset defect threshold value, the wood to be detected has a defect which cannot be accepted by a user; and if the defect size with the maximum numerical value is smaller than or equal to the preset defect threshold value, all the defects in the wood to be detected can be accepted by the user.
At present, deep learning mainly judges whether defects exist in the industrial field and is difficult to accurately judge the sizes of the defects, so that the error recognition rate on some defects smaller than a detection threshold value is high.
It can be understood that, if the defect detection result indicates that the wood to be detected has no defect, the system determines that the wood to be detected has no defect, and may set a corresponding identifier for the wood to be detected, for example, a "qualified" identifier to indicate that the wood is qualified. And continuing to detect the defect of the next wood so as to meet the wood defect detection requirement of the user.
And step S30, if the defect size is larger than a preset defect size threshold, outputting the defect information of the wood to be detected based on the defect size.
After determining the defect size of the wood to be detected based on the image information, if the defect size of the wood to be detected is determined to be larger than a preset defect size threshold value through comparison, the defect is indicated to be beyond a user allowable range, namely the user cannot accept the existence of the defect, it can be understood that if the defect exists, the wood to be detected is determined to be a defective product, therefore, the system acquires the defect type and the defect position of the wood to be detected, which are detected by a neural network, wherein the defect type in the embodiment can include various types such as gouges, gaps, pinholes, glue failure, white scraping or edge bursting, the defect position is the position where the defect is located in the wood to be detected, the defect information of the wood to be detected is formed by the defect type, the defect position and the defect size, and the defect information is output through an output device for the user to check and perform corresponding processing on the wood to be detected, the accuracy of the wood defect detection result is effectively improved, wherein the output device can be a display device or a voice device.
The embodiment provides a wood defect detection method, a wood defect detection device, equipment, a medium and a computer program product, wherein image information of wood to be detected is obtained, and defect detection is carried out on the image information based on a pre-trained deep neural network model to obtain a defect detection result; if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information; and if the defect size is larger than a preset defect size threshold value, outputting the defect information of the wood to be detected based on the defect size. The method and the device have the advantages that defect detection is carried out on the image information of the wood to be detected based on the depth neural network model trained in advance, whether the wood to be detected has defects or not can be determined quickly and accurately, when the wood to be detected has defects, whether the defects are in the user allowable range or not is determined by determining the defect size of the wood to be detected and comparing the defect size with the preset defect size threshold value, if the defects are not in the user allowable range, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.
Further, a second embodiment of the wood defect detecting method is proposed based on the first embodiment of the wood defect detecting method, and in the second embodiment, the step of determining the defect size of the wood to be detected based on the image information includes:
step S21, acquiring point cloud information of the defects in the wood to be detected based on each image in the image information;
and step S22, determining the defect size of the wood to be detected based on the point cloud information.
It is understood that if there are some minor defects on the wood, the user may think that the defects are non-damaging and elegant, i.e. do not seriously affect the aesthetic degree of inferior products of the wood, and the wood with such defects may be judged as qualified wood. Therefore, if the defect detection result indicates that the wood to be detected has defects, the system further needs to determine whether the defects in the wood to be detected are acceptable by the user, specifically, the system may form each image in the image information into an image group, for example, form 3 images in this embodiment into 2 image groups, and perform joint calculation according to the formed image groups to obtain point cloud information of all the defects in the wood to be detected, where the point cloud is a data set of points in a certain coordinate system, and the points include rich information including three-dimensional coordinates X, Y, Z, color, classification value, intensity value, time, and the like. Further, after point cloud information of all defects in the wood to be detected is obtained, aiming at each defect, the system generates a curved surface through three-dimensional coordinate combination algorithm fitting of each point in the point cloud information, length information of the defect is calculated, the area of the defect is calculated according to the length information of the defect, the defect size of the wood to be detected is obtained, and a plurality of defect sizes are obtained after calculation of all the defects is completed, wherein the area of the defect is the area occupied by the defect on the surface of the wood to be detected. Whether the defects in the wood to be detected can be accepted by a user or not is determined according to the defect size of the wood to be detected subsequently, if not, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.
The defects in various sizes, such as raised edges, burrs and the like, are identified in the current mode of line laser three-dimensional scanning, but the defects which do not change the shape of the wood material, such as spots, are difficult to identify, the sizes of various defects can be accurately detected through point cloud information in the embodiment, the sizes of the defects, such as raised edges, burrs and spots, can be accurately detected, and the accuracy of the wood defect detection result is improved.
Further, the step of acquiring point cloud information of the defects in the wood to be detected based on each image in the image information includes:
and S211, processing each image in the image information based on a binocular vision algorithm to obtain point cloud information of the defects in the wood to be detected.
If the defect detection result is that the wood to be detected has defects, the system forms images in the image information into image groups, for example, 3 images in the embodiment form 2 image groups, and then performs joint calculation according to the formed image groups and a binocular vision algorithm to obtain point cloud information of all defects in the wood to be detected, wherein the binocular vision algorithm is a method for simulating human vision principle, a computer passive distance sensing method is used for observing an object from two or more points to obtain images under different viewing angles, and offset between pixels is calculated according to the matching relationship of the pixels between the images and the triangulation principle to obtain three-dimensional information of the object. For example: point cloud information of all defects detected by the industrial camera 1 is generated by a binocular vision algorithm for images acquired by the industrial camera 1 (above) and the industrial camera 2 (side), and point cloud information of all defects detected by the industrial camera 3 is generated by a binocular vision algorithm for images acquired by the industrial camera 3 (below) and the industrial camera 2 (side). The method and the device can accurately calculate the sizes of all defects in the wood to be detected according to the two groups of point cloud information, determine whether the defects are acceptable by a user or not, and improve the accuracy of the detection result of the defects of the wood, wherein the sizes of the same defect calculated by the two groups of point cloud information are the same.
Further, after the step of determining the defect size of the wood to be detected based on the image information, the method further comprises the following steps:
and step C, comparing the defect size with a preset defect size threshold value, and determining the size relation between the defect size and the preset defect size threshold value.
After determining the defect size of the wood to be detected based on the image information, the system compares the defect size of each defect with a preset defect size threshold value respectively, specifically, difference operation can be performed on each defect size and the preset defect size threshold value respectively, whether each defect size is smaller than the preset defect size threshold value or not is determined, the size relation between the defect size and the preset defect size threshold value is obtained, if the defect size is smaller than the preset defect size threshold value, the corresponding defect is acceptable to a user, and if the defect size is larger than or equal to the preset defect size threshold value, the corresponding defect is unacceptable to the user. When the defect size is not within the range acceptable by the user, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.
According to the method and the device, the point cloud information of the defects in the wood to be detected is obtained through each image in the image information, the defect size of the wood to be detected is determined based on the point cloud information, whether the defects are within the user allowable range is determined based on the comparison between the defect size and the preset defect size threshold, if the defects are not within the user allowable range, the defect information of the target to be detected is output based on the defect size, and the accuracy of the wood defect detection result is effectively improved.
Furthermore, the present application also provides a medium, preferably a computer-readable storage medium, on which a wood-defect detecting program is stored, which when executed by a processor implements the steps of the above-described wood-defect detecting method embodiments.
Furthermore, the present application also provides a computer program product comprising a computer program, which when executed by a processor, implements the steps of the above-mentioned wood defect detecting method embodiments.
In the embodiments of the wood defect detecting device, the computer readable medium, and the computer program product of the present application, all technical features of the embodiments of the wood defect detecting method are included, and the description and explanation contents are basically the same as those of the embodiments of the wood defect detecting method, and are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present application or a part contributing to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., a ROM/RAM, a magnetic disk, and an optical disk), and includes a plurality of instructions for enabling a terminal device (which may be a fixed terminal, such as an internet of things smart device including smart homes, such as a smart air conditioner, a smart lamp, a smart power supply, and a smart router, or a mobile terminal, including a smart phone, a wearable networked AR/VR device, a smart sound box, and a network device such as an auto-driven automobile) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (10)

1. A wood defect detection method, characterized in that the wood defect detection method comprises:
acquiring image information of wood to be detected, and carrying out defect detection on the image information based on a pre-trained deep neural network model to obtain a defect detection result;
if the defect detection result indicates that the wood to be detected has defects, determining the defect size of the wood to be detected based on the image information;
and if the defect size is larger than a preset defect size threshold value, outputting the defect information of the wood to be detected based on the defect size.
2. The wood defect detecting method according to claim 1, wherein the step of determining the defect size of the wood to be detected based on the image information comprises:
acquiring point cloud information of the defects in the wood to be detected based on each image in the image information;
and determining the defect size of the wood to be detected based on the point cloud information.
3. The wood defect detecting method of claim 2, wherein the step of obtaining point cloud information of the defects in the wood to be detected based on each image in the image information comprises:
and processing each image in the image information based on a binocular vision algorithm to obtain point cloud information of the defects in the wood to be detected.
4. The wood defect detecting method of claim 2, wherein the step of determining the defect size of the wood to be detected based on the image information is followed by further comprising:
and comparing the defect size with a preset defect size threshold value, and determining the size relation between the defect size and the preset defect size threshold value.
5. The wood defect detecting method of claim 1, wherein the step of acquiring image information of the wood to be detected comprises:
detecting whether a material incoming signal exists;
and if the incoming material signal exists, acquiring the image information of the wood to be detected based on a preset camera device.
6. The wood defect detecting method of claim 5, wherein the step of obtaining the image information of the wood to be detected further comprises:
detecting whether the preset camera device is polluted or not based on the image information;
and if the preset camera device is polluted, outputting alarm information.
7. The wood defect detecting method of claim 1, wherein before the step of performing defect detection on the image information based on the pre-trained deep neural network model to obtain a defect detection result, the method further comprises:
acquiring historical image information of historical detection wood and the historical detection result as a training data set;
and training a preset deep neural network model according to the training data set to obtain the pre-trained deep neural network model.
8. A wood-defect detecting apparatus, characterized in that the wood-defect detecting apparatus comprises a memory, a processor and a wood-defect detecting program stored on the memory and executable on the processor, the wood-defect detecting program, when executed by the processor, implementing the steps of the wood-defect detecting method as claimed in any one of claims 1-7.
9. A medium which is a computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a wood-defect detecting program which, when executed by a processor, implements the steps of the wood-defect detecting method according to any one of claims 1 to 7.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, carries out the steps of the wood defect detection method according to any one of claims 1-7.
CN202111083502.1A 2021-09-16 2021-09-16 Wood defect detection method, apparatus, medium, and computer program product Pending CN113538428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111083502.1A CN113538428A (en) 2021-09-16 2021-09-16 Wood defect detection method, apparatus, medium, and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111083502.1A CN113538428A (en) 2021-09-16 2021-09-16 Wood defect detection method, apparatus, medium, and computer program product

Publications (1)

Publication Number Publication Date
CN113538428A true CN113538428A (en) 2021-10-22

Family

ID=78123191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111083502.1A Pending CN113538428A (en) 2021-09-16 2021-09-16 Wood defect detection method, apparatus, medium, and computer program product

Country Status (1)

Country Link
CN (1) CN113538428A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114078127A (en) * 2022-01-20 2022-02-22 广州里工实业有限公司 Object defect detection and counting method, device, equipment and storage medium
CN114092765A (en) * 2021-11-24 2022-02-25 北京明略软件***有限公司 Wood quality detection method and device, electronic equipment and storage medium
CN114463284A (en) * 2022-01-14 2022-05-10 阿丘机器人科技(苏州)有限公司 PCB defect detection method, device, equipment and storage medium
CN114820594A (en) * 2022-06-21 2022-07-29 中科慧远视觉技术(北京)有限公司 Method for detecting edge sealing defects of plate based on image, related equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106885846A (en) * 2017-01-20 2017-06-23 浙江农林大学 Trees defect detecting device and detection method
KR20170078253A (en) * 2015-12-29 2017-07-07 전북대학교산학협력단 Method and Apparatus for predicting Drying Defect of wood
US20190098261A1 (en) * 2016-03-01 2019-03-28 Vab Solutions Inc. Tracking system and method for tracking wood products in a production line
CN109975314A (en) * 2018-12-27 2019-07-05 江苏理工学院 A kind of wood surface detection system and detection method based on three-dimensional laser point cloud data
CN111325713A (en) * 2020-01-21 2020-06-23 浙江省北大信息技术高等研究院 Wood defect detection method, system and storage medium based on neural network
CN212093316U (en) * 2020-02-17 2020-12-08 南京林业大学 Wood defect detection device based on kinect camera

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170078253A (en) * 2015-12-29 2017-07-07 전북대학교산학협력단 Method and Apparatus for predicting Drying Defect of wood
US20190098261A1 (en) * 2016-03-01 2019-03-28 Vab Solutions Inc. Tracking system and method for tracking wood products in a production line
CN106885846A (en) * 2017-01-20 2017-06-23 浙江农林大学 Trees defect detecting device and detection method
CN109975314A (en) * 2018-12-27 2019-07-05 江苏理工学院 A kind of wood surface detection system and detection method based on three-dimensional laser point cloud data
CN111325713A (en) * 2020-01-21 2020-06-23 浙江省北大信息技术高等研究院 Wood defect detection method, system and storage medium based on neural network
CN212093316U (en) * 2020-02-17 2020-12-08 南京林业大学 Wood defect detection device based on kinect camera

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092765A (en) * 2021-11-24 2022-02-25 北京明略软件***有限公司 Wood quality detection method and device, electronic equipment and storage medium
CN114463284A (en) * 2022-01-14 2022-05-10 阿丘机器人科技(苏州)有限公司 PCB defect detection method, device, equipment and storage medium
CN114078127A (en) * 2022-01-20 2022-02-22 广州里工实业有限公司 Object defect detection and counting method, device, equipment and storage medium
CN114078127B (en) * 2022-01-20 2022-05-17 广州里工实业有限公司 Object defect detection and counting method, device, equipment and storage medium
CN114820594A (en) * 2022-06-21 2022-07-29 中科慧远视觉技术(北京)有限公司 Method for detecting edge sealing defects of plate based on image, related equipment and storage medium

Similar Documents

Publication Publication Date Title
CN113538428A (en) Wood defect detection method, apparatus, medium, and computer program product
US9818023B2 (en) Enhanced face detection using depth information
KR102036978B1 (en) Liveness detection method and device, and identity authentication method and device
US10241990B2 (en) Gesture based annotations
CN108090747B (en) Self-service vehicle checking method, device, equipment and computer storage medium for vehicle insurance underwriting
CN109829883B (en) Product quality detection method and device
CN109727229B (en) Method and device for detecting false solder
CN105740910A (en) Vehicle object detection method and device
CN110291855B (en) Apparatus for inspecting component mounted on printed circuit board, method of operating the same, and computer-readable recording medium
US20110150300A1 (en) Identification system and method
CN109284081B (en) Audio output method and device and audio equipment
WO2020168858A1 (en) Data self-calibration method and related apparatus
US9613328B2 (en) Workflow monitoring and analysis system and method thereof
CN112884743B (en) Detection method and device, detection equipment and storage medium
CN111008954A (en) Information processing method and device, electronic equipment and storage medium
CN111626995B (en) Intelligent insert detection method and device for workpiece
JPH1124694A (en) Instruction recognition device
CN113109364B (en) Method and device for detecting chip defects
TWI420406B (en) Stereo vision based dice point recognition system and method for uncontrolled environments
CN107948392B (en) Terminal and display fault processing method
CN115908768B (en) Combined lighting shooting battery flaw identification method, system and platform
KR101558487B1 (en) Method for providing tire information
CN116245808A (en) Workpiece defect detection method and device, electronic equipment and storage medium
KR101556353B1 (en) Method for providing tire information using a portable terminal
CN111693533A (en) Workpiece surface quality detection method and device and appearance machine

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20211022