Photographing device, detection device and detection method

By designing a shooting device for the appearance quality detection of mobile phone cameras, the ring light module and the linear light module emit light to the object to be tested, and the defect information is analyzed by the shooting module shooting images, the problems of slow manual detection speed and low accuracy in the prior art are solved, and efficient and accurate defect detection is achieved.

CN113487554BActive Publication Date: 2025-04-01SHENZHENSHI YUZHAN PRECISION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110739311.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2025-04-01
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

In the prior art, the appearance quality inspection of mobile phone cameras mainly relies on manual visual inspection, with slow speed, low reliability and unsatisfactory accuracy.

Method used

A shooting device is designed, including an annular light module and a linear light module, through which ring and linear light are emitted to the subject to be measured, and images of the subject to be measured are captured by the shooting module, and these images are analyzed to detect defect information.

Benefits of technology

It realizes appearance quality detection with fast detection speed and high accuracy, which can effectively improve detection efficiency and accurately detect different types of defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113487554B_ABST
    Figure CN113487554B_ABST
Patent Text Reader

Abstract

The present application proposes a shooting device, a detection device and a detection method. The shooting device includes a ring light module, a line light module and a shooting module. The ring light module is used to emit a ring light to the object to be measured; the line light module is arranged around the ring light module, and is used to emit a line light to the object to be measured; the shooting module is arranged on the optical path of the ring light module and the line light module, and is used to shoot a first image of the object to be measured when the line light module is turned on and a second image of the object to be measured when the ring light module is turned on, wherein the first image and the second image are used to detect defect information of the object to be measured. The present application uses the shooting module to respectively turn on the ring light module and the line light module to shoot the object to be measured, and the detection speed is fast and the accuracy is high, which can effectively improve the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of detection technology, and in particular to a photographing device, a detection device and a detection method. Background Art

[0002] With the improvement of pixel and image quality of electronic products, the appearance quality of mobile phone cameras has a direct impact on the camera effect and user perception during the production process of mobile phone cameras. In addition, in order to prevent products with camera defects from flowing to the back-end assembly and affecting the assembly yield and efficiency, it is necessary to strictly inspect the appearance quality of mobile phone cameras and pick out products with poor appearance.

[0003] Currently, the appearance defect technology of mobile phone cameras is mainly completed through manual visual inspection. However, manual visual inspection is slow, has low reliability, and cannot guarantee accuracy. Summary of the invention

[0004] In view of the above situation, it is necessary to provide a photographing device, a detection device and a detection method to solve the above problems.

[0005] An embodiment of the present application proposes a shooting device applied to a detection device, wherein the detection device is used to detect defect information of an object to be measured, and the shooting device includes: a ring light module, which is used to emit a ring light to the object to be measured; a line light module, which is arranged around the ring light module and is used to emit line light to the object to be measured; a shooting module, which is arranged on the optical path of the ring light module and the line light module, and is used to shoot a first image of the object to be measured when the line light module is turned on and a second image of the object to be measured when the ring light module is turned on, wherein the first image and the second image are used to detect the defect information of the object to be measured.

[0006] An embodiment of the present application also proposes a detection device for detecting defect information of an object under test, comprising: a line light module; a shooting module, arranged on an optical path of the line light module; a communicator, coupled to the line light module and the shooting module; a processor, coupled to the communicator, and used to: confirm that the object under test is on the optical path; based on the object under test being on the optical path, send a first signal to the line light module through the communicator, and send a first shooting signal to the shooting module through the communicator, wherein the first signal is used to control opening of the line light module, and the first shooting signal is used to control the shooting module to shoot the object under test and generate a first image; in response to the sending of the first shooting signal, receive the first image through the communicator; analyze the first image to form first defect information of the object under test.

[0007] An embodiment of the present application also proposes a detection method for detecting defect information of an object under test, including: confirming that the object under test is on an optical path, and the optical path is formed by a linear light module; based on the object under test being on the optical path, sending a first signal to the linear light module through a communicator, and sending a first shooting signal to the shooting module through the communicator, wherein the first signal is used to control the opening of the linear light module, and the first shooting signal is used to control the shooting module to shoot the object under test and generate a first image; in response to the sending of the first shooting signal, receiving the first image through the communicator; analyzing the first image to form first defect information of the object under test.

[0008] An embodiment of the present application also proposes another detection method, including: inputting a first image into a sampling component to remove image noise and form a foreground image, wherein the first image contains defect information of the object to be measured; inputting the foreground image into a filtering component to filter the foreground image and form a background image; differentiating the foreground image and the background image to extract the defect information; inputting the defect information into a computing component to form a local contrast and a core contrast of the defect information; inputting the local contrast and the core contrast into a screening component to form a detection result of the defect information.

[0009] An embodiment of the present application further proposes a detection device, comprising: a communicator; and a processor, coupled to the communicator, wherein the processor is used to execute the steps of any one of the detection methods.

[0010] The present application uses a shooting module to respectively open the ring light module and the line light module to shoot the object under test, thereby obtaining an image that can characterize the appearance defects of the object under test. The detection speed is fast and the accuracy is high, which can effectively improve the detection efficiency.

[0011] The present application forms a foreground image by inputting a first image into a sampling component, forms a background image by inputting the foreground image into a filtering component, extracts defect information after differentiating the foreground image and the background image, and inputs the information into a calculation component to form a local contrast and a core contrast of the defect information; inputs the local contrast and the core contrast into a screening component to form a detection result of the defect information, which can realize the detection of different point-shaped and clustered defects, obtain more accurate detection results, and shorten the detection time. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a schematic diagram of the three-dimensional structure of a shooting device provided in one embodiment of the present application.

[0013] Figure 2 It is a schematic diagram of the structure of a detection device provided in one embodiment of the present application.

[0014] Figure 3 It is a flow chart of a detection method provided in one embodiment of the present application.

[0015] Figure 4 yes Figure 3 An embodiment provides a flow chart for analyzing a first image to form first defect information of a measured object.

[0016] Figure 5 It is a flow chart of forming defect information of a measured object in an ambient light environment provided by an embodiment of the present application.

[0017] Figure 6 This is a flow chart of sending a second shooting signal to the shooting module through a communicator based on controlling to open the ring light module and close the line light module, provided by an embodiment of the present application.

[0018] Figure 7 yes Figure 5 A flowchart after forming the second defect information of the object under test is provided in an embodiment.

