Highlight processing method, device, equipment and readable storage medium

By acquiring the spectrum image differences of the image, using Fourier transform and low-pass filtering technology to process the highlight area, the problem of excessive contrast between objects in the high-gloss material is solved, and more accurate defect detection is achieved.

CN115801972BActive Publication Date: 2025-08-15GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211203808.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-29
Publication Date
2025-08-15
Estimated Expiration
2042-09-29

AI Technical Summary

Technical Problem

Objects made of high-gloss materials cause strong contrast between the highlighted areas in the image and other areas in the defect detection, affecting the defect detection results and leading to the generation of defective products.

Method used

By acquiring the spectral image differences of the image, removing the highlight region, and processing the image using Fourier transform and low-pass filtering technology, reducing the highlight noise and improving the processing accuracy of the image.

Benefits of technology

Effectively remove highlight areas, improve the accuracy of defect detection, and ensure the quality and consistency of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115801972B_ABST
    Figure CN115801972B_ABST
Patent Text Reader

Abstract

The present disclosure provides a highlight processing method, apparatus, device and readable storage medium, the highlight processing method including: acquiring a first image, wherein the first image contains a highlight area; based on the first image, acquiring a second image and a first spectrum image of the first image, wherein the second image is a highlight noise image of the first image; based on the second image, acquiring a second spectrum image of the second image; and obtaining a third image based on the image difference between the first spectrum image and the second spectrum image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of image processing technology, and more specifically, to a highlight processing method, device, apparatus, and readable storage medium. Background Art

[0002] Image processing is often used for defect detection. However, since high-gloss materials are one of the common materials used in manufacturing, and objects made of high-gloss materials have smooth surfaces, there will be high-gloss areas in the images actually obtained for defect detection. The high-gloss areas form a strong contrast with other areas, which affects the defect detection results and leads to the production of defective products. Summary of the Invention

[0003] An object of the embodiments of the present disclosure is to provide a method for processing highlights.

[0004] According to a first aspect of an embodiment of the present disclosure, a highlight processing method is provided, the method comprising:

[0005] Acquire a first image, where the first image includes a highlight area;

[0006] acquiring, based on the first image, a second image of the first image and a first spectrum image, wherein the second image is a high-light noise image of the first image;

[0007] acquiring a second spectrum image of the second image according to the second image;

[0008] A third image is obtained according to an image difference between the first spectrum image and the second spectrum image.

[0009] Optionally, after obtaining the third image, the method further includes:

[0010] Acquire a fourth image, where the fourth image has the same defect detection scene as the first image, and the defect detection scene includes a light source position and a background environment;

[0011] acquiring, according to the fourth image, a fifth image and a fourth spectrum image of the fourth image, wherein the fifth image is a highlight noise image of the fourth image;

[0012] acquiring a fifth spectrum image of the fifth image according to the fifth image;

[0013] obtaining a first spectrum difference image according to an image difference between the fourth spectrum image and the fifth spectrum image;

[0014] obtaining a second spectrum difference image according to an image difference between the first spectrum image and the second spectrum image;

[0015] A sixth image is obtained according to the image difference between the first spectrum difference image and the second spectrum difference image.

[0016] Optionally, before acquiring the first image, the method further includes:

[0017] Acquire multiple images to be inspected of multiple target areas in the same defect inspection scenario;

[0018] Perform consistency judgment on several images to be detected;

[0019] According to the consistency judgment result, the first image is selected from a plurality of images to be detected.

[0020] Optionally, selecting the first image from a plurality of images to be detected according to the consistency judgment result includes:

[0021] When the consistency judgment result is high consistency, any image to be detected that does not contain defect noise is selected from the plurality of images to be detected as the first image;

[0022] When the consistency judgment result is low consistency, any image to be detected containing defect noise is selected from a plurality of images to be detected, and the defect noise is extracted as the first image.

[0023] Optionally, acquiring a plurality of images to be inspected of a plurality of target areas in the same defect inspection scene includes:

[0024] Setting a defect detection scene, wherein the defect detection scene includes a light source position and a background environment;

[0025] The images of several target areas in the defect detection scene are captured at the same angle to obtain several images to be detected.

[0026] Optionally, acquiring a second image of the first image includes:

[0027] Perform low-pass filtering on the first image to obtain the second image.

[0028] According to a second aspect of an embodiment of the present disclosure, a highlight processing device is provided, the device comprising:

[0029] A first acquisition module is used to acquire a first image, wherein the first image includes a highlight area;

[0030] a first processing module, configured to obtain, based on the first image, a second image and a first spectrum image of the first image, wherein the second image is a high-light noise image of the first image;

[0031] a second processing module, configured to obtain a second spectrum image of the second image based on the second image;

[0032] The third processing module is configured to obtain a third image according to an image difference between the first spectrum image and the second spectrum image.

[0033] Optionally, the device further includes:

[0034] A second acquisition module is used to acquire a fourth image, wherein the fourth image has the same defect detection scene as the first image, and the defect detection scene includes a light source position and a background environment;

[0035] a fourth processing module, configured to obtain, based on the fourth image, a fifth image and a fourth spectrum image of the fourth image, wherein the fifth image is a highlight noise image of the fourth image;

[0036] a fifth processing module, configured to obtain a fifth spectrum image of the fifth image based on the fifth image;

[0037] a sixth processing module, configured to obtain a first spectrum difference image according to an image difference between the fourth spectrum image and the fifth spectrum image;

[0038] a seventh processing module, configured to obtain a second spectrum difference image according to an image difference between the first spectrum image and the second spectrum image;

[0039] An eighth processing module is configured to obtain a sixth image according to an image difference between the first spectrum difference image and the second spectrum difference image.

[0040] According to a third aspect of an embodiment of the present disclosure, a highlight processing device is provided, the device comprising:

[0041] Memory for storing executable computer instructions;

[0042] A processor is used to execute the highlight processing method according to the first aspect described above under the control of the executable computer instructions.

[0043] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the highlight processing method described in the first aspect above is executed.

[0044] One beneficial effect of the embodiments of the present disclosure is that image processing is performed on a first image to obtain a denoised image of the first image, and based on the spectral difference between the first image and the denoised image, the highlight area in the first image is removed, so that during defect detection or other image processing, the highlight area existing in the first image can be removed, thereby improving the accuracy of processing the first image.

[0045] Other features and advantages of the present specification will become apparent from the following detailed description of exemplary embodiments of the present specification with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and, together with the description, serve to explain the principles of the specification.

[0047] Figure 1 is a flowchart of a highlight processing method according to an embodiment of the present disclosure;

[0048] Figure 2 is a flowchart of a highlight processing method according to another embodiment of the present disclosure;

[0049] Figure 3 is a principle block diagram of a highlight processing device according to an embodiment of the present disclosure;

[0050] Figure 4 It is a principle block diagram of a highlight processing device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0051] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the embodiments of the present disclosure.

[0052] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0053] Technologies, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such technologies, methods, and equipment should be considered part of the specification.

[0054] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0055] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0056] <Method Example>

[0057] Figure 1 A highlight processing method according to an embodiment of the present disclosure is shown. Figure 1As shown, the highlight processing method of this embodiment may include the following steps S101 to S104:

[0058] S101: Acquire a first image, where the first image includes a highlight area.

[0059] Highlights are the areas where an object's surface completely reflects light from a light source, creating a strong contrast effect in the image. Therefore, images with these highlights cannot be accurately processed to obtain their image information. Highlights, on the other hand, are the brightest point in the image, representing the portion of the object that directly reflects the light source. They are often seen on smooth objects. In actual manufacturing, smooth materials are a common choice, making the appearance of highlight images unavoidable during product inspection.

[0060] In this embodiment, a light source and a collection system are pre-built, and the first image can be obtained by using an image collection device.

[0061] S102 : Acquire a second image and a first spectrum image of the first image according to the first image, where the second image is a highlight noise image of the first image.

[0062] In one example, the second image is obtained by performing low-pass filtering on the first image, that is, noise other than highlight noise in the first image is removed by low-pass filtering, thereby obtaining the second image.

[0063] In one example, a first spectrum image of the first image is obtained by performing Fourier transform on the first image.

[0064] Among them, the frequency of the first image is an indicator that characterizes the intensity of the grayscale changes in the first image, and is the gradient of the grayscale in the plane space. The area where the grayscale changes slowly has a very low corresponding frequency value; the area where the grayscale changes drastically has a higher corresponding frequency value. Fourier transform has a very obvious physical meaning in practice. If f is an analog signal with finite energy, then its Fourier transform represents the spectrum of f. From a purely mathematical point of view, the Fourier transform is to convert a function into a series of periodic functions for processing. From a physical effect point of view, the Fourier transform is to convert the image from the spatial domain to the frequency domain, and its inverse transform is to convert the image from the frequency domain to the spatial domain. In other words, the physical meaning of the Fourier transform is to transform the grayscale distribution function of the image into the frequency distribution function of the image, and the inverse Fourier transform is to transform the frequency distribution function of the image into the grayscale distribution function.

