[go: up one dir, main page]

CN113533372A - A paper defect detection method, system, device and computer storage medium - Google Patents

A paper defect detection method, system, device and computer storage medium Download PDF

Info

Publication number
CN113533372A
CN113533372A CN202110784680.0A CN202110784680A CN113533372A CN 113533372 A CN113533372 A CN 113533372A CN 202110784680 A CN202110784680 A CN 202110784680A CN 113533372 A CN113533372 A CN 113533372A
Authority
CN
China
Prior art keywords
paper
image
color
module
main control
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.)
Granted
Application number
CN202110784680.0A
Other languages
Chinese (zh)
Other versions
CN113533372B (en
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.)
Zhejiang Sci Tech University ZSTU
Original Assignee
Zhejiang Sci Tech University ZSTU
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 Zhejiang Sci Tech University ZSTU filed Critical Zhejiang Sci Tech University ZSTU
Priority to CN202110784680.0A priority Critical patent/CN113533372B/en
Publication of CN113533372A publication Critical patent/CN113533372A/en
Application granted granted Critical
Publication of CN113533372B publication Critical patent/CN113533372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • 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/01Arrangements or apparatus for facilitating the optical investigation
    • 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

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

本发明提供的一种纸张缺陷检测方法、系统、装置及计算机存储介质,涉及机器视觉领域,包括:拍摄待测纸张的彩色图像;采用Opencv算法和Hough变换方法进行图像处理和特征提取;将待测纸张的彩色图像转换成HSV模型,通过各种瑕疵的颜色特征设置相应的参数来提取不同颜色,生成对应的二值化图像;通过计算所述二值化图像中的白色像素点数量来判断纸张表面是否存在相应的颜色,进而判断是否存在黑斑、油斑和孔洞;将待测纸张的彩色图像进行灰度化、高斯模糊、梯度化、二值化、通过函数去除孤立点和干扰点,再进行膨胀处理,最后通过Hough变换方法提取图像中的直线,进而判断是否有划痕存在。

Figure 202110784680

The invention provides a paper defect detection method, system, device and computer storage medium, which relate to the field of machine vision and include: photographing a color image of the paper to be tested; using Opencv algorithm and Hough transform method for image processing and feature extraction; The color image of the measuring paper is converted into an HSV model, and the corresponding parameters are set through the color features of various defects to extract different colors, and the corresponding binarized image is generated; judged by calculating the number of white pixels in the binarized image Whether there is a corresponding color on the surface of the paper, and then judge whether there are black spots, oil spots and holes; grayscale, Gaussian blur, gradient, binarization, and remove isolated points and interference points on the color image of the paper to be tested. , and then perform expansion processing, and finally extract the straight lines in the image through the Hough transform method, and then judge whether there are scratches.

Figure 202110784680

Description