[0019] Figure 8 yes Figure 6 A flowchart after shooting the second image is provided in an embodiment.

[0020] Fig. 9 yes Figure 8 A flowchart after forming the third defect information of the object under test is provided in an embodiment.

[0021] Fig.10 It is a flow chart of a detection method provided by another embodiment of the present application.

[0022] Fig.11 yes Fig.10 A flowchart of forming a foreground image is provided in an embodiment.

[0023] Fig.12 yes Fig.11 Schematic diagram of the image after weighted filtering of the first image.

[0024] Fig.13 yes Fig.11 Schematic diagram of a foreground image formed after weighted sampling of the first image.

[0025] Fig.14 yes Fig.11 Schematic diagram of filtering the foreground image to form a background image.

[0026] Fig.15 yes Fig.11 Schematic diagram of the difference image formed after subtracting the foreground image and the background image.

[0027] Fig.16 yes Fig.10 A flowchart of forming local contrast of defect information is provided in an embodiment.

[0028] Fig.17 yes Fig.10 A flowchart of forming core contrast of defect information is provided in an embodiment.

[0029] Fig.18 yes Fig.10 A flowchart for forming a detection result is provided in an embodiment.

[0030] Fig.19 yes Fig.18 A flowchart for forming a detection result is provided in an embodiment.

[0031] Fig. 20 yes Fig.18 Another embodiment provides a flow chart for forming a detection result.

[0032] Fig.21 yes Fig.18 Another embodiment of the present invention provides a flowchart for forming a detection result.

[0033] Fig. 22 It is a schematic diagram of the structure of a detection device provided in another embodiment of the present application. DETAILED DESCRIPTION

[0034] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements containing the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.

[0035] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", clockwise", "counterclockwise" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must include a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0036] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, or mutual communication; it can be a direct connection, or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0037] In the present application, unless otherwise clearly specified and limited, a first feature being “on” or “under” a second feature may include the first and second features being in direct contact with each other.

[0038] It may also include that the first and second features are not in direct contact but in contact through another feature between them. Moreover, the first feature being "above", "above" and "above" the second feature includes the first feature being directly above and obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. The first feature being "below", "below" and "below" the second feature includes the first feature being directly above and obliquely above the second feature, or simply means that the first feature is lower in level than the second feature.

[0039] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or reference letters in different examples, and this repetition is for the purpose of simplification and clarity, which itself does not indicate the relationship between the various embodiments and / or settings discussed. In addition, the various specific processes and material examples provided by the present application, but those of ordinary skill in the art can appreciate the application of other processes and / or the use of other materials.

[0040] See also Figure 1 The embodiment of the present application provides a shooting device 100, which is applied to a detection device. The detection device is used to detect defect information of a detected object 210. The detected object 210 can be exemplarily an optical lens of an electronic product 200. The electronic product 200 includes but is not limited to a mobile phone, an iPad (tablet computer), a computer, and a camera. The defects of the detected object 210 mainly include one or more of large-area dirt, large white spots, scratches, white spots, scratches, dirt, pitting, white edges, etc. The shooting device 100 includes a ring light module 10, a line light module 20 and a shooting module 30.

[0041] The ring light module 10 is used to emit a ring light to the measured object 210. The line light module 20 is arranged around the ring light module 10 and is used to emit a line light to the measured object 210. The shooting module 30 is arranged on the optical path of the ring light module 10 and the line light module 20, and is used to shoot a first image of the measured object 210 when the line light module 20 is turned on and a second image of the measured object 210 when the ring light module 10 is turned on, wherein the first image and the second image are used to detect defect information of the measured object 210.

[0042] The shooting device 100 of the present application uses the shooting module 30 to shoot the object 210 under test when the ring light module 10 and the line light module 20 are turned on, respectively, to obtain images that can characterize the appearance defects of the object 210 under test. The detection speed is fast and the accuracy is high, which can effectively improve the detection efficiency.

[0043] In one embodiment, the photographing device 100 further includes a base 40 and a carrier 50, and the carrier 50 is substantially disc-shaped. A through hole 52 is opened in the middle of the carrier 50, and the ring light module 10 is arranged at the through hole 52. The line light module 20 and the photographing module 30 are both arranged on the base 40 and located on opposite sides of the carrier 50, wherein the photographing module 30, the ring light module 10 and the line light module 20 are coaxially arranged.

[0044] The ring light module 10 is mainly used to detect large-area dirt, large white spots, and scratches. In one embodiment, the light emitted by the ring light source of the ring light module 10 can be blue. When the light of the blue ring light source passes through the object 210 at a 90° angle, the light reflected by the defects in the object 210 can be imaged and detected by the shooting module 30.

[0045] Optionally, the ring light module 10 can be exposed at two exposure levels to obtain different detection effects, such as distinguishing bright spots from ordinary white spots. In high-exposure detection, blue light has a stronger diffuse reflection ability than low-exposure detection. After increasing the exposure, dirt with relatively low contrast is easier to be displayed in the imaging, and has a better detection effect for large-area dirt, such as scratches, stains and other defects. In low-exposure detection, since some defects that are invisible to the human eye will be detected under high-exposure conditions, for the sake of efficiency and necessity, these defects that are invisible to the human eye should be filtered out in some cases, and low-exposure detection can effectively achieve this purpose. Exemplarily, in the human eye, bright spots can present a greater effect with a smaller area, and high exposure will cause dark spots to be overexposed, resulting in the inability to distinguish between bright spots and ordinary white spots. The difference between bright spots and white spots detected using low exposure is more obvious, and bright spots will be more obvious, which can be judged as defects, while white spots are weaker in low-exposure detection, and can be judged as normal and defect-free, which can be more in line with the detection effect of the human eye.

[0046] The line light module 20 mainly detects white spots, scratches, dirt, pitting, and white edges. The light emitted by the line light source of the line light module 20 is white. The line light module 20 has two characteristics when detecting: because the line light has more reflection space, defects with a certain height will appear in a larger area in the imaging; scratches with a certain direction are more obvious in the imaging of the line light.

[0047] The angle range between the outgoing light of the line light module 20 and the axis of the outgoing light of the ring light module 10 is 55°-75°. The angle range is determined according to the external dimensions of the object 210 to be measured. Therefore, if the object 210 to be measured is not an optical lens, but a product or product component of other types or shapes, adaptive adjustments can also be made.