[0065] S103: Acquire a second spectrum image of the second image according to the second image.

[0066] In one example, a second spectrum image of the second image is obtained by performing Fourier transform on the second image.

[0067] S104: Obtain a third image according to an image difference between the first spectrum image and the second spectrum image.

[0068] The highlight processing method of the disclosed embodiment relates to de-highlighting image processing and defect detection processing in the defect detection process of a highlight surface. The highlight processing method obtains a spectrum with highlight information removed by subtracting the spectrum of the highlight noise signal from the spectrum of the image with the highlight noise signal, and then performs an inverse Fourier transform to obtain a de-highlighting image.

[0069] In one embodiment, image processing is performed using the original data collected by the camera to obtain a blurred highlight noise image (i.e., a first image). Using the highlight processing method mentioned in this embodiment, the first image is Fourier transformed to obtain a first spectrum image of the first image. The first image is low-pass filtered to obtain the second image, and a second spectrum image of the second image is obtained by Fourier transform. The result of subtracting the second spectrum image from the first spectrum image is then used to perform an inverse Fourier transform to obtain a de-highlighted image with or without defects.

[0070] In one example, before acquiring the first image, the method further includes:

[0071] S1001, obtaining multiple images to be inspected of multiple target areas in the same defect inspection scenario, specifically including:

[0072] S1001-1, setting a defect detection scene, wherein the defect detection scene includes a light source position and a background environment.

[0073] Setting up a defect detection scenario involves setting the number and position of light sources in the light source and acquisition system, as well as the spacing and angle between the image acquisition device and the acquisition area, all while pre-setting the light source and acquisition system. The light source and acquisition system includes a light source generation module for generating light directed toward the target area; a first adjustment module for adjusting the direction of light emission from the light source generation module; an image acquisition module for capturing images of the target area; and a second adjustment module for adjusting the spacing and angle between the image acquisition module and the target area.

[0074] S1001-2, performing image acquisition at the same angle on several target areas in the defect detection scene to obtain several images to be detected.

[0075] After the defect detection scene is set, images of several target areas (or products) that appear in sequence are collected to obtain images of multiple target areas (or products) to be detected.

[0076] In this embodiment, the same defect detection scene includes the same light source position and the same background environment. Several target areas can be same-angle images of the same product. The light source and acquisition system are pre-built, and an image acquisition device is used to obtain several images to be inspected of several products.

[0077] S1002: Perform consistency judgment on a plurality of images to be detected.

[0078] S1003, selecting the first image from a plurality of images to be detected based on the consistency determination result, specifically including:

[0079] S1003-1, when the consistency judgment result is high consistency, selecting any image to be detected that does not contain defect noise from the plurality of images to be detected as the first image;

[0080] S1003-2: When the consistency judgment result is low consistency, any image to be detected containing defect noise is selected from a plurality of images to be detected, and the defect noise is extracted as the first image.

[0081] In this embodiment, consistency determination refers to performing a consistency check on any two images from a number of images to be inspected in the same defect inspection scene. A 3D point is selected from the images to be inspected and projected onto the image based on the camera's internal and external parameters. Two small square patches are then extracted with the projected point as the center. If the scenes contained in the images to be inspected are relatively similar, the result is considered highly consistent. Otherwise, the result is considered low consistency.

[0082] Figure 2 The highlight processing method of an embodiment of the present disclosure is shown as follows. Figure 2 As shown, the highlight processing method of this embodiment may include the following steps S201 to S206:

[0083] In one embodiment of the present application, after obtaining the third image by the highlight processing method, the method further includes:

[0084] S201 , acquiring a fourth image, wherein the fourth image has the same defect detection scene as the first image, and the defect detection scene includes a light source position and a background environment.

[0085] In this embodiment, after being processed by the above-mentioned highlight processing method, the third image obtained is the highlight-removed image of the first image. The third image is used as the standard image in the defect detection process to ensure that the subsequent defect detection process is not affected by highlight noise. After obtaining the standard image in the defect detection process, a fourth image of the same defect detection scene as the standard image is collected, wherein the defect detection scene includes a product defect detection scene. By placing several products consistent with the products included in the standard image in the same defect detection scene while keeping the light source position and background environment consistent, several fourth images are obtained.