Paper defect detection method, system, device and computer storage medium
Technical Field
The invention relates to the field of machine vision, in particular to a paper defect detection method, a system, a device and a computer storage medium.
Background
After the paper is produced, some defects such as scratches, black spots, holes, oil spots and the like may exist, so that defect detection is necessary before the paper is put into the market or further processed.
At present, the detection of paper defects can be divided into two types, one type is finished in a manual visual observation mode, the speed is low, the efficiency is low, the labor cost is high, and misjudgment is easy to occur.
The other mode is a mode of machine-assisted manual quality inspection, firstly, a machine quality inspection system with certain judgment capability filters out paper images without defects, and then, the suspected defective paper images are judged according to vision through manual quality inspection.
Most of the current image processing of the automatic defect recognition device is based on the X86 computing platform, however, the CPU of the X86 platform has a high heat dissipation requirement, so the industrial control system needs to be equipped with complete heat dissipation devices, such as a heat sink, a fan, a circulating cooling system, and the like, and therefore the industrial controller manufactured by using the X86 platform usually has a huge volume and a high cost.
Disclosure of Invention
In order to solve the technical problems, the invention discloses a paper defect detection method, a paper defect detection device and a computer storage medium, aiming at solving the problems that in the prior art, the speed is low, the efficiency is low, the labor cost is high and the misjudgment rate is high due to the fact that the defect detection is carried out through a mode of observing the defects through manual vision.
In order to achieve the above object, the present invention discloses a paper defect detecting method, comprising:
shooting a color image of the paper to be detected;
carrying out image processing and feature extraction by adopting an Opencv algorithm and a Hough transformation method;
converting a color image of the paper to be detected into an HSV model, setting corresponding parameters through color characteristics of various flaws to extract different colors, and generating a corresponding binary image;
judging whether the corresponding color exists on the surface of the paper by calculating the number of white pixel points in the binary image, and further judging whether black spots, oil spots and holes exist;
graying, Gaussian blurring, graduating and binaryzation are carried out on the color image of the paper to be detected, isolated points and interference points are removed through functions, then expansion processing is carried out, finally, straight lines in the image are extracted through a Hough transformation method, and whether scratches exist or not is judged.
In one embodiment, the paper defect detecting method further includes: and summarizing the detection conditions of all the defects, and broadcasting the types and states of the detected paper defects by voice.
In one embodiment, a color image of the paper to be detected is converted into an HSV model, different colors are extracted by setting corresponding parameters according to color characteristics of various flaws, and a corresponding binary image is generated; the method comprises the following steps:
setting the dividing threshold of HSV values of various colors, and converting the RGB space model into an HSV space model;
searching for the color of different spots in the required interval, obtaining the required color information,
other unwanted colors are filtered to identify the defect type.
In one embodiment, the graying processing, filtering and denoising, image binarization processing, removing isolated points and interference points by a function, performing expansion processing, and finally extracting straight lines in the image by a Hough transform method to determine whether scratches exist or not includes:
carrying out gray processing on the color graph of the paper to be detected, selecting Gaussian kernel filtering and denoising, adopting a sobel operator to carry out edge extraction on the scratch defect, and judging whether the scratch edge point is the scratch edge point; carrying out binarization processing on the image, mapping the image to a Hough space, taking a local maximum value, setting a threshold value, and filtering an interference straight line; drawing a straight line, calibrating an angular point and detecting the scratch defect.
In one embodiment, the graying process comprises: carrying out Gray processing on the image by using a single-channel algorithm, and taking only G component in RGB three channels of each pixel point as a Gray value, wherein the Gray conversion formula is G.
In one embodiment, the edge extraction of the scratch defect by using the sobel operator includes:
carrying out weighted difference operation on gray values of upper, lower, left and right adjacent areas of each pixel in the image; the extreme value reached by the edge is used for realizing the detection of the edge;
calculating the convolution of the pixel in the x direction and the convolution of the pixel in the y direction according to the following formula 1 and formula 2;
Figure BDA0003158265580000031
Figure BDA0003158265580000032
wherein the convolution template of the Sobel operator is:
Figure BDA0003158265580000033
in one embodiment, the extracting the straight line in the image by the Hough transform method includes: carrying out binarization processing on the gradient image subjected to sobel operator processing again; recording the label of the inspection state of each pixel point, and removing isolated points and interference points; expanding the point-removed scratch binary image to enable the scratch characteristics to be more obvious; and (4) carrying out Hough linear detection on the expanded image to obtain a linear line of the scratch outline.
An embodiment of the present invention further provides a paper defect detecting system, where the system includes:
an image acquisition module: the color image shooting device is used for shooting a color image of the paper to be detected;
the image processing and feature extraction module: the method is used for image processing and feature extraction by adopting an Opencv algorithm and a Hough transformation method;
a defect detection module; the system comprises a color image acquisition module, a color image generation module, a color image acquisition module and a color image acquisition module, wherein the color image acquisition module is used for acquiring color images of paper to be detected;
judging whether the corresponding color exists on the surface of the paper by calculating the number of white pixel points in the binary image, and further judging whether black spots, oil spots and holes exist;
graying, Gaussian blurring, graduating and binaryzation are carried out on a color image of the paper to be detected, isolated points and interference points are removed through functions, then expansion processing is carried out, finally, straight lines in the image are extracted through a Hough transformation method, and whether scratches exist or not is judged;
voice broadcast module: the method is used for summarizing the detection conditions of all the defects and broadcasting the types and states of the detected paper defects through voice.
An embodiment of the present invention further provides a paper defect detecting apparatus, including: the system comprises an AM5708 main control chip, an RS232 driving chip, a voice broadcasting module, a NAND Flash memory, an RAM chip, an HDMI interface protection chip, an HDMI display, a PHY chip, a network port, an SD card, a camera, a mouse, a keyboard, a relay module and a light source;
the voice broadcasting module is electrically connected with the AM5708 main control chip through an RS232 driving chip;
the NAND Flash memory is electrically connected with the AM5708 main control chip;
the RAM chip is electrically connected with the AM5708 main control chip;
the HDMI display is electrically connected with the AM5708 main control chip through an HDMI interface protection chip;
the network port is electrically connected with the AM5708 main control chip through the PHY chip;
the SD card is electrically connected with the AM5708 main control chip;
the camera is electrically connected with the AM5708 main control chip through a USB interface;
the mouse and the keyboard are electrically connected with the AM5708 main control chip through a USB interface;
the light source is electrically connected with the AM5708 main control chip through the relay module;
the voice broadcast module includes: the device comprises a controller, a serial port transceiving module, a voice synthesis module, a voice line output module, a power amplifier and a loudspeaker;
the AM5708 main control chip stores program instructions and executes any one of the paper defect detection methods.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, where the computer program includes program instructions, and the program instructions, when executed by a processor, execute any one of the foregoing paper defect detection methods.
The embodiment of the invention has the following beneficial effects:
the invention provides a paper defect detection method, which adopts a machine vision surface detection method based on Opencv, uses different detection methods aiming at different defect types, and detects the paper defects of black spots, oil spots and holes by extracting color characteristics; aiming at the scratched paper defects, a defect image is acquired through an image acquisition system, the image is preprocessed firstly, the preprocessing comprises gray processing and median filtering, the shape features are extracted by adopting a Hough transformation method and are matched, and finally the defects are identified and classified, so that the detection efficiency is high, the labor cost is low, and the detection accuracy is high. The problem of among the prior art paper defect's detection pass through artifical visual inspection defect mode, it is slow, inefficiency, the cost of labor is high, the erroneous judgement rate is high is solved.
According to the paper defect detection device provided by the embodiment of the invention, under the illumination of a light source, a paper defect is shot by a camera, an optical signal is converted into an electric signal and then converted into a signal processed by a computer, the signal is transmitted to an AM5708 main control chip for identifying the paper defect, and an HDMI (high definition multimedia interface) displayer is used for displaying the type, position, size and shape of the defect; defects of mouse and keyboard control calibration; the network port is used for connecting the device with a network and transmitting defect data; the voice broadcast module is used for broadcasting the paper defect kind that discerns, adopts AM5708 main control chip can reduce industrial controller's size to smart mobile phone that is so big or small, carries out image processing through the image of shooting at the ARM platform, judges to detect and detects whether there is the defect in the paper, and the embedded architecture scheme that this system adopted compares in PC platform consumption and cost lower, detection efficiency is higher, the cost of labor is lower, and it is higher to detect the rate of accuracy.
Drawings
To illustrate more clearly the present invention described herein, and to disclose a paper defect detection method, system, apparatus and computer storage medium, reference will now be made briefly to the accompanying drawings, which are needed for embodiments of the present invention, and it should be apparent that the drawings in the following description are only some embodiments of the present invention and that other drawings may be derived therefrom by those skilled in the art without any inventive effort.
FIG. 1 is a flow chart of a paper defect detection method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a paper defect detecting system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a hardware structure of a paper defect detecting apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a voice broadcast module of the paper defect detection apparatus according to the embodiment of the present invention;
FIG. 5 is an exemplary original paper defect diagram of a paper defect detection method according to an embodiment of the present invention;
FIG. 6 is a binary image of the defect original map in FIG. 5 after being transformed into an HSV space model;
FIG. 7 is a diagram of an original drawing of a scratch mark of a paper defect detecting method according to an embodiment of the present invention and a drawing after applying the gray processing of the method according to the embodiment;
FIG. 8 is a graph of the effect of the Gaussian filtering of FIG. 7;
FIG. 9 is a diagram of the gradient effect of FIG. 8 through a Sobel operator;
FIG. 10 is a diagram illustrating the effect of the general binarization process of FIG. 9;
FIG. 11 is a diagram of FIG. 10 with isolated points and interference points removed;
FIG. 12 is a graph showing the effect of the expansion process of FIG. 11;
FIG. 13 is a line graph of the scratch profile obtained by Hough line inspection of FIG. 12;
fig. 14 is a schematic diagram of the expansion operation.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, in order to achieve the above object, the present invention provides a method for detecting a paper defect, including:
the invention discloses a paper defect detection method, which comprises the following steps:
s101, shooting a color image of paper to be detected;
s102, image processing and feature extraction are carried out by adopting an Opencv algorithm and a Hough transformation method;
s103, converting the color image of the paper to be detected into an HSV model, setting corresponding parameters through the color characteristics of various flaws to extract different colors, and generating a corresponding binary image;
the image is first converted from the RGB color space to a visually equalized color space (e.g., HSV space) and the color space is quantized into bins. The image is then divided into regions using a color segmentation technique, each region being indexed by a color component of the quantized color space, thereby expressing the image as a binary set of color indices. In image matching, the distances between different image color sets and the spatial relationship of the color regions are compared. Because the color set is expressed as a binary characteristic vector, the retrieval speed is accelerated, and the method is very beneficial to the real-time detection of paper defects;
s104, judging whether the corresponding color exists on the surface of the paper by calculating the number of white pixel points in the binary image, and further judging whether black spots, oil spots and holes exist;
and S105, graying, Gaussian blurring, graduating and binaryzation are carried out on the color image of the paper to be detected, isolated points and interference points are removed through functions, then expansion processing is carried out, finally, straight lines in the image are extracted through a Hough transformation method, and whether scratches exist is judged.
In one illustrative embodiment, the paper defect detection method further includes: and summarizing the detection conditions of all the defects, and broadcasting the types and states of the detected paper defects by voice.
As shown in fig. 5 and fig. 6, in an embodiment of the specification, a color image of a paper to be tested is converted into an HSV model, different colors are extracted by setting corresponding parameters according to color characteristics of various flaws, and a corresponding binary image is generated; the method comprises the following steps:
setting the dividing threshold of HSV values of various colors, and converting the RGB space model into an HSV space model;
searching for the color of different spots in the required interval, obtaining the required color information,
other unwanted colors are filtered to identify the defect type.
For example, the color of different spot colors within a required interval is found, the paper to be detected is placed under a blue background, the black spot index color is black, the oil spot index color is orange (the oil spot is generally orange or yellow), and the hole index color is blue (the currently selected background is blue, and once a hole exists, the hole area is the background color).
As shown in fig. 7 to 13, in an embodiment of the specification, the graying, filtering, denoising, image binarization, removing isolated points and interference points by a function, performing dilation, and finally extracting a straight line in the image by a Hough transform method to determine whether there is a scratch includes:
carrying out gray processing on the color graph of the paper to be detected, selecting Gaussian kernel filtering and denoising, adopting a sobel operator to carry out edge extraction on the scratch defect, and judging whether the scratch edge point is the scratch edge point; carrying out binarization processing on the image, mapping the image to a Hough space, taking a local maximum value, setting a threshold value, and filtering an interference straight line; drawing a straight line, calibrating an angular point, and detecting a scratch defect;
before Hough transformation detection is carried out on a scratch defect image, preprocessing work needs to be carried out on an acquired original image in advance, the requirement of Hough linear transformation on image processing is met, the image quality is improved, unnecessary image features are filtered, the data volume of Hough transformation detection processing is reduced, and the requirements on accurate identification and system real-time performance are met.
In one illustrative embodiment, the graying process comprises: carrying out Gray processing on the image by using a single-channel algorithm, and taking only G component in RGB three channels of each pixel point as a Gray value, wherein the Gray conversion formula is G.
In an embodiment of the specification, the edge extraction of the scratch defect by using a sobel operator includes:
carrying out weighted difference operation on gray values of upper, lower, left and right adjacent areas of each pixel in the image; the extreme value reached by the edge is used for realizing the detection of the edge;
calculating the convolution of the pixel in the x direction and the convolution of the pixel in the y direction according to the following formula 1 and formula 2;
Figure BDA0003158265580000081
Figure BDA0003158265580000091
Figure BDA0003158265580000092
wherein the convolution template of the Sobel operator is:
Figure BDA0003158265580000093
in one illustrative embodiment, the extracting straight lines in the image by the Hough transform method includes: carrying out binarization processing on the gradient image subjected to sobel operator processing again; recording the label of the inspection state of each pixel point, and removing isolated points and interference points; expanding the point-removed scratch binary image to enable the scratch characteristics to be more obvious; hough straight line detection can be carried out on the expanded image to obtain a straight line of the scratch outline;
the expansion is an operation of solving a local maximum, as shown in fig. 14, which is an expansion schematic diagram, where a kernel B is convolved with a graph, that is, a maximum value of a pixel point in a region covered by the kernel B is calculated, and the maximum value is assigned to a pixel specified by a reference point, so that a highlight region in an image is gradually increased.
As shown in fig. 2, an embodiment of the present invention further provides a paper defect detecting system, including:
an image acquisition module: the color image shooting device is used for shooting a color image of the paper to be detected;
the image processing and feature extraction module: the method is used for image processing and feature extraction by adopting an Opencv algorithm and a Hough transformation method; a defect detection module; the system comprises a color image acquisition module, a color image generation module, a color image acquisition module and a color image acquisition module, wherein the color image acquisition module is used for acquiring color images of paper to be detected; judging whether the corresponding color exists on the surface of the paper by calculating the number of white pixel points in the binary image, and further judging whether black spots, oil spots and holes exist; graying, Gaussian blurring, graduating and binaryzation are carried out on a color image of the paper to be detected, isolated points and interference points are removed through functions, then expansion processing is carried out, finally, straight lines in the image are extracted through a Hough transformation method, and whether scratches exist or not is judged;
voice broadcast module: the method is used for summarizing the detection conditions of all the defects and broadcasting the types and states of the detected paper defects through voice.
As shown in fig. 3 and 4, an embodiment of the present invention further provides a paper defect detecting apparatus, including:
1-1 part of an AM5708 main control chip, 1-2 parts of an RS232 driving chip, 1-3 parts of a voice broadcasting module, 1-4 parts of an NAND Flash memory, 1-5 parts of an RAM chip, 1-6 parts of an HDMI interface protection chip, 1-7 parts of an HDMI display, 1-8 parts of a PHY chip, 1-9 parts of a network interface, 1-10 parts of an SD card, 1-12 parts of a camera, 1-11 parts of a mouse, 1-11 parts of a keyboard, 1-13 parts of a relay module and 1-14 parts of a light source;
the voice broadcasting module 1-3 is electrically connected with the AM5708 main control chip 1-1 through an RS232 driving chip 1-2;
the NAND Flash memory 1-4 is electrically connected with the AM5708 main control chip 1-1;
the AM5708 main control chip can be selected from: the industrial core board is an AM5708, AM5708 industrial core board, and integrates TI DSP C66x + ARM Cortex-A15 industrial control and a programmable audio/video processor;
the model of the NAND Flash memory 1-4 can be a three-star NAND Flash K9K8G08U 0M;
the NAND Flash memories 1-4 are nonvolatile memories for storing programs and data;
the RAM chip 1-5 is electrically connected with the AM5708 main control chip 1-1;
the type of the RAM chip 1-5 can be Samsung K4B4G 1646B;
the HDMI display 1-7 is electrically connected with the AM5708 main control chip 1-1 through an HDMI interface protection chip 1-6;
the HDMI interface protection chips 1-6 can be selected from the following chip types: a CM 2020;
the network ports 1-9 are electrically connected with an AM5708 main control chip 1-1 through PHY chips 1-8; for performing detection device data networking
The SD card 1-10 is electrically connected with the AM5708 main control chip 1-1;
the camera 1-12 is electrically connected with the AM5708 main control chip 1-1 through a USB interface and used for shooting paper defects;
the mouse and the keyboard 1-11 are electrically connected with the AM5708 main control chip 1-1 through a USB interface and used for defect image control and calibration;
the light sources 1-14 are electrically connected with an AM5708 main control chip 1-1 through relay modules 1-13, and the light sources 1-14 are used for assisting the cameras 1-12 in shooting defects; the AM5708 main control chip 1-1 controls the cameras 1-12 to shoot the paper defects through the relay modules 1-13.
In an embodiment of the specification, the voice broadcasting module 1-3 includes: the device comprises a controller 2-1, a serial port transceiving module 2-2, a voice synthesis module 2-3, a voice line output module 2-4, a power amplifier 2-5 and a loudspeaker 2-6;
the voice broadcasting module can select a SYN6288 chip of science and technology Limited company under Beijing Yuyin heaven.
In one illustrative embodiment, the light sources 1-14 may be:
annular light sources, dome light sources, coaxial light sources, parallel backlights, annular shadowless light sources.
In an embodiment of the specification, the AM5708 main control chip stores program instructions to execute any one of the above-described paper defect detection methods.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, where the computer program includes program instructions, and the program instructions, when executed by a processor, execute any one of the foregoing paper defect detection methods.
The embodiment of the invention has the following beneficial effects:
the invention provides a paper defect detection method, which adopts a machine vision surface detection method based on Opencv, uses different detection methods aiming at different defect types, and detects the paper defects of black spots, oil spots and holes by extracting color characteristics; aiming at the scratched paper defects, a defect image is acquired through an image acquisition system, the image is preprocessed firstly, the preprocessing comprises gray processing and median filtering, the shape features are extracted by adopting a Hough transformation method and are matched, and finally the defects are identified and classified, so that the detection efficiency is high, the labor cost is low, and the detection accuracy is high. The problem of among the prior art paper defect's detection pass through artifical visual inspection defect mode, it is slow, inefficiency, the cost of labor is high, the erroneous judgement rate is high is solved.
According to the paper defect detection device provided by the embodiment of the invention, under the illumination of a light source, a paper defect is shot by a camera, an optical signal is converted into an electric signal and then converted into a signal processed by a computer, the signal is transmitted to an AM5708 main control chip for identifying the paper defect, and an HDMI (high definition multimedia interface) displayer is used for displaying the type, position, size and shape of the defect; defects of mouse and keyboard control calibration; the network port is used for connecting the device with a network and transmitting defect data; the voice broadcast module is used for broadcasting the paper defect kind that discerns, adopts AM5708 main control chip can reduce industrial controller's size to smart mobile phone that is so big or small, carries out image processing through the image of shooting at the ARM platform, judges to detect and detects whether there is the defect in the paper, and the embedded architecture scheme that this system adopted compares in PC platform consumption and cost lower, detection efficiency is higher, the cost of labor is lower, and it is higher to detect the rate of accuracy.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the device and server embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the partial description of the method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
While the invention has been described in connection with what is presently considered to be the most practical and preferred embodiment, it is to be understood that the invention is not to be limited to the disclosed embodiment, but on the contrary, is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method of detecting paper defects, the method comprising:
shooting a color image of the paper to be detected;
carrying out image processing and feature extraction by adopting an Opencv algorithm and a Hough transformation method;
converting a color image of the paper to be detected into an HSV model, setting corresponding parameters through color characteristics of various flaws to extract different colors, and generating a corresponding binary image;
judging whether the corresponding color exists on the surface of the paper by calculating the number of white pixel points in the binary image, and further judging whether black spots, oil spots and holes exist;
graying, Gaussian blurring, graduating and binaryzation are carried out on the color image of the paper to be detected, isolated points and interference points are removed through functions, then expansion processing is carried out, finally, straight lines in the image are extracted through a Hough transformation method, and whether scratches exist or not is judged.
2. The paper defect detection method of claim 1, further comprising:
and summarizing the detection conditions of all the defects, and broadcasting the types and states of the detected paper defects by voice.
3. The paper defect detection method according to claim 1, characterized in that a color image of the paper to be detected is converted into an HSV model, different colors are extracted by setting corresponding parameters according to color characteristics of various flaws, and a corresponding binary image is generated; the method comprises the following steps:
setting the dividing threshold of HSV values of various colors, and converting the RGB space model into an HSV space model;
the color of the different spot colors within the desired interval is sought, and when the desired color information is obtained, other undesired colors are filtered to identify the defect type.
4. The paper defect detection method of claim 1, wherein the graying processing, filtering and denoising, image binarization processing, removing isolated points and interference points through functions, then expansion processing are performed on the color image of the paper to be detected, and finally the straight line in the image is extracted through a Hough transformation method to judge whether the scratch exists, comprises the following steps:
carrying out gray processing on the color graph of the paper to be detected, selecting Gaussian kernel filtering and denoising, adopting a sobel operator to carry out edge extraction on the scratch defect, and judging whether the scratch edge point is the scratch edge point; carrying out binarization processing on the image, mapping the image to a Hough space, taking a local maximum value, setting a threshold value, and filtering an interference straight line; drawing a straight line, calibrating an angular point and detecting the scratch defect.
5. The paper defect detection method of claim 4, wherein the graying process comprises: carrying out gray processing on the image by using a single-channel algorithm, and taking only a G component in RGB three channels of each pixel point as a gray value, wherein the gray conversion formula is as follows: g.
6. The paper defect detecting method of claim 5, wherein the edge extraction of the scratch defect by using the sobel operator comprises:
carrying out weighted difference operation on gray values of upper, lower, left and right adjacent areas of each pixel in the image; the extreme value reached by the edge is used for realizing the detection of the edge;
calculating the convolution of the pixel in the x direction and the convolution of the pixel in the y direction according to the following formula 1 and formula 2;
Sx=[f(x-1,y-1)+2f(x+1,y)+f(x+1,y+1)]-[f(x-1,y-1)+2f(x-1,y)+f(x+1,y-1)]
equation 1
Sy=[f(x-1,y+1)+2f(x,y+1)+f(x+1,y+1)]-[f(x-1,y-1)+2f(x,y-1)+f(x+1,y-1)]
Equation 2
Wherein the convolution template of the Sobel operator is:
Figure FDA0003158265570000021
7. the paper defect detection method of claim 6, wherein the extracting the straight lines in the image by the Hough transform method comprises:
carrying out binarization processing on the gradient image subjected to sobel operator processing again;
recording the label of the inspection state of each pixel point, and removing isolated points and interference points;
expanding the point-removed scratch binary image to enable the scratch characteristics to be more obvious;
and (4) carrying out Hough linear detection on the expanded image to obtain a linear line of the scratch outline.
8. A paper defect detection system, characterized in that the system comprises:
an image acquisition module: the color image shooting device is used for shooting a color image of the paper to be detected;
the image processing and feature extraction module: the method is used for image processing and feature extraction by adopting an Opencv algorithm and a Hough transformation method;
a defect detection module; the system comprises a color image acquisition module, a color image generation module, a color image acquisition module and a color image acquisition module, wherein the color image acquisition module is used for acquiring color images of paper to be detected;
judging whether the corresponding color exists on the surface of the paper by calculating the number of white pixel points in the binary image, and further judging whether black spots, oil spots and holes exist;
graying, Gaussian blurring, graduating and binaryzation are carried out on a color image of the paper to be detected, isolated points and interference points are removed through functions, then expansion processing is carried out, finally, straight lines in the image are extracted through a Hough transformation method, and whether scratches exist or not is judged;
voice broadcast module: the method is used for summarizing the detection conditions of all the defects and broadcasting the types and states of the detected paper defects through voice.
9. A paper defect detecting apparatus, comprising: the system comprises an AM5708 main control chip, an RS232 driving chip, a voice broadcasting module, a NAND Flash memory, an RAM chip, an HDMI interface protection chip, an HDMI display, a PHY chip, a network port, an SD card, a camera, a mouse, a keyboard, a relay module and a light source;
the voice broadcasting module is electrically connected with the AM5708 main control chip through an RS232 driving chip;
the NAND Flash memory is electrically connected with the AM5708 main control chip;
the RAM chip is electrically connected with the AM5708 main control chip;
the HDMI display is electrically connected with the AM5708 main control chip through an HDMI interface protection chip;
the network port is electrically connected with the AM5708 main control chip through the PHY chip;
the SD card is electrically connected with the AM5708 main control chip;
the camera is electrically connected with the AM5708 main control chip through a USB interface;
the mouse and the keyboard are electrically connected with the AM5708 main control chip through a USB interface;
the light source is electrically connected with the AM5708 main control chip through the relay module;
the voice broadcast module includes: the device comprises a controller, a serial port transceiving module, a voice synthesis module, a voice line output module, a power amplifier and a loudspeaker;
the AM5708 main control chip stores program instructions and executes the paper defect detection method as claimed in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, perform the paper defect detection method according to any one of claims 1-7.
CN202110784680.0A 2021-07-12 2021-07-12 Paper defect detection method, system, device and computer storage medium Active CN113533372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110784680.0A CN113533372B (en) 2021-07-12 2021-07-12 Paper defect detection method, system, device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110784680.0A CN113533372B (en) 2021-07-12 2021-07-12 Paper defect detection method, system, device and computer storage medium