[0048] In one embodiment, the line light module 20 includes a first line light source 22 and a second line light source 24, the first line light source 22 and the second line light source 24 are alternately arranged, and the second line light source 24 is used to supplement the light intensity of the weak light area of ​​the first line light source 22. Further, the number of the first line light sources 22 and the second line light sources 24 are the same, and they are alternately arranged at equal intervals around the object to be measured 210. In this embodiment, the number of the first line light sources 22 and the second line light sources 24 are both three, wherein the three first line light sources 22 are each responsible for a range of approximately 60° on the plane where the object to be measured 210 is located, and the light intensity within the range of approximately 60° is relatively large, which can meet the requirements for effective detection. For the detection of some defects, such as scratch defects, if the scratch defects fall on the edge area of ​​the range responsible for the three first line light sources 22, it will result in a low contrast of the imaging, so three second line light sources 24 are required to be responsible for supplementing the weak light area of ​​the first line light source 22. The first line light source 22 and the second line light source 24 cooperate with each other to reflect the uneven surface defects of the object 210 to the shooting module 30, so that various types of defects can be detected more easily.

[0049] The shooting module 30 includes a camera 32 and a lens 34 . The camera 32 is used to shoot the object 210 . The lens 34 is connected to the camera 32 to assist the camera 32 in shooting, thereby improving the imaging quality.

[0050] In one embodiment, the photographing device 100 further includes a background plate 60, which is disposed on the base 40 and on one side of the ring light module 10, and is used to provide a photographing background for the object 210 to be measured. The background plate 60 has a rough surface, and the rough surface is used to reduce the reflectivity of the light emitted by the ring light module 10 and the line light module 20 on the background plate 60, so that the defects of the object 210 to be measured are more prominent in the imaging of the photographing device 100, which is convenient for detection. In addition, the background plate 60 can avoid external interference, which is conducive to improving the imaging quality and provides a better background for the object 210 to be measured.

[0051] See also Figure 2 The embodiment of the present application further proposes a detection device 300 for detecting defect information of the object 210 to be detected. The detection device 300 includes a line light module 20, a shooting module 30, a communicator 310 and a processor 320. It should be noted that the structure of the line light module 20 and the shooting module 30 in the detection device 300 is the same or similar to that of the line light module 20 and the shooting module 30 in the shooting device 100, so they are not described in detail here.

[0052] The shooting module 30 is arranged on the optical path of the line light module 20. The communicator 310 is coupled to the line light module 20 and the shooting module 30. The processor 320 is coupled to the communicator 310, and is used to: confirm that the object 210 to be measured is on the optical path; based on the object 210 to be measured being on the optical path, send a first signal to the line light module 20 through the communicator 310, the first signal is used to turn on the line light module 20, and send a first shooting signal to the shooting module 30 through the communicator 310 to control the shooting module 30 to shoot the object 210 to be measured and generate a first image; in response to the sending of the first shooting signal, receive the first image through the communicator 310; analyze the first image to form the first defect information of the object 210 to be measured.

[0053] The communicator 310 is mainly used for signal transmission. The processor 320 can be a central processing unit (CPU), a digital signal processor, a single chip microcomputer, a microcomputer, a computer, or an industrial computer, etc., suitable for implementing various instructions.

[0054] In one embodiment, the object to be measured 210 is the appearance surface of an optical lens, and the light emitted by the line light module 20 is white light. The processor 320 is further used to: analyze the first image to form the contrast of the first image; and form first defect information of the object to be measured 210 according to the contrast of the first image, wherein the first defect information includes at least one of first white spot information, first scratch information, first dirt information, pitting information, and white edge information. Exemplarily, the first white spot information refers to that if external impurities such as dandruff or dust fall on the object to be measured 210, it will appear as gray white spots in the first image after being photographed by the shooting module 30; the first scratch information refers to that if there are scratches in the transparent area, it will appear as white edges in the first image; the first dirt information refers to that if larger pieces of impurities or pollutants are on the object to be measured 210, it will appear as large blocks of color that are obviously inconsistent with the surrounding brightness in the first image after being photographed by the shooting module 30; the pockmark information refers to the defect information of irregular batches formed by the combination of multiple white spots, which is displayed in the first image; the white edge information refers to that if there are linear impurities such as hair in the ink area, it will appear as white edges in the first image.

[0055] In one embodiment, the detection device 300 further includes a ring light module 10, and the shooting module 30 is also arranged on the optical path of the ring light module 10. It should be noted that the structure of the ring light module 10 in the detection device 300 is the same or similar to that of the ring light module 10 in the shooting device 100, so it is not repeated here. The communicator 310 is also coupled to the ring light module 10. The processor 320 is further used to: control the opening of the ring light module 10 and close the line light module 20; based on the control of opening the ring light module 10 and closing the line light module 20, send a second shooting signal to the shooting module 30 through the communicator 310 to control the shooting module 30 to shoot the object under test 210 and generate a second image; in response to the sending of the second shooting signal, receive the second image through the communicator 310, and the second image is formed in the light environment of the ring light module 10 at the first brightness; analyze the second image to form the second defect information of the object under test 210. In one embodiment, the processor 320 may send a control signal to the ring light module 10 and the line light module 20 to achieve the purpose of opening the ring light module 10 and closing the line light module 20. It is understandable that the processor 320 may also send a control signal to the line light module 20 and another control signal to the line light module 20 to achieve the purpose of opening the ring light module 10 and closing the line light module 20.

[0056] In one embodiment, the processor 320 is further used to: based on controlling the ring light module 10 to be turned on and the line light module 20 to be turned off, confirm that the ring light module 10 has been turned on and the line light module 20 has been turned off; based on the ring light module 10 being turned on and the line light module 20 being turned off, send a second shooting signal to the shooting module 30 through the communicator 310 to control the shooting module 30 to shoot the object under test 210 and generate a second image. Usually, there will be a delay in the process of the ring light module 10 and the line light module 20 being turned on and off. For example, there will be a delay of about 1 second from the on state to the off state where the light is completely off. If the shooting module 30 obtains the first image or the second image during this delay buffer period, it will cause the image quality to deteriorate, affecting the detection effect. Therefore, there is a need for a process or behavior to confirm that the light source has completed the opening or closing action. For example, a preset waiting time can be set, or a photo can be taken to confirm that the line light has been turned off or the ring light has been turned on, but it is not limited to this.