[0086] In this embodiment, a light source and acquisition system are pre-installed, and the fourth image can be acquired using an image acquisition device. When the highlight processing method provided in this embodiment is applied to a defect detection scenario, the first image is an image that does not contain defect noise, and the third image obtained after highlight processing is a standard image that contains neither defect noise nor highlight noise. The fourth image obtained in this embodiment is the defect image to be detected, and the defect detection result is obtained by comparing the defect with the standard image (i.e., the third image).

[0087] S202 : Acquire a fifth image and a fourth spectrum image of the fourth image according to the fourth image, where the fifth image is a highlight noise image of the fourth image.

[0088] In one example of this embodiment, the fifth image is obtained by low-pass filtering the fourth image. Specifically, the fifth image is obtained by removing all noise except for highlight noise from the fourth image through low-pass filtering. In other words, the fourth image to be inspected for defects is filtered out of all other noise, retaining only the highlight noise.

[0089] In one example, a fourth spectrum image of the fourth image is obtained by performing Fourier transform on the fourth image.

[0090] S203: Acquire a fifth spectrum image of the fifth image according to the fifth image.

[0091] In this embodiment, Fourier transform is performed on the fifth image obtained in step S202 to obtain a fifth spectrum image of the fifth image.

[0092] S204 : Obtain a first spectrum difference image according to an image difference between the fourth spectrum image and the fifth spectrum image.

[0093] This embodiment involves de-highlighting image processing in a defect detection process involving a highlight surface. The highlight processing method obtains a spectrum with highlight information removed by subtracting the spectrum of a highlight noise signal from the spectrum of an image with a highlight noise signal, and then performs an inverse Fourier transform to obtain a de-highlighting image, i.e., obtains a first spectrum difference image.

[0094] In one embodiment, image processing is performed using the original data collected by the camera to obtain a blurred highlight noise image (i.e., the fourth image). Using the highlight processing method mentioned in this embodiment, the fourth image is Fourier transformed to obtain a fourth spectrum image of the fourth image. The fourth image is low-pass filtered to obtain the fifth image, and a fifth spectrum image of the fifth image is obtained by Fourier transform. The result of subtracting the fifth spectrum image from the fourth spectrum image is then used to perform an inverse Fourier transform to obtain a defective or defect-free highlight-removed image, i.e., a first spectrum difference image is obtained.

[0095] S205 : Obtain a second spectrum difference image according to the image difference between the first spectrum image and the second spectrum image.

[0096] In this embodiment, the second spectrum difference image obtained according to the image difference between the first spectrum image and the second spectrum image is the spectrum image of the third image, that is, the second spectrum difference image is a spectrum image of the standard image with highlight noise removed.

[0097] S206 : Obtain a defect detection result according to the image difference between the first spectrum difference image and the second spectrum difference image.

[0098] In one example, during the defect detection process, it is prioritized to determine whether a standard image for defect detection, i.e., the third image, exists. If so, any image to be detected without defect noise is selected as the standard image. If not, a method for obtaining the standard image is as shown in Formula 1:

[0099] E=G(I) (1)

[0100] Where E represents the standard image, G represents the Gaussian filter, and I represents the defect image. The standard image for highlight image spectrum subtraction processing is obtained through Gaussian filtering.

[0101] Perform Fourier transform on the standard image E and defect image I obtained above to obtain:

[0102] I1=FFTI (2)

[0103] E1=FFTE (3)

[0104] D=I1-E1 (4)

[0105] I2=IFFTD (5)

[0106] Among them, FFT represents Fourier transform, IFFT represents inverse Fourier transform, D represents the image difference between the spectrum of the defect image and the spectrum of the standard image, and I2 represents the defect detection result obtained based on the image difference.

[0107] In this embodiment, the first spectral difference image is a spectral image of the defect image to be inspected with highlights removed, and the second spectral difference image is a spectral image of the standard image with highlights removed. Defect detection is performed by subtracting the spectral image of the second spectral difference image from the spectral image of the first spectral difference image to obtain a defect detection result. Then, through methods such as exponential transformation and histogram equalization, a high-contrast curve image reflecting the defect detection result is obtained.

[0108] According to an embodiment of the present disclosure, image processing is performed on a first image to obtain a denoised image of the first image. Based on the spectral difference between the first image and the denoised image, the highlight area in the first image is removed. This allows the highlight area in the first image to be removed during defect detection or other image processing, thereby improving the accuracy of processing the first image.

