CN113344865A - Method, device, equipment and medium for detecting surface defects of smooth object - Google Patents

Method, device, equipment and medium for detecting surface defects of smooth object Download PDF

Info

Publication number
CN113344865A
CN113344865A CN202110560706.3A CN202110560706A CN113344865A CN 113344865 A CN113344865 A CN 113344865A CN 202110560706 A CN202110560706 A CN 202110560706A CN 113344865 A CN113344865 A CN 113344865A
Authority
CN
China
Prior art keywords
image
difference
original
pixel
original images
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
CN202110560706.3A
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 Ait Precision Technology Co ltd
Original Assignee
Shenzhen Ait Precision 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 Ait Precision Technology Co ltd filed Critical Shenzhen Ait Precision Technology Co ltd
Priority to CN202110560706.3A priority Critical patent/CN113344865A/en
Publication of CN113344865A publication Critical patent/CN113344865A/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
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2431Multiple classes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • 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/10004Still image; Photographic image
    • 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/20212Image combination
    • G06T2207/20224Image subtraction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Probability & Statistics with Applications (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a method, a device, equipment and a medium for detecting surface defects of a smooth object, wherein the method comprises the steps of collecting two or more original images shot on the surface of a detected object, wherein the original images are obtained under the irradiation of light and shade alternative stripe light sources which have one or more directions relative to the detected object; calculating the image intensity change among the original images, and obtaining a difference image with difference characteristics according to the image intensity change; extracting the brightness change of the pixels of the difference image in a local area, and normalizing the brightness change of the pixels of the difference image to a gray image interval according to the brightness change of the difference image to obtain a shape image; and judging the surface defects of the detected object according to the shape image. By the method and the device, smooth light and shadow changes of the texture on the surface of the detected object can be reconstructed to achieve the purpose of extracting defect characteristics.

Description

Method, device, equipment and medium for detecting surface defects of smooth object
Technical Field
The invention relates to the technical field of automatic detection, in particular to a method, a device and equipment for detecting surface defects of a smooth object.
Background
Defect detection based on machine vision has developed more and more rapidly in recent years, benefiting from various industrial fields on the one hand: such as the Mini/Macro LED in the semiconductor industry, the appearance defect detection of consumer soft package batteries and power batteries in the new energy industry, the metal surface defect detection of precision machining, the defect detection in the screen display industry and the like, all actively promote the continuous iteration and strengthening of the AOI technology; secondly, the cost of the labor market is increased year by year in recent years, the automatic demand of the back-end detection of the product production is more and more strong, and all manufacturers actively promote the automatic process of the back-end defect detection; the automation of defect detection is also an effective means for collecting product defect data and improving the product process.
At present, the mainstream machine vision defect detection utilizes 2D images, and performs defect enhancement through a traditional image processing algorithm to further achieve the purpose of defect extraction, but because the traditional defect detection methods are extremely various, the traditional defect detection means cannot cover all the defect types, single defect imaging can be different, single algorithm parameter setting also frequently causes missing detection, and the common fault of the current 2D defect detection is also caused;
with the popularization of the CNN technology, the technical means of deep learning is more and more widely applied to defect detection, but is also a means with higher cost for labeling data samples and high requirements on hardware performance.
Disclosure of Invention
In view of the above technical problems, the present invention provides a method, an apparatus, a device and a medium for detecting defects on a smooth object surface, so as to provide a technical solution for reconstructing the light and shadow variation of the smooth object surface texture to achieve the purpose of extracting the defect characteristics.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present invention, there is provided a method for detecting surface defects of a smooth object, the method comprising:
acquiring two or more original images shot on the surface of a detected object, wherein the original images are obtained under the irradiation of light and shade alternate stripe light sources which have one or more directions relative to the detected object; calculating the image intensity change among the original images, and obtaining a difference image with difference characteristics according to the image intensity change; extracting the brightness change of the pixels of the difference image in a local area, and normalizing the brightness change of the pixels of the difference image to a gray image interval according to the brightness change of the difference image to obtain a shape image; and judging the surface defects of the detected object according to the shape image.
Further, the original images are obtained under the irradiation of stripe light sources in the longitudinal direction and the transverse direction relative to the direction of the detected object, and at least two original images are obtained under the irradiation of stripe light sources in the longitudinal direction and the transverse direction relative to the direction of the detected object.
Further, the extracting of the image intensity variation between the original images and obtaining a difference image with difference features according to the image intensity variation includes: sequentially arranging a plurality of original images; subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value; and sequencing the difference values according to corresponding positions to obtain difference images.
Further, subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value, including: and taking the pixel coordinate of the Nth original image, wherein N is a positive integer, taking the pixel coordinate of the (N + 1) th original image, and calculating the absolute value of the pixel coordinate of the Nth original image minus the pixel coordinate of the (N + 1) th original image, wherein the absolute value is the difference.
Further, the extracting the brightness variation of the local area of the pixel of the difference image includes: and calculating the brightness change intensity of the pixel local area of the difference image through a statistical method of feature extraction to obtain the brightness change of the pixel local area of the difference image.
Further, after the original image is acquired, the method further includes: extracting a diffusion component and a reflection component of a pixel value of each pixel point of the original image, and respectively obtaining a diffusion image and a reflection image according to the diffusion component and the reflection component; comparing the reflection image of each original image with the diffusion image to respectively obtain a gloss ratio image; and judging the surface defect of the detected object according to the gloss ratio image and the shape image.
Further, after the reflection component is obtained, gain is performed on the reflection component.
According to a second aspect of the present disclosure, there is provided a smooth object surface defect detecting apparatus, comprising: the system comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring two or more original images shot on the surface of a detected object, and the original images are obtained under the irradiation of light and shade alternate stripe light sources which have one or more directions relative to the detected object; the computing module is used for computing the image intensity change among the original images and obtaining a difference image with difference characteristics according to the image intensity change; the statistical module is used for extracting the brightness change of the pixels of the difference image in a local area, and normalizing the pixels to a gray image interval according to the brightness change of the difference image to obtain a shape image; and the judging module is used for judging the surface defects of the detected object according to the shape image.
According to a third aspect of the present disclosure, there is provided a smooth object surface defect detecting apparatus comprising: the device comprises a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when an electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions.
According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium storing a computer program which, when executed by a processor, performs the above-described method of detecting surface defects of a smooth object.
The technical scheme of the disclosure has the following beneficial effects:
according to the method, the device, the equipment and the medium for detecting the surface defects of the smooth object, the original image of the detected object under the irradiation of the stripe light source is collected, the light and shadow change of the smooth surface textures of the detected object is reconstructed, the image brightness change of the local area of the pixels is extracted through a feature extraction algorithm, and a shape image (a shape image) is obtained, so that the image intensity change caused by the surface textures of the defects in a plurality of original images is highlighted, the image intensity change of the defect features in the local area of the image is highlighted, and various defects such as scratches, concave-convex and dark spots on the surface of the detected object are conveniently extracted.
Drawings
FIG. 1 is a schematic flowchart of a method for detecting surface defects of a smooth object according to an embodiment of the present disclosure;
FIG. 2 is an example of a shape diagram of the present invention;
FIG. 3 is an example of the orientation of a defect proposed by the present invention;
fig. 4 is a schematic structural diagram of an acquisition system of a method for detecting surface defects of a smooth object according to an embodiment of the present disclosure;
FIG. 5 is a schematic workflow diagram of a method for detecting surface defects of a smooth object according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a workflow for obtaining a gloss ratio image according to an embodiment of the present disclosure;
FIG. 7 is a schematic structural diagram of a device for detecting surface defects of a smooth object according to the present invention;
FIG. 8 is a schematic diagram of an apparatus for detecting surface defects of a smooth object according to an embodiment of the present disclosure;
fig. 9 is a computer readable storage medium for implementing a method for detecting surface defects of a smooth object in an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices
As shown in fig. 1, an embodiment of the present disclosure provides a method for detecting surface defects of a smooth object, including step S110S140:
In step 110, two or more original images captured on the surface of the detected object are acquired, wherein the original images are obtained under the irradiation of light and shade alternate stripe light sources with one or more directions relative to the detected object.
In the embodiment of the present application, when an original image is captured, in order to generate an obvious shadow change on the surface of an object to be detected in the original image, stripe light sources are required to emit stripe high-frequency flashes from different directions on the surface of the object to be detected, and meanwhile, the stripe light sources are required to be alternately bright and dark, wherein a specific example is that the stripe high-frequency flashes in different directions are different by one-half period. The stripe light source can be a device capable of emitting high-frequency bar flashes in different directions or two devices capable of emitting unidirectional bar flashes, and the stripe light source emits high-frequency bar flashes to the detected object and is shot by the acquisition camera to obtain an original image.
In step 120, image intensity variations between the original images are calculated, and a difference image with difference characteristics is obtained according to the image intensity variations.
In the embodiment of the present application, in order to extract the image intensity variation between original image sequences caused by the defective light and shade features, it is necessary to calculate the image intensity variation between the respective original images, and then synthesize a difference image having a difference feature according to the calculation result.
In step 130, the luminance change of the pixels of the difference image in the local area is extracted, and the luminance change of the difference image is normalized to a gray image interval to obtain a shape image.
In the embodiment of the application, the brightness change of the difference image is represented by a gray scale map to obtain a shape map, so that the defects are more obvious, the contrast is strong, and the application of an image detection algorithm is easier.
In step 140, a surface defect of the object is determined based on the shape image.
After the shape image is obtained, the defect representation of the shape image 200 is obvious and the defect judgment is easy to be carried out as provided by fig. 2. On one hand, the shape image 200 can be output to a display device for judgment of a worker; on the other hand, by the preset value, when the image intensity variation in the set area exceeds the preset value, the detected object with the defect can be judged.
In an alternative embodiment, the original images are obtained under the irradiation of stripe light sources in the longitudinal direction and the transverse direction relative to the direction of the detected object, and at least two original images are obtained under the irradiation of stripe light sources in the longitudinal direction and the transverse direction relative to the direction of the detected object.
In the embodiment of the application, when stripe light sources in the longitudinal direction and the transverse direction are adopted, the shadow change on the original image sequence can be generated only by imaging under the stripes with alternate light and shade in the transverse direction, the shadow change exists in the imaging under the stripe light source in the longitudinal direction for a single original image, but the shadow change cannot be observed from a plurality of original images, so that the shadow can be generated by imaging under the stripe light source in the transverse direction for the defect in the transverse direction, and the shadow change between the original image sequences is very obvious. Likewise, the defects in the longitudinal direction are the same. The transverse defect is a projection of the geometrical size of the defect in the transverse direction, which is far larger than the projection in the longitudinal direction. As shown in FIG. 3, the vertical Direction is denoted as Y-Direction, the horizontal Direction is denoted as X-Direction, and the Defect is denoted as Defect.
Meanwhile, in order to ensure that a certain position on the surface of the object to be detected can generate shadow change, the original images imaged in the longitudinal direction and the transverse direction of the object to be detected are limited to at least two images respectively, and the specific numbers of the images can be four images, six images or any other numbers larger than two.
To further explain the above embodiments, as shown in fig. 4, a schematic diagram of an acquisition system is provided, which is applied to an acquisition scene of an original image, wherein a light source module 41 (i.e. a stripe light source) and an acquisition camera 42 satisfy the reflection principle, that is: the angle between the light source module and the virtual normal direction 44 of the surface of the detected object 43 is equal to the angle between the collection camera and the virtual normal direction 44 of the surface of the detected object. Here, since the object to be detected 43 is an object having a smooth appearance, the installation positions of the light source module 41 and the capturing camera 42 satisfy the reflection principle, that is, it is more favorable for the defect area to generate a shadow. The light source module 41 alternately emits stripe light in the longitudinal direction and the transverse direction, synchronously triggers the acquisition camera 42 to shoot, obtains one original image in the longitudinal direction and the transverse direction respectively, then the detected object 43 moves along the fixed direction, which can be the transverse direction, the light source module 41 further alternately emits stripe light in the longitudinal direction and the transverse direction, then triggers the acquisition camera 42 to shoot synchronously, obtains one original image in the longitudinal direction and the transverse direction respectively, and so on, limits the original images imaged in the longitudinal direction and the transverse direction of the detected object 43 to at least two images respectively. The original image obtained by the acquisition system meets the requirement of obvious shadow change on the surface of the detected object, so that a more ideal shadow change effect can be obtained after the difference is solved, and the defect detection of the detected object is easier.
In an alternative embodiment, as shown in fig. 5, in step S510, four original images in one direction are set, which are respectively denoted by X1, X2, X3 and X4, the image intensity variation between the original images in the same direction is extracted, and a difference image with difference features is obtained according to the image intensity variation, including: sequentially arranging a plurality of original images; subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value; in step S520, the difference values are sorted according to the corresponding positions to obtain difference images.
In this embodiment of the application, the difference is performed on the original image obtained in step S110, specifically, the difference is performed between two adjacent original images in the original image sequence to highlight the change of the shadow between the original images, because the positions of the stripe light sources when the original images are collected are different, the shadows of the stripe light sources on the defects of the detected object are also different, and after the difference is performed between two adjacent original images in the original image sequence, the change of the shadow between the original images can be highlighted.
In an alternative embodiment, with continuing reference to fig. 5, in step S520, subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value includes: and taking the pixel coordinate of the Nth original image, wherein N is a positive integer, taking the pixel coordinate of the (N + 1) th original image, and calculating the absolute value of the pixel coordinate of the Nth original image minus the pixel coordinate of the (N + 1) th original image, wherein the absolute value is the difference.
In the embodiment of the present application, a formula for performing difference calculation on an original image may be:
Sub(x,y)=|x1(x,y)-x2(x,y)|
or, Sub (x, y) ═ x1(x, y) -x2(x, y)
Where (x, y) are pixel coordinates.
Of course, the formula for calculating the difference of the original image may also include more, which is not limited by the present disclosure
In an alternative embodiment, with continuing reference to fig. 5, in step S530, the extracting the brightness variation of the local area of the pixel of the difference image includes: and calculating the brightness change intensity of the pixel local area of the difference image through a statistical method of feature extraction to obtain the brightness change of the pixel local area of the difference image. Then, in step S550, all the luminance changes are normalized to the gray scale image, and in step S560, a shape image is obtained.
In the embodiment of the application, the image brightness change of the pixel local area is extracted from all the difference images, the brightness change intensity of the pixel local area of the difference images is calculated through a statistical method of feature extraction, specifically, the brightness change variance in the neighborhood ROI of a single pixel can be set through an extraction Featuresize parameter, and then the brightness change variance is normalized to a gray image interval to obtain different shape images; thus, the image intensity variation caused by the surface texture of the defect in the original image sequence is highlighted, and the image intensity variation of the defect characteristic in the local image is highlighted, so that the fine surface texture defect can be extracted.
In an alternative embodiment, as shown in fig. 6, after the original image is acquired, the method further includes steps S610 to S640:
in step S610, the diffusion component and the reflection component of the pixel value of the pixel point of each original image are extracted. The reflection component is dominant due to the polarized slippery surface. According to the illumination theory, the image brightness which forms a symmetrical included angle with the incident light has a peak value which can be approximately regarded as a reflection component, and other diffused light rays which are weaker can be approximately regarded as a diffusion component, so that the dark channels and the bright channels of all pixel points in the longitudinal direction or the transverse direction can be respectively taken to obtain the pixel intensity values of the diffusion component and the reflection component. Specifically, for x1, x2, x3, and x4 representing different original images, the formula for finding the dark channel of a single pixel may be:
diffuse (x, y) ═ min (x1(x, y), x2(x, y), x3(x, y), x4(x, y)), where (x, y) is the pixel coordinate.
The formula for calculating the reflected component may be:
specular (x, y) ═ max (x1(x, y), x2(x, y), x3(x, y), x4(x, y)), where (x, y) are pixel coordinates.
In an alternative embodiment, the reflection component is taken from a brighter pixel value of each pixel, but due to the existence of defects, the brightness of some pixels has a weak mode, so that gain processing needs to be performed on the brightness image, the engineering practical requirements are met, and meanwhile, the robustness of defect detection is improved. The specific gain formula may be:
the ratio of specific (x, y) to specific (x, y) + specific (x, y)/gain _ coef, wherein/gain _ coef is the gain factor.
In step S620, a diffusion image and a reflection image are obtained from the diffusion component and the reflection component, respectively. By collecting the above-obtained diffusion component and reflection component, a diffusion image and a reflection image can be obtained, respectively.
In step S630, the reflection image of each original image is compared with the diffusion image to obtain a gloss ratio image, respectively. So as to highlight the dark dust and other related defects on the surface of the object to be measured.
In step S640, the surface defect of the object is determined based on the gloss ratio image and the shape image.
In the embodiment of the application, the image of the gloss ratio image and the image of the shape image are combined, so that dark dust and fine surface texture defects on the surface of the object to be detected can be detected.
In an alternative embodiment, as shown in fig. 6, the apparatus for detecting surface defects of a smooth object comprises: the acquisition module 710 is used for acquiring two or more original images shot on the surface of the detected object, wherein the original images are obtained under the irradiation of light and shade alternate stripe light sources which have one or more directions relative to the detected object; a calculating module 720, configured to calculate an image intensity change between the original images, and obtain a difference image with difference characteristics according to the image intensity change; the statistical module 730 is configured to extract the brightness change of the pixels of the difference image in the local area, and normalize the brightness change to a grayscale image interval according to the brightness change of the difference image to obtain a shape image; the judging module 740 judges the surface defect of the object to be detected according to the shape image.
The embodiment of the specification provides a smooth object surface defect detection device, which reconstructs the light and shadow change of smooth detected object surface texture by acquiring an original image of a detected object under the irradiation of a stripe light source, extracts the image brightness change of a pixel local area through a feature extraction algorithm to obtain a shape image (shape image), highlights the image intensity change caused by the surface texture of defects in a plurality of original images, highlights the image intensity change of defect features in the image local area, and is convenient for extracting various defects such as scratches, unevenness, darkness and the like on the detected object surface.
The specific details of each module/unit in the above-mentioned apparatus have been described in detail in the method section, and the details that are not disclosed may refer to the contents of the method section, and thus are not described again.
Based on the same idea, the embodiment of the present specification further provides a device for detecting surface defects of a smooth object, as shown in fig. 7.
The surface defect detecting device for the smooth object can be the terminal device or the server provided by the above embodiments.
The apparatus for detecting surface defects of a smooth object may have a relatively large difference due to different configurations or performances, and may include one or more processors 801 and a memory 802, and one or more stored applications or data may be stored in the memory 802. Memory 802 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM) and/or a cache memory unit, among others, and may further include a read-only memory unit. The application programs stored in memory 802 may include one or more program modules (not shown), including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment. Still further, the processor 801 may be configured to communicate with the memory 802 to execute a series of computer-executable instructions in the memory 802 on a smooth object surface defect detection device. The recoverable face image privacy preserving device can also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more I/O interfaces (input output interfaces) 805, one or more external devices 806 (e.g., keyboard, pointing device, bluetooth device, etc.), can also communicate with one or more devices that enable a user to interact with the device, and/or communicate with any device (e.g., router, modem, etc.) that enables the device to communicate with one or more other computing devices. Such communication may occur via I/O interface 805. Also, the device may communicate with one or more networks (e.g., a Local Area Network (LAN)) via a wired or wireless interface 704.
In particular, in this embodiment, the apparatus for detecting surface defects of a smooth object includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the apparatus for protecting privacy of recoverable face images, and the one or more programs configured to be executed by one or more processors include computer-executable instructions for:
acquiring two or more original images shot on the surface of a detected object, wherein the original images are obtained under the irradiation of light and shade alternate stripe light sources which have one or more directions relative to the detected object; calculating the image intensity change among the original images, and obtaining a difference image with difference characteristics according to the image intensity change; extracting the brightness change of the pixels of the difference image in a local area, and normalizing the brightness change of the pixels of the difference image to a gray image interval according to the brightness change of the difference image to obtain a shape image; and judging the surface defects of the detected object according to the shape image.
The original images are obtained under the irradiation of stripe light sources which are longitudinal and transverse relative to the direction of the detected object, and at least two original images are obtained under the irradiation of stripe light sources which are longitudinal and transverse relative to the direction of the detected object.
The extracting of the image intensity variation among the original images and obtaining of the difference image with the difference feature according to the image intensity variation include: sequentially arranging a plurality of original images; subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value; and sequencing the difference values according to corresponding positions to obtain difference images.
Subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value, wherein the difference value comprises: and taking the pixel coordinate of the Nth original image, wherein N is a positive integer, taking the pixel coordinate of the (N + 1) th original image, and calculating the absolute value of the pixel coordinate of the Nth original image minus the pixel coordinate of the (N + 1) th original image, wherein the absolute value is the difference.
The extracting of the brightness variation of the local area of the pixels of the difference image includes: and calculating the brightness change intensity of the pixel local area of the difference image through a statistical method of feature extraction to obtain the brightness change of the pixel local area of the difference image.
After the original image is acquired, the method further comprises the following steps: extracting a diffusion component and a reflection component of a pixel value of each pixel point of the original image, and respectively obtaining a diffusion image and a reflection image according to the diffusion component and the reflection component; comparing the reflection image of each original image with the diffusion image to respectively obtain a gloss ratio image; and judging the surface defect of the detected object according to the gloss ratio image and the shape image.
And after the reflection component is obtained, gain is carried out on the reflection component.
Based on the same idea, the exemplary embodiments of the present disclosure also provide a computer-readable storage medium on which a program product capable of implementing the above-described method of the present specification is stored. In some possible embodiments, various aspects of the disclosure may also be implemented in the form of a program product comprising program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned "exemplary methods" section of this specification, when the program product is run on the terminal device.
Referring to fig. 8, a program product 900 for implementing the above method according to an exemplary embodiment of the present disclosure is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the exemplary embodiments of the present disclosure.
Furthermore, the above-described figures are merely schematic illustrations of processes included in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, according to exemplary embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A method for detecting surface defects of a smooth object, the method comprising:
acquiring two or more original images shot on the surface of a detected object, wherein the original images are obtained under the irradiation of light and shade alternate stripe light sources which have one or more directions relative to the detected object;
calculating the image intensity change among the original images, and obtaining a difference image with difference characteristics according to the image intensity change;
extracting the brightness change of the pixels of the difference image in a local area, obtaining a shape image according to the brightness change of the difference image, and normalizing the shape image to a gray image interval;
and judging the surface defects of the detected object according to the shape image.
2. The method of claim 1, wherein the raw images are obtained under illumination of stripe light sources in longitudinal and transverse directions with respect to the object to be inspected, and at least two raw images are obtained under illumination of stripe light sources in longitudinal and transverse directions with respect to the object to be inspected.
3. The method for detecting the surface defects of the smooth object according to claim 1, wherein the extracting the image intensity variation among the original images and obtaining the difference image with the difference features according to the image intensity variation comprises:
sequentially arranging a plurality of original images;
subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value;
and sequencing the difference values according to corresponding positions to obtain difference images.
4. The method for detecting surface defects of a smooth object according to claim 3, wherein subtracting pixel values of corresponding pixel positions between two adjacent original images to obtain a difference value comprises:
and taking the pixel coordinate of the Nth original image, wherein N is a positive integer, taking the pixel coordinate of the (N + 1) th original image, and calculating the absolute value of the pixel coordinate of the Nth original image minus the pixel coordinate of the (N + 1) th original image, wherein the absolute value is the difference.
5. The method for detecting the surface defect of the smooth object according to claim 1, wherein the extracting the brightness variation of the pixel local area of the difference image comprises: and calculating the brightness change intensity of the pixel local area of the difference image through a statistical method of feature extraction to obtain the brightness change of the pixel local area of the difference image.
6. The method for detecting surface defects of a smooth object according to claim 1, further comprising, after acquiring the original image:
extracting a diffusion component and a reflection component of a pixel value of each pixel point of the original image, and respectively obtaining a diffusion image and a reflection image according to the diffusion component and the reflection component;
comparing the reflection image of each original image with the diffusion image to respectively obtain a gloss ratio image;
and judging the surface defect of the detected object according to the gloss ratio image and the shape image.
7. The method of claim 6, wherein the gain is applied to the reflection component after the reflection component is obtained.
8. A device for detecting surface defects of a smooth object, comprising:
the system comprises an acquisition module, a detection module and a control module, wherein the acquisition module is used for acquiring two or more original images shot on the surface of a detected object, and the original images are obtained under the irradiation of light and shade alternate stripe light sources which have one or more directions relative to the detected object;
the computing module is used for computing the image intensity change among the original images and obtaining a difference image with difference characteristics according to the image intensity change;
the statistical module is used for extracting the brightness change of the pixels of the difference image in a local area, and normalizing the pixels to a gray image interval according to the brightness change of the difference image to obtain a shape image;
and the judging module is used for judging the surface defects of the detected object according to the shape image.
9. A smooth object surface defect detection apparatus, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when an electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the steps of the method for detecting the surface defects of the smooth object according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the method for detecting surface defects of a smooth object according to any one of claims 1 to 7.
CN202110560706.3A 2021-05-21 2021-05-21 Method, device, equipment and medium for detecting surface defects of smooth object Pending CN113344865A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110560706.3A CN113344865A (en) 2021-05-21 2021-05-21 Method, device, equipment and medium for detecting surface defects of smooth object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110560706.3A CN113344865A (en) 2021-05-21 2021-05-21 Method, device, equipment and medium for detecting surface defects of smooth object