[0057] After the ring light module 10 is turned on and the line light module 20 is turned off, the shooting module 30 shoots the object 210 and generates a second image, which is in the light environment of the ring light module 10 with the first brightness. The processor 320 receives and analyzes the second image through the communicator 310 to form second defect information of the object 210.

[0058] In one embodiment, the object to be measured 210 is the appearance surface of an optical lens, the light emitted by the ring light module 10 is blue light, and the second defect information includes at least one of second white spot information, second dirt information and crushing information. The processor 320 further analyzes the second image to form a contrast of the second image, and identifies at least one of the second white spot information, second dirt information and crushing information according to the contrast of the second image. Exemplarily, the second white spot information means that if external impurities such as dandruff or dust fall on the object to be measured 210, it will appear as a gray white spot in the second image after being photographed by the shooting module 30; the second dirt information means that when a large piece of impurities or pollutants is on the object to be measured 210, it will appear as a large piece of color block that is obviously inconsistent with the surrounding brightness in the second image after being photographed by the shooting module 30; the crushing information means that the object to be measured 210 is depressed after being pressed, forming a color block whose brightness is obviously inconsistent with the dirt information.

[0059] In one embodiment, the processor 320 is further used to: based on receiving the second image, form a second signal and send it to the ring light module 10 through the communicator 310, the second signal is used to adjust the brightness of the ring light module 10 to the second brightness; send a third shooting signal to the shooting module 30 through the communicator 310; in response to the sending of the third shooting signal, receive a third image through the communicator 310, the third image is formed in the light environment of the ring light module 10 at the second brightness; analyze the third image to form third defect information of the object under test 210. In one embodiment, the brightness of the ring light module 10 is the first brightness, which refers to the shooting and detection of the object under test 210 under high exposure conditions. Since blue light has a stronger diffuse reflection ability, after increasing the exposure, dirt with a relatively low contrast is more likely to be displayed in the imaging, and has a better detection effect for large-area dirt, such as scratches, stains and other defects. The brightness of the ring light module 10 is the second brightness, which refers to the shooting and detection of the object 210 under low exposure conditions. In the human eye, bright spots can present a greater effect with a smaller area. High exposure will cause dark spots to be overexposed, resulting in the inability to distinguish between bright spots and white spots. The difference between bright spots and white spots detected using low-exposure blue light is more obvious. The bright spots will be more obvious and can be judged as defects. The white spots are weaker during low-exposure detection, so they can be judged as normal and defect-free, which can be more in line with the detection effect of the human eye. Therefore, through two different brightnesses, the defect information of the object 210 can be obtained more accurately. Bright spots can be understood as particles that can be seen by the human eye, and dark spots can be understood as the manifestation of dirt in the image. This detection method can avoid the problem of overkill, that is, prevent defects that are invisible to the human eye from being considered as defects, affecting the detection efficiency.

[0060] In one embodiment, the processor 320 is further configured to: based on the first defect information, the second defect information, and the third defect information, form defect information of the measured object 210. In one embodiment, the defect information is a union of the first defect information, the second defect information, and the third defect information. For example, by comparing the obtained first scratch information with the second scratch information, a result of confirming whether the measured object 210 has a scratch defect can be obtained to form the defect information.

[0061] See also Figure 3 The embodiment of the present application also proposes a detection method, which is applied to Figure 2 The detection device shown is used to detect defect information of the object 210 to be detected, and includes the following steps:

[0062] S10, confirming that the object 210 is on the optical path, and the optical path is formed in the line optical module 20;

[0063] S20, based on the object 210 being in the optical path, sending a first signal to the line light module 20 through the communicator 310, the first signal being used to turn on the line light module 20, and sending a first shooting signal to the shooting module 30 through the communicator 310, so as to control the shooting module 30 to shoot the object 210 and generate a first image;

[0064] S30, in response to the sending of the first shooting signal, receiving a first image through the communicator 310;

[0065] S40 , analyzing the first image to form first defect information of the object to be measured 210 .

[0066] In one embodiment, the object 210 to be measured is the appearance surface of an optical lens, see Figure 4 , step S40 specifically includes:

[0067] S50, analyzing the first image to form a contrast of the first image;

[0068] S60, forming defect information of the measured object 210 according to the contrast of the first image, the defect information comprising at least one of first white spot information, first scratch information, first dirt information, pitting information and white edge information.

[0069] Exemplarily, the first white spot information refers to that if external impurities such as dandruff or dust fall on the object to be measured 210, it will appear as gray white spots in the first image after being photographed by the shooting module 30; the first scratch information refers to that if there are scratches in the transparent area, it will appear as white edges in the first image; the first dirt information refers to that if larger pieces of impurities or pollutants are on the object to be measured 210, it will appear as large blocks of color that are obviously inconsistent with the surrounding brightness in the first image after being photographed by the shooting module 30; the pockmark information refers to the defect information of irregular batches formed by the combination of multiple white spots, which is displayed in the first image; the white edge information refers to that if there are linear impurities such as hair in the ink area, it will appear as white edges in the first image.

[0070] In one embodiment, see Figure 5 , the detection method further comprises:

[0071] S70, controlling to open the ring light module 10 and close the line light module 20;

[0072] S80, based on the control, the ring light module 10 is turned on and the line light module 20 is turned off, and a second shooting signal is sent to the shooting module 30 through the communicator 310;

[0073] In one embodiment, see Figure 6 , step S80 specifically includes:

[0074] S81, based on the control, the ring light module 10 is turned on and the line light module 20 is turned off, confirming that the ring light module 10 is turned on and the line light module 20 is turned off;

[0075] S82, based on the ring light module 10 being turned on and the line light module 20 being turned off, a second shooting signal is sent to the shooting module 30 through the communicator 310 to control the shooting module 30 to shoot the object 210 and generate a second image.

[0076] Usually, there will be a delay in the opening and closing process of the ring light module 10 and the line light module 20. For example, there will be a delay of about 1 second from the opening state to the closing state where the lights are completely off. If the shooting module 30 obtains the first image or the second image during this delay buffer period, it will cause the image quality to deteriorate. Therefore, there is a need for a confirmation process or behavior. This can be achieved by setting a preset waiting time or taking a photo to confirm that the closing is complete, but is not limited to this.