[0109] <Device Example>

[0110] Figure 3 FIG. 1 is a schematic structural diagram of a highlight processing device according to an embodiment. Figure 3 As shown, the highlight processing device 300 includes a first acquisition module 310 , a first processing module 320 , a second processing module 330 , and a third processing module 340 .

[0111] A first acquisition module 310 is configured to acquire a first image, wherein the first image includes a highlight area;

[0112] A first processing module 320 is configured to obtain, based on the first image, a second image of the first image and a first spectrum image, where the second image is a high-light noise image of the first image;

[0113] A second processing module 330 is configured to obtain a second spectrum image of the second image based on the second image;

[0114] The third processing module 340 is configured to obtain a third image according to the image difference between the first spectrum image and the second spectrum image.

[0115] In one embodiment, the highlight processing device 300 further includes (not shown in the figure):

[0116] A second acquisition module is used to acquire a fourth image, wherein the fourth image has the same defect detection scene as the first image, and the defect detection scene includes a light source position and a background environment;

[0117] a fourth processing module, configured to obtain, based on the fourth image, a fifth image and a fourth spectrum image of the fourth image, wherein the fifth image is a highlight noise image of the fourth image;

[0118] a fifth processing module, configured to obtain a fifth spectrum image of the fifth image based on the fifth image;

[0119] a sixth processing module, configured to obtain a first spectrum difference image according to an image difference between the fourth spectrum image and the fifth spectrum image;

[0120] a seventh processing module, configured to obtain a second spectrum difference image according to an image difference between the first spectrum image and the second spectrum image;

[0121] An eighth processing module is configured to obtain a sixth image according to an image difference between the first spectrum difference image and the second spectrum difference image.

[0122] In one embodiment, the highlight processing device 300 further includes (not shown in the figure):

[0123] The third acquisition module is used to acquire a plurality of images to be inspected of a plurality of target areas in the same defect inspection scene;

[0124] A judgment module, used for performing consistency judgment on a number of images to be detected;

[0125] The selection module is used to select the first image from a plurality of images to be detected according to the consistency judgment result.

[0126] In one embodiment, the selection module further includes (not shown in the figure):

[0127] A first selection module is configured to select, when the consistency judgment result is high consistency, any image to be detected that does not contain defect noise from the plurality of images to be detected as the first image;

[0128] The second selection module is used to select any image to be detected containing defect noise from a plurality of images to be detected when the consistency judgment result is low consistency, and extract the defect noise as the first image.

[0129] In one embodiment, the highlight processing device 300 further includes (not shown in the figure):

[0130] A setting module, used to set a defect detection scene, wherein the defect detection scene includes a light source position and a background environment;

[0131] The acquisition module is used to acquire images of several target areas in the defect detection scene at the same angle to obtain several images to be detected.

[0132] In one embodiment, the highlight processing device 300 further includes (not shown in the figure):

[0133] A filtering module is used to perform low-pass filtering on the first image to obtain the second image.

[0134] According to an embodiment of the present disclosure, image processing is performed on a first image to obtain a denoised image of the first image, and based on the spectral difference between the first image and the denoised image, the highlight area in the first image is removed, so that during defect detection or other image processing, the highlight area existing in the first image can be removed, thereby improving the accuracy of processing the first image.

[0135] <Equipment Example>

[0136] Figure 4 FIG. 1 is a schematic diagram of the hardware structure of a highlight processing device according to an embodiment. Figure 4 As shown, the highlight processing device 400 includes a processor 410 and a memory 420 .

[0137] The memory 420 may be used to store executable computer instructions.

[0138] The processor 410 can be used to execute the highlight processing method described in the embodiment of the method disclosed herein under the control of the executable computer instructions.

[0139] The highlight processing device 400 can be a highlight processing device or a device with other hardware structures, which is not limited here.

[0140] In another embodiment, the highlight processing device 400 may include the above highlight processing apparatus 300 .

[0141] In one embodiment, each module of the above highlight processing device 300 can be implemented by the processor 410 running computer instructions stored in the memory 420 .

[0142] <Computer-readable storage medium>

[0143] The embodiment of the present disclosure further provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the highlight processing method provided by the embodiment of the present disclosure is executed.

[0144] The present disclosure may be a system, method and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0145] A computer-readable storage medium can be a tangible device that can hold and store instructions for use by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination thereof. As used herein, a computer-readable storage medium is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through an electrical wire.