Publications (2)

Publication Number Publication Date
CN113533372A true CN113533372A (en) 2021-10-22
CN113533372B CN113533372B (en) 2024-02-23

Family

ID=78098558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110784680.0A Active CN113533372B (en) 2021-07-12 2021-07-12 Paper defect detection method, system, device and computer storage medium

Country Status (1)

Country Link
CN (1) CN113533372B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114295639A (en) * 2021-12-31 2022-04-08 珠海格力智能装备有限公司 Visual inspection method, visual inspection device, and non-volatile storage medium
CN114466183A (en) * 2022-02-21 2022-05-10 江东电子材料有限公司 Copper foil flaw detection method and device based on characteristic spectrum and electronic equipment
CN114577811A (en) * 2022-03-01 2022-06-03 上海电机学院 Medicine plate micropore defect detection method based on image sensor
CN116188368A (en) * 2022-12-07 2023-05-30 苏州镁伽科技有限公司 Product defect detection method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008203198A (en) * 2007-02-22 2008-09-04 Nippon Steel Corp Surface flaw inspection system, surface flaw inspection method, and computer program
CN101799434A (en) * 2010-03-15 2010-08-11 深圳市中钞科信金融科技有限公司 Printing image defect detection method
CN108037138A (en) * 2017-12-23 2018-05-15 陕西科技大学 A kind of web inspection system and detection method for being used to detect the two-sided defect of paper
CN108663382A (en) * 2018-05-10 2018-10-16 苏州大学 The method and device of the paper surface defects detection of view-based access control model conspicuousness
CN109886914A (en) * 2018-12-19 2019-06-14 刘咏晨 Paper sheet defect detection method based on local luminance invariance priori
CN111311537A (en) * 2019-11-28 2020-06-19 中国印钞造币总公司 Defect detection device and detection method
CN111650220A (en) * 2020-07-15 2020-09-11 博科视(苏州)技术有限公司 Vision-based image-text defect detection method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008203198A (en) * 2007-02-22 2008-09-04 Nippon Steel Corp Surface flaw inspection system, surface flaw inspection method, and computer program
CN101799434A (en) * 2010-03-15 2010-08-11 深圳市中钞科信金融科技有限公司 Printing image defect detection method
CN108037138A (en) * 2017-12-23 2018-05-15 陕西科技大学 A kind of web inspection system and detection method for being used to detect the two-sided defect of paper
CN108663382A (en) * 2018-05-10 2018-10-16 苏州大学 The method and device of the paper surface defects detection of view-based access control model conspicuousness
CN109886914A (en) * 2018-12-19 2019-06-14 刘咏晨 Paper sheet defect detection method based on local luminance invariance priori
CN111311537A (en) * 2019-11-28 2020-06-19 中国印钞造币总公司 Defect detection device and detection method
CN111650220A (en) * 2020-07-15 2020-09-11 博科视(苏州)技术有限公司 Vision-based image-text defect detection method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王亚波;周强;王伟刚;王莹;: "基于自适应神经模糊推理系统的纸病二次辨识", 中国造纸, no. 12 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114295639A (en) * 2021-12-31 2022-04-08 珠海格力智能装备有限公司 Visual inspection method, visual inspection device, and non-volatile storage medium
CN114466183A (en) * 2022-02-21 2022-05-10 江东电子材料有限公司 Copper foil flaw detection method and device based on characteristic spectrum and electronic equipment
CN114466183B (en) * 2022-02-21 2024-09-24 江东电子材料有限公司 Copper foil flaw detection method and device based on characteristic spectrum and electronic equipment
CN114577811A (en) * 2022-03-01 2022-06-03 上海电机学院 Medicine plate micropore defect detection method based on image sensor
CN116188368A (en) * 2022-12-07 2023-05-30 苏州镁伽科技有限公司 Product defect detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113533372B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
CN113533372A (en) A paper defect detection method, system, device and computer storage medium
US11836967B2 (en) Method and device for small sample defect classification and computing equipment
CN111160301B (en) Tunnel disease target intelligent identification and extraction method based on machine vision
CN112991302B (en) Flexible IC substrate color-changing defect detection method and device based on super-pixels
CN112001902A (en) Defect detection method and related device, equipment and storage medium
CN103582697A (en) Image processing apparatus, image processing method and image processing system
CN111915704A (en) Apple hierarchical identification method based on deep learning
CN116309562B (en) Board defect identification method and system
CN118392891A (en) Chip packaging defect detection method and system based on machine vision
CN110866932A (en) Multi-channel tongue edge detection device and method and storage medium
CN106570855A (en) Method and system for quickly judging pork freshness
KR20220101373A (en) Apparatus and method for detecting defects in pcb based on video
CN114596242A (en) Defect detection method, apparatus, electronic device, and computer-readable storage medium
CN117011216A (en) Defect detection method and device, electronic equipment and storage medium
CN110544235A (en) Flexible circuit board image area identification method based on differential geometry
CN118735915A (en) A paint detection method and detection system based on multi-dimensional visual analysis
CN119048837A (en) A PCB board component defect detection method, system, device and medium
CN102901735A (en) System for carrying out automatic detections upon workpiece defect, cracking, and deformation by using computer
CN117576121A (en) Automatic segmentation method, system, equipment and medium for microscope scanning area
CN111583341B (en) Cloud deck camera shift detection method
CN110298835A (en) A kind of leather surface damage testing method, system and relevant apparatus
CN120707531A (en) A PCB surface defect detection method and system based on improved YOLOv8
CN116678898B (en) A universal wafer defect detection method, system, equipment and medium
CN112926676A (en) False target identification method and device and computer equipment
CN116993654B (en) Camera module defect detection method, device, equipment, storage medium and product

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
GR01 Patent grant
GR01 Patent grant