[0077] S90, in response to the sending of the second shooting signal, receiving a second image through the communicator 310, the second image being formed in the light environment of the ring light module 10 at the first brightness;

[0078] S100 , analyzing the second image to form second defect information of the object 210 to be measured.

[0079] In one embodiment, the object 210 to be measured is the appearance surface of an optical lens, the light emitted by the ring light module 10 is blue light, and the second defect information includes at least one of the second white spot information, the second dirt information and the crushing information; see Figure 7 , step S100 further comprises:

[0080] S160, analyzing the second image to form a contrast of the second image;

[0081] S170, at least one of second white spot information, second dirt information and crushing information is formed according to the contrast of the second image. Exemplarily, the second white spot information means that if external impurities such as dandruff or dust fall on the measured object 210, it will appear as a gray white spot in the second image after being photographed by the shooting module 30; the second dirt information means that if a large piece of impurities or pollutants is on the measured object 210, it will appear as a large piece of color that is obviously inconsistent with the surrounding brightness in the second image after being photographed by the shooting module 30; the crushing information means that the measured object 210 is depressed after being pressed, forming a color block with a brightness that is obviously inconsistent with the dirt information.

[0082] In one embodiment, see Figure 8 After taking the second image, the detection method further comprises:

[0083] S110, based on receiving the second image, forming a second signal and sending it to the ring light module 10 through the communicator 310, the second signal is used to adjust the brightness of the ring light module 10 to a second brightness;

[0084] S120, sending a third shooting signal to the shooting module 30 via the communicator 310;

[0085] S130, in response to the sending of the third shooting signal, receiving a third image through the communicator 310, where the third image is formed in the light environment of the ring light module 10 at the second brightness;

[0086] S140 , analyzing the third image to form third defect information of the measured object 210 .

[0087] In one embodiment, the brightness of the ring light module 10 is the first brightness, which refers to the detection of the object 210 under high exposure conditions. Since blue light has a stronger diffuse reflection ability, after increasing the exposure, dirt with a relatively low contrast is more likely to be displayed in the image, and has a better detection effect for large-area dirt, such as scratches, stains and other defects. The brightness of the ring light module 10 is the second brightness, which refers to the detection of the object 210 under low exposure conditions. Since in the human eye, bright spots can present a greater effect with a smaller area, high exposure will cause dark spots to be overexposed, resulting in the inability to distinguish between bright spots and ordinary white spots. Using low-exposure blue light to detect white spots is more in line with the detection effect of the human eye. Therefore, through two different brightnesses, the defect information of the object 210 can be obtained more accurately. Bright spots can be understood as particles that can be seen by the human eye, and dark spots can be understood as the manifestation of dirt in the image. This detection method can avoid the problem of overkill, that is, prevent defects that are invisible to the human eye from being considered as detected defects, affecting the detection efficiency.

[0088] In one embodiment, see Fig. 9 , the detection method further comprises:

[0089] S150, based on the first defect information, the second defect information and the third defect information, defect information of the measured object 210 is formed. In one embodiment, the defect information is a union of the first defect information, the second defect information and the third defect information. For example, by comparing the obtained first scratch information with the second scratch information, a result of confirming whether the measured object 210 has a scratch defect can be obtained to form the defect information.

[0090] In one embodiment, before step S150, the method further includes:

[0091] S151, analyzing the first image to form first defect information of the object 210;

[0092] S152, analyzing the second image to form second defect information of the object 210;

[0093] S153 , analyzing the third image to form third defect information of the measured object 210 .

[0094] See also Fig.10 The embodiment of the present application also proposes a detection method for detecting defect information of the object 210 to be detected. The method can be applied to Figure 2 The detection device shown in the figure can be executed on the processor 320, and the specific steps include:

[0095] S1, inputting a first image to a sampling component to remove image noise and form a foreground image, wherein the first image includes defect information of the object under test 210;

[0096] In this embodiment, the first image can be an image formed by photographing the object under test in an environment where the line light module emits line light, or it can be an image formed by photographing the object under test in an environment where the ring light module emits line light, or it can be an image formed by photographing the object under test in an environment where the ring light module emits high exposure or low exposure.

[0097] Specifically, in one embodiment, see Fig.11 , the step of forming a foreground image comprises:

[0098] S11, performing weighted filtering on the first image to remove image noise, wherein the weighted filtering includes at least one of Gaussian filtering and binomial filtering, for example, Fig.12 As shown, Fig.12 is the image after the first image is processed by Gaussian filtering.

[0099] Among them, weighted filtering is relative to unweighted filtering such as median filtering. Weighting is based on spatial relationships. The closer the location is to the convolution center, the higher the weight, and the farther the location is, the lower the weight. Weighted filtering can choose to use Gaussian filtering or binomial filtering.

[0100] S12, performing weighted sampling on the first image after removing image noise to form a foreground image, illustratively, as Fig.13 As shown, Fig.13 is a foreground image formed by weighted sampling of the first image.

[0101] Among them, weighted sampling is different from the direct sampling method used in general affine transformation, that is, when sampling an image, the surrounding pixels of a pixel are taken into consideration, and the weight is allocated according to the spatial position relationship between the current pixel and the surrounding pixels. The advantage of this is to prevent the loss of defect information during the sampling process. Optionally, Gaussian pyramid sampling is used in this embodiment.

[0102] S2, input the foreground image to the filtering component to filter the foreground image to form a background image, for example, Fig.14 As shown, Fig.14 To filter the foreground image to form a background image.

[0103] The filtering processing method includes at least one of mean filtering and median filtering. In this way, the foreground image can be further filtered to form a clean background image.

[0104] S3, difference foreground image and background image, extract defect information, for example, Fig.15 As shown, Fig.15 It is the difference image formed after differentiating the foreground image and the background image.

[0105] By making a difference between the foreground image and the background image, the defective position can be highlighted. For example, the principle of difference is to subtract the pixel values ​​corresponding to images of the same size.

[0106] S4, inputting the defect information into the computing component to form a local contrast and a core contrast of the defect information;

[0107] In one embodiment, see Fig.16 , the step of forming the local contrast of the defect information comprises:

[0108] S41, determining a first range sequence of the defect information in the differential image according to the defect information;

[0109] S42, calculating the average grayscale of the first range sequence according to the first range sequence;

[0110] S43, calculating the average grayscale of the differential image after removing the first range sequence;