[0146] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0147] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., utilizing an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions. The electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0148] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0149] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0150] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0151] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and the module, program segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.

[0152] The embodiments of the present disclosure have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, their practical applications, or technical improvements in the marketplace, or to enable other persons skilled in the art to understand the embodiments disclosed herein. The scope of the present disclosure is defined by the appended claims.

Claims

1. A highlight processing method, characterized in that: The method comprises: Acquire a first image, where the first image includes a highlight area; acquiring, based on the first image, a second image of the first image and a first spectrum image, wherein the second image is a high-light noise image obtained by performing low-pass filtering on the first image; acquiring a second spectrum image of the second image according to the second image; A third image is obtained based on the image difference between the first spectrum image and the second spectrum image. The third image is used as a standard image in a defect detection process so that the defect detection process is not affected by high optical noise.

2. The method according to claim 1, characterized in that After obtaining the third image, the method further includes: Acquire a fourth image, where the fourth image has the same defect detection scene as the first image, and the defect detection scene includes a light source position and a background environment; acquiring, according to the fourth image, a fifth image and a fourth spectrum image of the fourth image, wherein the fifth image is a highlight noise image of the fourth image; acquiring a fifth spectrum image of the fifth image according to the fifth image; obtaining a first spectrum difference image according to an image difference between the fourth spectrum image and the fifth spectrum image; obtaining a second spectrum difference image according to an image difference between the first spectrum image and the second spectrum image; A defect detection result is obtained according to an image difference between the first spectrum difference image and the second spectrum difference image.

3. The method according to claim 2, characterized in that Before acquiring the first image, the method further includes: Acquire multiple images to be inspected of multiple target areas in the same defect inspection scenario; Perform consistency judgment on several images to be detected; According to the consistency judgment result, the first image is selected from a plurality of images to be detected.

4. The method according to claim 3, characterized in that The selecting the first image from a plurality of images to be detected according to the consistency judgment result includes: When the consistency judgment result is high consistency, any image to be detected that does not contain defect noise is selected from the plurality of images to be detected as the first image; When the consistency judgment result is low consistency, any image to be detected containing defect noise is selected from a plurality of images to be detected, and the defect noise is extracted as the first image.

5. The method according to claim 3, characterized in that The method of obtaining a plurality of images to be inspected of a plurality of target areas in the same defect inspection scene includes: Setting a defect detection scene, wherein the defect detection scene includes a light source position and a background environment; The images of several target areas in the defect detection scene are captured at the same angle to obtain several images to be detected.

6. A highlight processing device, characterized in that: The device comprises: A first acquisition module is used to acquire a first image, wherein the first image includes a highlight area; a first processing module, configured to obtain, based on the first image, a second image of the first image and a first spectrum image, wherein the second image is a high-light noise image obtained by performing low-pass filtering on the first image; a second processing module, configured to obtain a second spectrum image of the second image based on the second image; The third processing module is configured to obtain a third image according to an image difference between the first spectrum image and the second spectrum image, wherein the third image is used as a standard image in a defect detection process so that the defect detection process is not affected by high light noise.

7. The device according to claim 6, characterized in that Also includes: A second acquisition module is used to acquire a fourth image, wherein the fourth image has the same defect detection scene as the first image, and the defect detection scene includes a light source position and a background environment; a fourth processing module, configured to obtain, based on the fourth image, a fifth image and a fourth spectrum image of the fourth image, wherein the fifth image is a highlight noise image of the fourth image; a fifth processing module, configured to obtain a fifth spectrum image of the fifth image based on the fifth image; a sixth processing module, configured to obtain a first spectrum difference image according to an image difference between the fourth spectrum image and the fifth spectrum image; a seventh processing module, configured to obtain a second spectrum difference image according to an image difference between the first spectrum image and the second spectrum image; An eighth processing module is configured to obtain a sixth image according to an image difference between the first spectrum difference image and the second spectrum difference image.

8. A high light processing device, characterized in that: The high light processing equipment includes: Memory for storing executable computer instructions; A processor is configured to execute the highlight processing method according to any one of claims 1 to 5 under the control of the executable computer instructions.

9. A computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed by a processor to execute the highlight processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Periodic-pulse thermal-imagery detection method for leaded steel material debonding defect

    CN107490599A

  • A method for removing highlight of image in natural scene

    CN111080686A