Publications (1)

Publication Number Publication Date
CN113344865A true CN113344865A (en) 2021-09-03

Family

ID=77470778

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110560706.3A Pending CN113344865A (en) 2021-05-21 2021-05-21 Method, device, equipment and medium for detecting surface defects of smooth object

Country Status (1)

Country Link
CN (1) CN113344865A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114937041A (en) * 2022-07-25 2022-08-23 聊城市博源节能科技有限公司 Method and system for detecting defects of copper bush of oil way of automobile engine
CN116559179A (en) * 2023-07-06 2023-08-08 海伯森技术(深圳)有限公司 Reflective surface morphology and defect detection method and system thereof
CN116930195A (en) * 2023-09-18 2023-10-24 深圳市恒鑫通智能精密科技有限公司 Intelligent CAM system for hardware processing and surface defect detection method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114937041A (en) * 2022-07-25 2022-08-23 聊城市博源节能科技有限公司 Method and system for detecting defects of copper bush of oil way of automobile engine
CN116559179A (en) * 2023-07-06 2023-08-08 海伯森技术(深圳)有限公司 Reflective surface morphology and defect detection method and system thereof
CN116559179B (en) * 2023-07-06 2023-09-12 海伯森技术(深圳)有限公司 Reflective surface morphology and defect detection method and system thereof
CN116930195A (en) * 2023-09-18 2023-10-24 深圳市恒鑫通智能精密科技有限公司 Intelligent CAM system for hardware processing and surface defect detection method and device
CN116930195B (en) * 2023-09-18 2023-11-17 深圳市恒鑫通智能精密科技有限公司 Intelligent CAM system for hardware processing and surface defect detection method and device