[0111] S44, forming a local contrast according to the average grayscale of the first range sequence and the average grayscale after the first range sequence is removed from the differential image.

[0112] The local contrast is formed in the first range of the defect information in the differential image, and the core contrast is formed in the range exceeding the preset value in the first range. For example: local contrast = (average grayscale in the defect range - background grayscale) / background grayscale.

[0113] In one embodiment, see Fig.17 , the step of forming the core contrast comprises:

[0114] S45, dividing the first range sequence into grayscale sequences formed by a plurality of grayscales according to the local contrast;

[0115] S46, sorting the grayscale sequence to form a sorting result;

[0116] S47, determining a second range sequence in the grayscale sequence according to a preset percentage based on the sorting result;

[0117] S48, forming an average grayscale of the second range sequence according to the second range sequence;

[0118] S49, forming a core contrast according to the average grayscale of the second range sequence and the average grayscale of the first range sequence removed from the differential image.

[0119] S5, inputting the local contrast and the core contrast into the screening component to form a detection result of the defect information.

[0120] In this embodiment, core contrast refers to extracting pixels with higher contrast in proportion as core pixels, and calculating the average contrast of these core pixels. The 30% or so with the highest contrast is selected as the preset percentage. It can be understood that in other embodiments, the 20% or 40% with the highest contrast can also be selected. But it is not limited to this. For example: core contrast = (average grayscale within the defect core range - background grayscale) / background grayscale.

[0121] In one embodiment, see Fig.18 , the step of forming the detection result comprises:

[0122] S51, performing threshold segmentation on the defect information according to the local contrast to form a segmentation area of ​​the defect information;

[0123] S52, filtering the segmented area according to the core contrast;

[0124] S53, forming a detection result according to the segmented area after filtering the segmented area.

[0125] In one embodiment, the segmented area includes a first area; see Fig.19 , the step of forming the detection result comprises:

[0126] S531, confirming the contrast of the first area;

[0127] S532, comparing the core contrast with the contrast of the first region, and confirming that the contrast of the first region exceeds a preset value;

[0128] S533, based on the contrast of the first area exceeding the preset value, the first area is filtered to form a detection result according to the segmented area of ​​the filtered first area. Exemplarily, the first area refers to an area with low contrast, which cannot be distinguished by the human eye and is therefore not suitable for being judged as a defect. Exemplarily, the preset value can be determined based on the difference between the contrast of the first area and the core contrast to determine whether it is visible to the human eye. For example, if the difference between the contrast of the first area and the core contrast is less than 10% of the core contrast, it can be determined to be invisible to the human eye, and the first area can be determined to be a defect-free area. In this way, it can be simulated whether the human eye can see the defect.

[0129] In one embodiment, the segmented area includes the adjacent second area and third area, see Fig. 20 , the steps of forming the test results include:

[0130] S534, confirming the contrast between the second area and the third area;

[0131] S535, comparing the core contrast with the contrast of the second region and the third region respectively, and confirming that the defects of the second region and the third region do not exceed a preset value;

[0132] S536, based on the fact that the contrast between the second area and the third area does not exceed the preset value, the second area and the third area are combined into a fourth area, so as to form a detection result according to the fourth area. In this way, connected adjacent defects can be detected, which reduces the amount of calculation and improves the detection efficiency.

[0133] In one embodiment, the segmented area includes a fifth area, see Fig.21 , the steps of forming the test results include:

[0134] S537, confirming the contrast of the fifth area;

[0135] S538, comparing the core contrast with the contrast of the fifth area, and confirming that the contrast of the fifth area does not exceed a preset value;

[0136] S539, analyzing the fifth region to form morphological parameters of the fifth region based on the contrast of the fifth region not exceeding a preset value;

[0137] S540, generating a detection result according to the morphological parameters.

[0138] Among them, the morphological parameters are analyzed based on the shape of the defect, for example, the length-to-width ratio of the defect circumscribed rectangle, the purpose is to determine the type of defect and reduce some overkill and missed detection. For example, when the defect length-to-width ratio of the fifth area is found to be 1:1, it can be preliminarily determined that the defect may be a white spot. If the defect length-to-width ratio of the fifth area is found to be 2:1 or 3:1, it can be preliminarily determined that the defect may be a scratch.

[0139] This embodiment utilizes weighted sampling technology to improve detection accuracy and reduce detection time; secondly, it utilizes multiple screening strategies to greatly improve anti-interference performance; after defects are merged, the defect size and area can also be calculated to quantify the defects, which is easy to use.

[0140] In this embodiment, the detection method can be used to achieve Figures 3 to 9 At least a portion of the process shown, including but not limited to: Figure 3 The illustrated S40 analyzes the first image to form first defect information of the measured object 210; Figure 5 The illustrated S100 analyzes the second image to form second defect information of the measured object 210; Figure 8 The illustrated S140 analyzes the third image to form third defect information of the measured object 210 .

[0141] See also Fig. 22 The embodiment of the present application also proposes a detection device 400, including a communicator 410 and a processor 420, which can be used to execute the above detection method to detect defect information of the object 210 under test.

[0142] The communicator 410 is used to receive a first image containing defect information of the object under test 210. The processor 420 is coupled to the communicator 410 and is used to: input the first image to a sampling component to remove image noise and form a foreground image; input the foreground image to a filtering component to filter the foreground image to form a background image; differentiate the foreground image and the background image to form a differential image and extract the defect information; input the defect information to a calculation component to form a local contrast and a core contrast of the defect information; input the local contrast and the core contrast to a screening component to form a detection result of the defect information.

[0143] The communicator 410 is mainly used for signal transmission. The processor 420 can be a central processing unit (CPU), a digital signal processor, a single chip microcomputer, a microcomputer, a computer, or an industrial computer, etc., suitable for implementing various instructions.

[0144] In one embodiment, the sampling component is used to: perform weighted filtering on the first image to remove image noise, the weighted filtering includes at least one of Gaussian filtering and binomial filtering; and perform weighted sampling on the first image after removing image noise to form the foreground image.

[0145] In one embodiment, the computing component is used to: determine a first range sequence of the defect information in the differential image based on the defect information; calculate an average grayscale of the first range sequence based on the first range sequence; calculate an average grayscale of the differential image after removing the first range sequence; and form the local contrast based on the average grayscale of the first range sequence and the average grayscale of the differential image after removing the first range sequence.

