Lens defect detection device and imaging method
Through the embedded vision processing chip, multi-mode light shooting of composite light sources is controlled, and different types of image features are acquired and fused, the problem of inefficient detection in the prior art is solved, and efficient lens defect detection is achieved.
Patent Information
- Application Number
- CN202211148215.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-09-20
AI Technical Summary
The visual system of the existing lens detection device has a single lighting method, making it difficult to obtain the characteristics of different types of defects at the same time, resulting in low detection efficiency.
An embedded vision processing chip is used as the control center to obtain different types of images through multi-mode lighting of composite light sources, and multiple defect features are collected on one image through image fusion technology to reduce subsequent detection steps.
It improves detection efficiency and can fully detect the abrasions, scars, and concave defects of the lens, with high detection accuracy and reliable results.
Smart Images

Figure CN115436288B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision technology, and in particular to a lens defect detection device and an imaging method. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Defects such as scratches, oil stains and protrusions on 3D curved lenses will seriously affect the quality of the lenses, so online inspection is required on the production line. However, the current visual system used for online inspection has a single lighting method. Different types of defects often require different lighting methods to be displayed. The single lighting method is limited by the problem of defect imaging and it is difficult to obtain all features at the same time, resulting in the current lens inspection device having a complex structure and low inspection efficiency. Summary of the invention
[0004] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a lens defect detection device and an imaging method, which uses an embedded visual processing chip as the control center to control the camera to take multiple photos under the multi-mode lighting method of a composite light source to obtain images with different defect features. Through image fusion, multiple defect features are combined into one image and output, thereby reducing the steps of subsequent defect detection and improving detection efficiency.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] The first aspect of the present invention provides a lens defect detection device, comprising: an image acquisition component arranged inside a shell and a processor connected thereto, the image acquisition component comprising a first light source located directly above a detection platform, a second light source arranged on both sides of the detection platform and capable of being lit separately, and an image acquisition module coaxially connected to the first light source, the image acquisition module acquires different types of images under different light source conditions and sends them to the processor; the processor receives different types of images sent by the image acquisition module and outputs them after fusion, and displays all defects of the lens on the output image.
[0007] The first light source is a coaxial light source, which is located directly above the detection platform and provides the light source required for bright field illumination.
[0008] The second light source is a bar light source, including at least two light sources arranged on both sides of the detection platform and capable of being lit separately, providing the light source required for dark field illumination.
[0009] The image acquisition module comprises a camera and a lens. The camera is located above the first light source and is coaxially arranged with the first light source.
[0010] According to the detection requirements, the image acquisition module obtains the image of the lens to be tested and sends it to the processor when the two light sources are lit separately in sequence.
[0011] The height of the first light source relative to the lens to be tested is changed by a hand wheel to obtain a bright field image that meets the testing requirements.
[0012] The angle between the irradiation direction of the second light source and the axis of the image acquisition module is changed by the knob to obtain a dark field image that meets the detection requirements.
[0013] A second aspect of the present invention provides the above-mentioned method for realizing imaging based on the device, comprising the following steps:
[0014] Lighting up the first light source and the second light source respectively, obtaining a bright field illumination image and a dark field illumination image under corresponding conditions as original images;
[0015] Wavelet decomposition of the original image: decomposing the original image into the frequency domain and each frequency band according to the wavelet basis and decomposition level, and decomposing each frequency band into multiple different feature domains;
[0016] Select the required fusion coefficients for each component on each frequency band and fuse them separately to obtain an updated feature domain set;
[0017] Based on the updated feature domain set, the image is reconstructed layer by layer through inverse wavelet transform and the fused image is output.
[0018] Each frequency band is decomposed into multiple different characteristic domains, specifically: low-frequency components, high-frequency components in horizontal, vertical and diagonal directions.
[0019] Select the desired fusion coefficient, specifically:
[0020] For the low-frequency components of the image, the low-frequency coefficients of the image after wavelet decomposition are fused based on the regional energy rule;
[0021] For the high-frequency components of the image, a local entropy operator is used for each component in each frequency band. The local sliding window uses a circular sliding window, which is divided into three layers. The entropy value of each layer is calculated according to the entropy value definition, and the weight is calculated and weighted according to the Gaussian distribution. The area whose entropy value meets the requirements is selected as the fused area.
[0022] Compared with the prior art, one or more of the above technical solutions have the following beneficial effects:
[0023] 1. With the processor as the control center, the camera is controlled to take multiple photos under the multi-mode lighting mode of the composite light source to obtain images with different defect features. Through image fusion, multiple defect features are combined into one image and output, thereby reducing the steps of subsequent defect detection and improving detection efficiency.
[0024] 2. Using entropy as an indicator of image quality evaluation can reflect the richness of information contained in the image, and the result is reliable. At the same time, the calculation of entropy is relatively simple, making the calculation convenient.
[0025] 3. The fusion method adopted is the local entropy operator algorithm of the circular sliding window. The circular sliding window makes the influence of each point in the sliding window on the center point closer, and the result is more accurate.
[0026] 4. It can fully detect the scratches, scars, and concave-convex defects of the lens with high detection accuracy and guaranteed reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0028] Figure 1 is a schematic structural diagram of a lens defect detection device provided by one or more embodiments of the present invention;
[0029] FIG. 2( a ) is a schematic diagram of a three-dimensional structure of a lens defect detection device provided by one or more embodiments of the present invention;
[0030] FIG2( b ) is a schematic diagram of the front view structure of a lens defect detection device provided by one or more embodiments of the present invention;
[0031] FIG2( c ) is a schematic diagram of the rear view structure of a lens defect detection device provided by one or more embodiments of the present invention;
[0032] FIG2(d) is a schematic diagram of the structure of the gear and rack meshing to achieve lifting in the lens defect detection device provided by one or more embodiments of the present invention;
[0033] FIG2( e ) is a schematic diagram of the installation position of a rack in a lens defect detection device provided by one or more embodiments of the present invention;
[0034] FIG2( f ) is a schematic diagram of a structure in which a strip light source in a lens defect detection device provided by one or more embodiments of the present invention realizes angle adjustment;
[0035] Figure 3 is a schematic diagram of a sliding window when a lens defect detection device provided by one or more embodiments of the present invention executes an image fusion algorithm;
[0036] Figure 4 is a schematic diagram of the working process of a lens defect detection device provided by one or more embodiments of the present invention;
[0037] FIG5( a ) is a schematic diagram of a dark field illumination original image acquired by a lens defect detection device provided by one or more embodiments of the present invention;
[0038] FIG5( b ) is a schematic diagram of a bright field illumination original image obtained by a lens defect detection device provided by one or more embodiments of the present invention;
[0039] FIG5( c ) is a schematic diagram of an output image stored by a lens defect detection device provided by one or more embodiments of the present invention;
[0040] In the figure: 100 housing, 101 first fixture, 102 second fixture, 210 coaxial light source, 220 bar light source, 310 camera, 320 lens, 400 lens, 510 support, 520 knob, 600 box, 700 processor, 810 handwheel, 820 rack, 821 gear, 830 gear rack. DETAILED DESCRIPTION
[0041] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0042] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0043] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0044] As described in the background technology, the current visual system used for online inspection has a single lighting method. Different types of defects often require different lighting methods to be displayed. The single lighting method is limited by the problem of defect imaging and it is difficult to obtain all features at the same time, resulting in the current inspection device for lenses having a complex structure and low inspection efficiency.
[0045] Therefore, the following embodiment provides a lens defect detection device and imaging method, which uses an embedded visual processing chip as the control center to control the camera to take multiple photos under the multi-mode lighting method of a composite light source, obtain images with different defect features, and through image fusion, combine multiple defect features into one image and output it, thereby reducing the steps of subsequent defect detection and improving detection efficiency.
[0046] Embodiment 1:
[0047] like Figure 1 -2, a lens defect detection device, comprising:
[0048] An image acquisition component arranged inside the housing 100 and a processor 700 connected thereto, the image acquisition component includes a first light source located directly above the detection platform, a second light source arranged on both sides of the detection platform and capable of being lit separately, and an image acquisition module coaxially connected to the first light source, the image acquisition module acquires different types of images under different light source conditions and sends them to the processor; the processor receives different types of images sent by the image acquisition module and outputs them after fusion, and displays all defects of the lens on the output image.
[0049] The processor is configured as:
[0050] The images under the lighting conditions of the first light source and the second light source are respectively obtained as the original images, that is, the bright field illumination image and the dark field illumination image are obtained; the original image is decomposed into the frequency domain and each frequency band according to the wavelet basis and the decomposition level, each frequency band is decomposed into multiple different feature domains, and the required fusion coefficients are selected for each component in each frequency band and fused separately to obtain an updated feature domain set, the image is reconstructed layer by layer through inverse wavelet transform, and the fused image is output.
[0051] Specific:
[0052] The detection device comprises a housing, a light source and an image acquisition component.
[0053] In order to achieve better adaptation between the acquisition equipment and the production line, the housing 100 is designed to be liftable, and the specific lifting structure type is not limited.
[0054] After the first light source and the second light source are arranged, the best shooting effects are achieved respectively, wherein:
[0055] The first light source is a coaxial light source 210, which is located directly above the platform where the lens 400 is located and is used for bright field illumination;
[0056] The second light source is a bar light source 220, which includes at least two light sources arranged on both sides of the platform where the lens 400 is located and can be lit separately, and is used for dark field lighting.
[0057] In this embodiment, the structure of the detection device is:
[0058] The housing 100 includes an upper housing and a lower housing arranged in a vertical direction, and a cavity for accommodating the upper housing is provided in the lower housing.
[0059] A vertically arranged rack 820 is provided on the side of the upper shell, and a cavity for accommodating the rack is provided at a corresponding position on the side of the lower shell. The gear rack 830 is connected to the outer edge of the lower shell, the gear 821 in the gear rack 830 is meshed with the rack 820, and the hand wheel 810 is connected to the gear 821 through a transmission shaft.
[0060] In this embodiment, a hand wheel 810 is used to drive the gear 821 to rotate and drive the rack 820, and then the rack 820 drives the upper shell to achieve lifting movement relative to the lower shell, changing the height of the coaxial light source relative to the lens 400, so that the camera and the coaxial light source 210 can be adjusted to the corresponding bright field according to the detection requirements, specifically, they can move from the starting point of the rack to the end point of the rack, a total of 0.5m.
[0061] A locking device is provided on the gear rack 830 to fix the gear so that it does not rotate after the height adjustment is completed. The locking device does not limit the specific structural type.
[0062] The gear rack 830 is not limited to a specific structural type, as long as it meets the requirements of dust prevention, oil storage, etc.
[0063] A knob 520 is provided on the side of the lower shell. The knob 520 has a dial. The dial is connected to the lower shell through a first clamp 101. The knob 520 is connected to the strip light source 220 through a second clamp 102. The angle of the strip light source 220 relative to the horizontal plane is changed by rotating the knob 520 and displayed through the dial.
[0064] In this embodiment, the knob 520 is used to adjust the angle of the strip light source 220 to change the angle between the irradiation direction of the strip light source 220 and the optical axis of the camera lens to obtain a dark field image that meets the detection requirements.
[0065] In this embodiment, the strip light source 220 has two groups, and the angles can be adjusted separately to meet different needs. The dial is used to read the angle data. The second clamp 102 can lock the position of the knob 520 after the adjustment is completed. The structure required for the locking function is not limited, and any known structure can be used.
[0066] The image acquisition module may be a camera 310 and a lens 320 . The camera 310 is located above the light source 210 and is coaxially arranged with the light source 210 . The outer diameter of the camera 310 is ≤ the size of the light source 210 . The lens 320 is mounted on the camera 310 .
[0067] In this embodiment, the camera 310 takes pictures of the lens 400 respectively when two light sources are separately turned on in sequence, and multiple images of the lens 400 under different lighting modes can be obtained.
[0068] The image processing system built into the processor combines multiple images of the lens 400 into an image with high information. The image synthesized from multiple images has richer information than the image obtained by one lighting method, and can comprehensively detect scratches, scars, and concave and convex defects on the lens.
[0069] The housing 100 forms a box body 600 for accommodating the image acquisition component and the processor 700 . One side of the box body 600 is provided with a movably connected box door, which is movably connected to the box body.
[0070] The coaxial light source 210 and the bar light source 220 are connected to the side wall of the box through the support member 510 .
[0071] The above structure can be provided with a transparent plate on the side of the box close to the operator, through which the state of the light source can be observed, and the outer shell can remove the interference of external light on the detection process, thereby ensuring the reliability of the device.
[0072] The knob can be equipped with a dial to display and help the user record the lifting and rotating dimensions, which is conducive to the standardization of defect detection operations.
[0073] Embodiment 2:
[0074] like Figure 3 -5, the imaging method required for lens defect detection using the above device is as follows, including the following steps:
[0075] Lighting up the first light source and the second light source respectively, obtaining a bright field illumination image and a dark field illumination image under corresponding conditions as original images;
[0076] Perform wavelet decomposition on the original image, decompose the original image into the frequency domain and each frequency band according to the wavelet basis and decomposition level, and each frequency band is decomposed into at least 4 different feature domains, specifically low-frequency components and high-frequency components in three directions (horizontal, vertical, and diagonal);
[0077] Each component on each frequency band is fused according to different rules (i.e., fusion coefficients are selected here) to obtain a new feature domain set;
[0078] The image is reconstructed layer by layer through inverse wavelet transform, and finally a fused image is obtained.
[0079] Specific:
[0080] Step 1: Place or transfer the lens to be inspected to the inspection platform according to the application scenario, and control the camera to obtain two images with different lighting methods;
[0081] Step 2: The control system is equipped with an image processing algorithm, which can fuse the two images using a wavelet fusion algorithm;
[0082] Step 3: Output the fused image and save it, completing a cycle.
[0083] The specific contents of the preparation work for the image acquisition process in step 1 are as follows:
[0084] Adjust the lens according to the detection requirements, arrange the light source according to the lighting method required for the detection, turn the hand wheel to adjust the position of the coaxial light source 210 for bright field lighting; turn the knob to adjust the angle of the strip light source 220 for dark field lighting; the processor 700 is connected to the control device, and the control device is used to preset specific illumination values to control the brightness of the light source and the acquisition of the image.
[0085] The specific contents of the fusion coefficient selection after wavelet decomposition of the image during the fusion process are as follows:
[0086] FIG. 5( a ) is an image captured by using strip light dark field illumination (i.e., after the strip light source 220 is turned on), and FIG. 5( b ) is an image captured by the device using coaxial bright field illumination. Assume that f i Represents the coefficient of the fused image, f A and f B Represent the coefficients of the two images to be stitched, then:
[0087] When performing the fusion operation, the low-frequency coefficients of the wavelet decomposed images A and B are fused based on the regional energy rule;
[0088] For high-frequency subband image coefficients, such as Figure 3 As shown in the figure, a local entropy operator is used, and the local sliding window uses a circular sliding window, which is divided into three layers. The entropy value of each layer is calculated according to the entropy value definition (the entropy value indicates the amount of information contained, reflecting the richness of image information), and the weight is calculated and weighted according to the Gaussian distribution, and the area with a large entropy value is selected as the fused area. It is more appropriate to move the sliding window two pixels each time. I(i,j) is the pixel value of the image pixel point (i,j), and the entropy value calculation formula is as follows:
[0089]
[0090] Among them, p n (I(i,j)) is the probability of pixel value I(i,j) appearing in each layer, and the calculation formula is:
[0091]
[0092] Among them, N I (i, j) is the number of pixel values at point (i, j), E(x 0 ,y 0 ) is the image entropy value, I(i,j) is the pixel value of the image pixel (i,j), p n(I(i,j)) is the probability of pixel value I(i,j) appearing in each layer, n is the number of layers where pixel value I(i,j) is located, N I (i, j) is the number of times the pixel value of point I (i, j) appears in its corresponding layer, N n (i,j) is the number of pixels in the layer where point i(i,j) is located.
[0093] The above-mentioned method is used to fuse images AB, and finally the result shown in Figure 5(c) is generated. It can be found that the image effect is good and can show multiple types of defects under different lighting effects.
[0094] Using entropy as an indicator of image quality evaluation can reflect the richness of information contained in the image, and the result is reliable. At the same time, the calculation of entropy is relatively simple, making the calculation convenient.
[0095] The fusion method adopted is the local entropy operator algorithm of the circular sliding window. The circular sliding window makes the influence of each point in the sliding window on the central point closer, and the result is more accurate.
[0096] In summary, the above detection device can comprehensively detect scratches, scars, and concave-convex defects of the lens with high detection accuracy and guaranteed reliability.
[0097] At least two independent light sources are used for lighting. The camera takes pictures of the lens separately when each light source is illuminated separately in turn. Multiple lens images under different lighting methods can be obtained. The multiple lens images are combined into an image with high information. Compared with the image obtained by one lighting method, more comprehensive information can be obtained, thereby improving the efficiency of subsequent image detection steps.
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A lens defect detection device, characterized in that: include: An image acquisition component arranged inside the housing and a processor connected thereto, the image acquisition component comprising a first light source located directly above the detection platform, a second light source arranged on both sides of the detection platform and capable of being lit separately, and an image acquisition module coaxially connected to the first light source, the image acquisition module acquires different types of images under different light source conditions and sends them to the processor; the processor receives different types of images sent by the image acquisition module and outputs them after fusion, and displays all defects of the lens on the output image; The image acquisition module comprises a camera and a lens, wherein the camera is located above the first light source and is coaxially arranged with the first light source; The image acquisition module obtains the image of the lens to be tested and sends it to the processor when the two light sources are lit separately in sequence according to the detection requirements; Select the desired fusion coefficient, specifically: For the low-frequency components of the image, the low-frequency coefficients of the image after wavelet decomposition are fused based on the regional energy rule; For the high-frequency components of the image, a local entropy operator is used for each component in each frequency band. The local sliding window uses a circular sliding window, which is divided into three layers. The entropy value of each layer is calculated according to the entropy value definition, and the weight is calculated and weighted according to the Gaussian distribution. The area with the entropy value that meets the requirements is selected as the fused area. The entropy value calculation formula is as follows: Among them, p n (I(i,j)) is the probability of pixel value I(i,j) appearing in each layer, and the calculation formula is: Among them, N I (i, j) is the number of occurrences of the pixel value of point (i, j), E(x0, y0) is the image entropy value, I(i, j) is the pixel value of the image pixel point (i, j), p n (I(i,j)) is the probability of pixel value I(i,j) appearing in each layer, n is the number of layers where pixel value I(i,j) is located, N I (i, j) is the number of times the pixel value of point I (i, j) appears in its corresponding layer, N n (i,j) is the number of pixels in the layer where point i(i,j) is located.
2. A lens defect detection device as claimed in claim 1, characterized in that: The first light source is a coaxial light source, which is located directly above the detection platform and provides the light source required for bright field illumination.
3. A lens defect detection device as claimed in claim 1, characterized in that: The second light source is a bar light source, including at least two light sources arranged on both sides of the detection platform and capable of being lit separately, providing the light source required for dark field illumination.
4. A lens defect detection device as claimed in claim 1, characterized in that: The height of the first light source relative to the lens to be tested is changed by a hand wheel to obtain a bright field image that meets the testing requirements.
5. A lens defect detection device as claimed in claim 1, characterized in that: The angle between the irradiation direction of the second light source and the axis of the image acquisition module is changed by the knob to obtain a dark field image that meets the detection requirements.
6. A method for realizing imaging based on the lens defect detection device according to any one of claims 1 to 5, characterized in that: The following steps are involved: Lighting up the first light source and the second light source respectively, obtaining a bright field illumination image and a dark field illumination image under corresponding conditions as original images; Wavelet decomposition of the original image: decomposing the original image into the frequency domain and each frequency band according to the wavelet basis and decomposition level, and decomposing each frequency band into multiple different feature domains; Select the required fusion coefficients for each component on each frequency band and fuse them separately to obtain an updated feature domain set; Based on the updated feature domain set, the image is reconstructed layer by layer through inverse wavelet transform and the fused image is output.
7. The imaging method according to claim 6, characterized in that: Each frequency band is decomposed into multiple different characteristic domains, specifically: low-frequency components, high-frequency components in horizontal, vertical and diagonal directions.
Citation Information
Patent Citations
Battery appearance defect detection system and method
CN113092489A