Similar Documents

Publication Publication Date Title
CN113344865A (en) Method, device, equipment and medium for detecting surface defects of smooth object
US9008457B2 (en) Systems and methods for illumination correction of an image
JP4154447B2 (en) Image processing method, image processing system, and image processing program
TWI238366B (en) Image processing method for appearance inspection
US10930059B2 (en) Method and apparatus for processing virtual object lighting inserted into a 3D real scene
JP4309927B2 (en) Eyelid detection device and program
CN102479321B (en) Difference image automatic recognition system and method
CN116503388B (en) Defect detection method, device and storage medium
CN114897847A (en) Image processing method and device, computer readable storage medium and electronic device
KR20190073247A (en) System and method for white spot mura detection with improved preprocessing
CN105741244A (en) Method for removing shadows and halos under weak light through indoor polling robot
CN115908988A (en) Defect detection model generation method, device, equipment and storage medium
CN116818785B (en) Defect detection method, system and medium based on machine vision
CN112288726B (en) Method for detecting foreign matters on belt surface of underground belt conveyor
CN110766675B (en) Solar cell panel defect detection method
CN109612408B (en) Method and device for testing emission angle of semiconductor laser and readable storage medium
CN110930393A (en) Chip material pipe counting method, device and system based on machine vision
Jiale et al. Automatic identification method of pointer meter under complex environment
CN115909359A (en) Capacitance character detection method based on intelligent vision
CN115184362A (en) Rapid defect detection method based on structured light projection
CN114926774A (en) Method and device for identifying photovoltaic module fire based on video image
CN109671075B (en) Defect detection method, device, equipment and storage medium
CN111899181A (en) Method and device for removing shadow in image
Ge et al. An optimized design of the pointer meter image enhancement and automatic reading system in low illumination environment
Ye et al. A real time detection method for abnormal strapping of steel coil based on CCD active imaging

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