[0146] In one embodiment, the computing component is used to: divide the first range sequence into a grayscale sequence formed by a plurality of grayscales according to the local contrast; sort the grayscale sequence to form a sorting result; determine a second range sequence in the grayscale sequence according to a preset percentage according to the sorting result; form an average grayscale of the second range sequence according to the second range sequence; form the core contrast according to the average grayscale of the second range sequence and the average grayscale of the differential image after removing the first range sequence.

[0147] In one embodiment, the screening component is used to: perform threshold segmentation on the defect information according to the local contrast to form a segmented area of ​​the defect information; filter the segmented area according to the core contrast; and form the detection result according to the segmented area after filtering the segmented area.

[0148] In one embodiment, wherein the segmented area includes a first area; the screening component is further used to: confirm the contrast of the first area; compare the core contrast with the contrast of the first area to confirm that the contrast of the first area exceeds a preset value; based on the contrast of the first area exceeding the preset value, filter the first area to form the detection result based on filtering the segmented area of ​​the first area.

[0149] In one embodiment, wherein the segmented area includes an adjacent second area and a third area, the screening component is further used to: confirm the contrast of the second area and the third area; respectively compare the core contrast with the contrast of the second area and the third area to confirm that the defects of the second area and the third area do not exceed a preset value; based on the contrast of the second area and the third area not exceeding the preset value, merge the second area and the third area into a fourth area to form the detection result based on the fourth area.

[0150] In one embodiment, wherein the segmented area includes a fifth area, the screening component is used to: confirm the contrast of the fifth area; compare the core contrast with the contrast of the fifth area to confirm that the contrast of the fifth area does not exceed a preset value; based on the contrast of the fifth area not exceeding the preset value, analyze the fifth area to form morphological parameters of the fifth area; and form the detection result based on the morphological parameters.

[0151] It is obvious to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present application.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not limiting. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A detection device for detecting defect information of a detected object, comprising: Linear light module; A shooting module is arranged on the optical path of the linear light module; a communicator, coupled to the line light module and the shooting module; A processor, coupled to the communicator, configured to: confirming that the object to be measured is on the optical path; Based on the object to be measured being on the optical path, sending a first signal to the line light module through the communicator, and sending a first shooting signal to the shooting module through the communicator, wherein the first signal is used to control turning on the line light module, and the first shooting signal is used to control the shooting module to shoot the object to be measured and generate a first image; receiving the first image via the communicator in response to the sending of the first shooting signal; analyzing the first image to form first defect information of the measured object; The processor is further configured to: Inputting a first image into a sampling component to remove image noise and form a foreground image, wherein the first image includes defect information of the object to be measured; Inputting the foreground image into a filtering component to filter the foreground image to form a background image; Differentiating the foreground image and the background image to extract the defect information; Inputting the defect information into a computing component to form a local contrast and a core contrast of the defect information, wherein the local contrast is formed in a first range of the defect information in the difference image, and the core contrast is formed in a range exceeding a preset value in the first range; The local contrast and the core contrast are input to a screening component to form a detection result of the defect information.

2. The detection device according to claim 1, further comprising: A ring light module, configured to emit a ring light toward the object being measured; The line light module is arranged around the ring light module and is used to emit line light to the object to be measured; The shooting module is arranged on the optical path of the ring light module and the line light module, and is used to capture a first image of the object to be measured when the line light module is turned on and a second image of the object to be measured when the ring light module is turned on, wherein the first image and the second image are used to detect defect information of the object to be measured.

3. The detection device according to claim 2, wherein the angle between the axis of the outgoing light of the linear light module and the axis of the outgoing light of the ring light module is in the range of 55°-75°. 4 . The detection device according to claim 2 , wherein the line light module comprises a first line light source and a second line light source, and the first line light source and the second line light source are alternately arranged.

5. The detection device as described in claim 4, wherein the number of the first line light sources is the same as the number of the second line light sources, and they are alternately arranged at equal intervals around the object to be measured, so as to supplement the light intensity of the weak light area of ​​the first line light source through the second line light source. 6 . The detection device according to claim 2 , wherein the ring light source of the ring light module is blue, and the line light source of the line light module is white.

7. The detection device according to claim 2, further comprising: A background plate is provided on one side of the ring light module and is used to provide a shooting background for the measured object. The background plate has a rough surface, and the rough surface is used to reduce the reflectivity of the light emitted by the ring light module and the line light module on the background plate.

8. The detection device according to claim 1, wherein the detected object is an exterior surface of an optical lens, the first defect information comprises at least one of first white spot information, first scratch information, first dirt information, pitting information, and white edge information, and the processor is further configured to: analyzing the first image to form a contrast of the first image; The first defect information is formed according to the contrast of the first image.

9. The detection device according to claim 1, further comprising: Ringlight module; The shooting module is also arranged on the optical path of the ring light module; The communicator is further coupled to the ring light module; The processor is further configured to: Controlling to open the ring light module and close the line light module; Based on the control, the ring light module is turned on and the line light module is turned off, and a second shooting signal is sent to the shooting module through the communicator to control the shooting module to shoot the object to be measured and generate a second image; In response to the sending of the second shooting signal, receiving the second image through the communicator, where the second image is formed in the light environment of the ring light module at a first brightness; The second image is analyzed to form second defect information of the measured object.

10. The detection device according to claim 9, wherein the processor is further configured to: Based on the control, the ring light module is turned on and the line light module is turned off, and confirmation is made that the ring light module is turned on and the line light module is turned off; Based on the ring light module being turned on and the line light module being turned off, the second shooting signal is sent to the shooting module through the communicator to control the shooting module to shoot the object to be measured and generate the second image.

11. The detection device according to claim 9, wherein the processor is further configured to: Based on the receiving of the second image, a second signal is generated and sent to the ring light module through the communicator, wherein the second signal is used to adjust the brightness of the ring light module to a second brightness; Sending a third shooting signal to the shooting module through the communicator; In response to the sending of the third shooting signal, receiving a third image through the communicator, wherein the third image is formed in the light environment of the ring light module at the second brightness; The third image is analyzed to form third defect information of the measured object.

12. The detection device according to claim 11, wherein the processor is further configured to: Defect information of the object under test is formed based on the first defect information, the second defect information, and the third defect information.

13. The detection device according to claim 9, wherein the detected object is an exterior surface of an optical lens, the second defect information comprises at least one of second white spot information, second dirt information, and pressure damage information, and the processor is further configured to: analyzing the second image to form a contrast of the second image; At least one of the second white spot information, the second dirt information, and the pressure damage information is formed according to the contrast of the second image.

14. A detection method for detecting defect information of a detected object, comprising: Confirming that the object to be measured is on an optical path, wherein the optical path is formed by a linear optical module; Based on the object to be measured being on the optical path, a first signal is sent to the line light module through a communicator, and a first shooting signal is sent to a shooting module through the communicator, wherein the first signal is used to control turning on the line light module, and the first shooting signal is used to control the shooting module to shoot the object to be measured and generate a first image; receiving the first image via the communicator in response to the sending of the first shooting signal; analyzing the first image to form first defect information; The detection method further comprises: Inputting a first image into a sampling component to remove image noise and form a foreground image, wherein the first image includes defect information of the object to be measured; Inputting the foreground image into a filtering component to filter the foreground image to form a background image; Differentiating the foreground image and the background image to extract the defect information; Inputting the defect information into a computing component to form a local contrast and a core contrast of the defect information, wherein the local contrast is formed in a first range of the defect information in the difference image, and the core contrast is formed in a range exceeding a preset value in the first range; The local contrast and the core contrast are input to a screening component to form a detection result of the defect information.

15. The detection method according to claim 14, wherein the object to be detected is an exterior surface of an optical lens, further comprising: analyzing the first image to form a contrast of the first image; The first defect information is formed according to the contrast of the first image, and the first defect information includes at least one of first white spot information, first scratch information, first dirt information, pitting information, and white edge information.

16. The detection method according to claim 14, further comprising: Control to open the ring light module and close the line light module; Based on the control, the ring light module is turned on and the line light module is turned off, and a second shooting signal is sent to the shooting module through the communicator; In response to the sending of the second shooting signal, receiving a second image through the communicator, wherein the second image is formed in the light environment of the ring light module at the first brightness; The second image is analyzed to form second defect information of the measured object.

17. The detection method according to claim 16, further comprising: Based on the control, the ring light module is turned on and the line light module is turned off, and confirmation is made that the ring light module is turned on and the line light module is turned off; Based on the ring light module being turned on and the line light module being turned off, the second shooting signal is sent to the shooting module through the communicator to control the shooting module to shoot the object to be measured and generate the second image.

18. The detection method according to claim 16, further comprising: Based on the receiving of the second image, a second signal is generated and sent to the ring light module through the communicator, wherein the second signal is used to adjust the brightness of the ring light module to a second brightness; sending a third shooting signal to the shooting module via the communicator; In response to the sending of the third shooting signal, receiving a third image through the communicator, wherein the third image is formed in the light environment of the ring light module at the second brightness; The third image is analyzed to form third defect information of the measured object.

19. The detection method according to claim 18, further comprising: Defect information of the object under test is formed based on the first defect information, the second defect information, and the third defect information.

20. The detection method according to claim 16, wherein the detected object is an exterior surface of an optical lens, the light emitted by the ring light module is blue light, and the second defect information includes at least one of second white spot information, second dirt information, and crush information; The detection method further comprises: analyzing the second image to form a contrast of the second image; At least one of the second white spot information, the second dirt information, and the pressure damage information is formed according to the contrast of the second image.

21. The detection method according to claim 14, wherein the step of forming a foreground image comprises: performing weighted filtering on the first image to remove image noise, wherein the weighted filtering comprises at least one of a Gaussian filter and a binomial filter; Weighted sampling is performed on the first image after image noise is removed to form the foreground image.

22. The detection method according to claim 21, wherein the step of forming the local contrast of the defect information comprises: determining, according to the defect information, a first range sequence of the defect information in the differential image; Calculating an average grayscale of the first range sequence according to the first range sequence; Calculating the average grayscale of the difference image after removing the first range sequence; The local contrast is formed according to the average grayscale of the first range sequence and the average grayscale of the differential image after the first range sequence is removed.

23. The detection method according to claim 22, wherein the step of forming the core contrast comprises: dividing the first range sequence into a grayscale sequence formed by a plurality of grayscales according to the local contrast; sorting the grayscale sequence to form a sorting result; Determining a second range sequence in the grayscale sequence according to a preset percentage based on the sorting result; forming an average grayscale of the second range sequence according to the second range sequence; The core contrast is formed according to the average grayscale of the second range sequence and the average grayscale of the differential image after removing the first range sequence.

24. The detection method according to claim 14, wherein the step of forming the detection result comprises: performing threshold segmentation on the defect information according to the local contrast to form segmented areas of the defect information; filtering the segmented region according to the core contrast; The detection result is formed according to the segmented areas after filtering the segmented areas.

25. The detection method of claim 24, wherein the segmented region comprises a first region; The step of forming the detection result includes: determining the contrast of the first area; comparing the core contrast with the contrast of the first region, and confirming that the contrast of the first region exceeds a preset value; Based on the contrast of the first area exceeding the preset value, the first area is filtered to form the detection result according to the segmented area of ​​the filtered first area.

26. The detection method according to claim 24, wherein the segmented area includes a second area and a third area that are adjacent to each other, and the step of forming the detection result comprises: determining the contrast between the second area and the third area; comparing the core contrast with the contrast of the second region and the third region respectively, and confirming that defects in the second region and the third region do not exceed a preset value; Based on the fact that the contrast between the second area and the third area does not exceed the preset value, the second area and the third area are merged into a fourth area, so as to form the detection result according to the fourth area.

27. The detection method according to claim 24, wherein the segmented area includes a fifth area, and the step of forming the detection result comprises: confirming the contrast of the fifth area; comparing the core contrast with the contrast of the fifth region to confirm that the contrast of the fifth region does not exceed a preset value; analyzing the fifth region to form morphological parameters of the fifth region based on the contrast of the fifth region not exceeding the preset value; The detection result is formed according to the morphological parameters.

28. A detection device comprising: communicator; A processor is coupled to the communicator, and is configured to execute the steps of the detection method according to any one of claims 14 to 27.

Citation Information

Patent Citations

  • Equipment and combined light source device for product appearance defect detection and method based on product appearance defect detection

    CN109991166A

  • Lens defect detection system and detection method

    CN112945988A

  • Detection device for module display image

    CN211856404U