CN111678673A - Lens detection method, lens detection device and readable storage medium - Google Patents

Lens detection method, lens detection device and readable storage medium Download PDF

Info

Publication number
CN111678673A
CN111678673A CN202010449962.0A CN202010449962A CN111678673A CN 111678673 A CN111678673 A CN 111678673A CN 202010449962 A CN202010449962 A CN 202010449962A CN 111678673 A CN111678673 A CN 111678673A
Authority
CN
China
Prior art keywords
image
lens
sub
determining
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010449962.0A
Other languages
Chinese (zh)
Inventor
赵团伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Optical Technology Co Ltd
Original Assignee
Goertek Optical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Optical Technology Co Ltd filed Critical Goertek Optical Technology Co Ltd
Priority to CN202010449962.0A priority Critical patent/CN111678673A/en
Publication of CN111678673A publication Critical patent/CN111678673A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties
    • G01M11/0242Testing optical properties by measuring geometrical properties or aberrations
    • G01M11/0278Detecting defects of the object to be tested, e.g. scratches or dust
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a lens detection method, which comprises the following steps: acquiring a first image of a lens to be detected; determining a binary image corresponding to the lens to be detected according to the first image; and determining the characteristic parameters of the dirty area of the lens to be detected according to the image characteristic parameters of the binary image. The invention also discloses a lens detection device and a readable storage medium. The invention aims to improve the accuracy of the dirt detection of the lens.

Description

Lens detection method, lens detection device and readable storage medium
Technical Field
The present invention relates to the field of lens technologies, and in particular, to a lens detection method, a lens detection apparatus, and a readable storage medium.
Background
Lenses, particularly optical lenses, are widely used in our daily lives. In order to ensure the quality of the lens, it is generally subjected to a contamination test after production to ensure its performance.
Currently, the smudging test of the lens is generally realized by manpower, and whether the surface of the lens is smudged or not is observed by naked human eyes. Because the identification degree of human eyes has limitation, some dirt can not be observed by human eyes, even the dirt can be observed by human eyes theoretically, the dirt on the lens can not be ensured to be found due to the limitation of various uncertain factors such as environmental conditions (such as insufficient brightness and the like) and eye fatigue. Therefore, the current lens detection method cannot guarantee that all dirt on the lens can be effectively detected, and serious missing detection risks exist.
Disclosure of Invention
The invention mainly aims to provide a lens detection method, aiming at improving the accuracy of lens smudging detection.
In order to achieve the above object, the present invention provides a lens inspection method, including the steps of:
acquiring a first image of a lens to be detected;
determining a binary image corresponding to the lens to be detected according to the first image;
and determining the characteristic parameters of the dirty area of the lens to be detected according to the image characteristic parameters of the binary image.
Optionally, the step of determining a binarized image corresponding to the lens to be tested according to the first image includes:
extracting an image of the lens to be detected from the first image as a target image;
and carrying out binarization processing on the target image to obtain the binarized image.
Optionally, the step of performing binarization processing on the target image to obtain the binarized image includes:
segmenting the target image into a plurality of first sub-images;
carrying out binarization processing on the first sub-image to obtain a second sub-image;
and merging the second sub-images according to the segmentation mode of the first sub-images to obtain the binary image.
Optionally, the step of performing binarization processing on the first sub-image to obtain a second sub-image includes:
determining the mean value and the standard deviation of the gray values of all pixels in the first sub-image;
determining a gray threshold according to the average value, the standard deviation and an adjusting parameter corresponding to the first sub-image;
and carrying out binarization processing on the first sub-image based on the gray threshold value to obtain a second sub-image.
Optionally, before the step of determining the gray scale threshold according to the average value, the standard deviation and the adjustment parameter corresponding to the first sub-image, the method further includes
And determining the adjusting parameter according to the standard deviation.
Optionally, the step of segmenting the target image into a plurality of first sub-images comprises:
determining a first characteristic parameter of image segmentation according to the target image;
and segmenting the target image based on the first characteristic parameter to form a plurality of first sub-images.
Optionally, when the lens to be measured is circular, the step of determining a first characteristic parameter of image segmentation according to the target image includes:
determining a center and a radius of the target image;
and taking a second characteristic parameter related to the center, the radius and the area size as the first characteristic parameter.
Optionally, before the step of performing binarization processing on the target image to obtain the binarized image, the method further includes:
and carrying out contrast improvement processing on the target image.
Optionally, the step of determining the characteristic parameter of the dirty area of the lens to be tested according to the image characteristic parameter of the binarized image includes:
analyzing a connected region of the binary image to obtain the image characteristic parameters;
and determining the characteristic parameters of the dirty area of the lens to be detected according to the image characteristic parameters.
In addition, in order to achieve the above object, the present application also proposes a lens inspection device including: a memory, a processor and a lens inspection program stored on the memory and executable on the processor, the processor being connected to the camera, the lens inspection program when executed by the processor implementing the steps of the lens inspection method as claimed in any one of the above.
In addition, in order to achieve the above object, the present application also proposes a readable storage medium having stored thereon a lens detection program which, when executed by a processor, implements the steps of the lens detection method according to any one of the above.
The invention provides a lens detection method, which comprises the steps of obtaining a first image of a lens to be detected, determining a binary image corresponding to the lens to be detected according to the first image, and determining a characteristic parameter of a region where the lens to be detected is dirty according to an image characteristic parameter of the binary image. This process need not artifical the participation, carry out the binarization with the image of the lens that awaits measuring, the binarization image can be with dirty region in the lens and the no dirty region respectively through having the grey scale of obvious difference and characterize, carry out image analysis to the binarization image and realize the discernment to dirty region in the lens that awaits measuring to the realization is to all dirties on the lens, especially the dirties that people's eye can not observe, carries out effective detection, avoids the influence of factors such as people's eye, environment, effectively improves the dirty accuracy that detects of lens.
Drawings
FIG. 1 is a schematic structural diagram of a hardware operating environment related to a lens inspection apparatus according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a lens inspection method according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of another embodiment of a lens inspection method according to the present invention;
FIG. 4 is a detailed flowchart of step S222 in FIG. 3;
FIG. 5 is a schematic flow chart of another embodiment of a lens inspection method according to the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: acquiring a first image of a lens to be detected; determining a binary image corresponding to the lens to be detected according to the first image; and determining the characteristic parameters of the dirty area of the lens to be detected according to the image characteristic parameters of the binary image.
In the prior art, the dirt of the lens is detected in a manual mode, some dirt cannot be observed, the detection result is influenced by human eyes, environment and other factors, and serious missing detection and false detection conditions exist.
The invention provides a solution, aiming at improving the accuracy of the dirt detection of a lens.
The embodiment of the invention provides a lens detection device which is mainly used for detecting dirt of a lens, in particular an optical lens. In other embodiments, the method can also be applied to dirt detection of other non-optical lenses as required.
As shown in fig. 1, the lens detecting apparatus may include: a processor 1001, such as a CPU, a memory 1002, and a camera 1003. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
The memory 1002 and the camera 1003 are both connected to the processor 1001. The camera 1003 is used for acquiring an image of the lens to be measured. The processor 1001 may acquire and process image data acquired by the camera 1003.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a lens sensing program may be included in the memory 1002 as a readable storage medium. The processor 1001 may be configured to call the lens inspection program stored in the memory 1002 and execute the step operations in any embodiment of the lens inspection method.
The embodiment of the invention also provides a lens detection method which is mainly used for detecting the dirt of the lens, especially the optical lens. In other embodiments, the method can also be applied to dirt detection of other non-optical lenses as required.
In one embodiment, referring to fig. 2, the lens inspection method includes:
step S10, acquiring a first image of the lens to be measured;
the lens to be detected is a lens needing dirt detection. In this embodiment, the lens to be detected is specifically an optical lens that needs to be subjected to contamination detection. And when the optical lens meets the test requirement, taking the optical lens as the lens to be tested. In particular, when the optical lens is placed on a uniformly light emitting substrate, the lens may be considered to meet the test requirements.
Covering the shooting range of the camera on the area of the lens to be measured, and acquiring image data acquired by the camera to obtain a first image. The first image specifically includes images of the lens to be measured and the substrate on which the lens is located.
Step S20, determining a binary image corresponding to the lens to be tested according to the first image;
and converting the image of the lens to be detected in the first image into only two gray values to obtain a binary image corresponding to the lens to be detected. Specifically, the first image can be directly binarized, and the image of the lens part to be measured is extracted from the obtained image to obtain a binarized image; and after the first image is optimized, extracting the image of the lens to be detected and carrying out binarization to obtain a binarization image corresponding to the lens to be detected.
And step S30, determining the characteristic parameters of the dirty area of the lens to be measured according to the image characteristic parameters of the binary image.
Since the binarized image has only pixels of two gray values. Therefore, the dirty area and the non-dirty area of the lens to be measured are respectively represented by pixels with different gray values in the binary image. Based on the analysis, the image characteristic parameters (such as distribution, quantity, position and the like of pixel points corresponding to different gray values) of the binary image are analyzed, and the characteristic parameters (such as shape, position, area and the like) of the dirty area in the lens to be measured can be determined according to the analysis result. Different image characteristic parameters correspond to characteristic parameters representing different dirty regions.
Specifically, step S30 may include: and analyzing the connected region of the binary image to obtain the image characteristic parameters, and determining the characteristic parameters of the region where the to-be-measured lens is dirty according to the obtained image characteristic parameters. And detecting a connected region of the binary image to obtain the size, position, shape and the like of the connected region, and converting the size, position, shape and the like into characteristic parameters of the region where the to-be-detected lens is polluted.
In this embodiment, a lens detection method is provided, where a first image of a lens to be detected is obtained, a binarized image corresponding to the lens to be detected is determined according to the first image, and a characteristic parameter of a region where contamination occurs in the lens to be detected is determined according to an image characteristic parameter of the binarized image. This process need not artifical the participation, carry out the binarization with the image of the lens that awaits measuring, the binarization image can be with dirty region in the lens and the no dirty region respectively through having the grey scale of obvious difference and characterize, carry out image analysis to the binarization image and realize the discernment to dirty region in the lens that awaits measuring to the realization is to all dirties on the lens, especially the dirties that people's eye can not observe, carries out effective detection, avoids the influence of factors such as people's eye, environment, effectively improves the dirty accuracy that detects of lens.
Specifically, based on the above embodiments, another embodiment of the lens inspection method of the present application is provided. In the present embodiment, referring to fig. 3, step S20 includes:
step S21, extracting the image of the lens to be measured from the first image as a target image;
specifically, the image of the lens to be detected in the first image can be identified, the image contour of the lens to be detected is determined after the noise reduction processing is performed on the image edge of the lens to be detected, and the first image is cut based on the minimum external rectangular area of the image contour to obtain the image to be processed including the image of the lens to be detected. And taking the image in the image contour of the lens to be detected in the image to be processed as the target image.
And step S22, performing binarization processing on the target image to obtain the binarized image.
And converting the gray values of all pixel points in the target image into a first value or a second value according to a preset rule to obtain a binary image. Specifically, binarization processing can be performed on the target image according to the same preset rule to obtain a binarized image; and carrying out binarization processing on different areas of the target image according to different preset rules to obtain a binarized image.
In order to ensure that the smudges hard to be recognized by human eyes can be accurately represented in the binarized image, so as to further improve the accuracy of the lens smudge detection, before step S20, the target image is processed by improving the contrast, so as to improve the contrast map between different features of the target image, and improve the difference between the smudged region and the non-smudged region in the image, so as to ensure that the smudged region and the non-smudged region of the lens to be detected can be accurately represented in the obtained binarized image, and particularly, the smudged region which cannot be seen by human eyes can be represented in the image.
Specifically, step S22 may include:
step S221, dividing the target image into a plurality of first sub-images;
in particular, the target image may be divided evenly or unevenly into a plurality of first sub-images.
Step S222, carrying out binarization processing on the first sub-image to obtain a second sub-image;
and each first sub-image is converted into a first value or a second value according to a preset rule, and the obtained binary image is used as a second sub-image corresponding to the first sub-image. And the preset rules corresponding to different first sub-images are different.
And step S223, merging the second sub-images according to the dividing mode of the first sub-images to obtain the binary image.
And placing the second sub-image at the position of the corresponding first sub-image to form a binary image corresponding to the target image.
In this embodiment, the image of the lens to be tested is extracted from the first image as the target image, and the binarization processing is performed on the target image to obtain the binarized image, so that it is ensured that the image irrelevant to the lens to be tested in the first image does not need to be subjected to the binarization processing, and the efficiency of the contamination test of the lens to be tested can be improved. The target image is divided into a plurality of first sub-images, and the first sub-images are combined into the binary image of the lens to be detected after being subjected to binarization processing respectively, so that the influence of the non-uniformity of light transmission of the optical lens on the binarization process is avoided, the dirty area and the non-dirty area of the lens to be detected can be accurately represented by the obtained binary image, and the dirt detection accuracy of the optical lens is further improved.
Specifically, in this embodiment, referring to fig. 4, step S222 includes:
step S201, determining the average value and the standard deviation of the gray values of all pixels in the first sub-image;
and acquiring gray values corresponding to all pixels in the first sub-image. Specifically, when the first sub-image includes n pixels, corresponding n gray-scale values may be acquired, and the average value and the standard deviation of the n gray-scale values are calculated.
Step S202, determining a gray threshold according to the average value, the standard deviation and the adjustment parameter corresponding to the first sub-image;
the gray threshold is specifically a reference value for binarization of the pixel points. The different first sub-images correspond to different adjustment parameters. And calculating the gray threshold value through the average value, the standard deviation and the adjusting parameter. Specifically, the gray level threshold may be calculated according to T-M-a-S, where T is the gray level threshold, M is the average value, S is the standard deviation, and a is the adjustment parameter. The resulting gray scale thresholds of the different first sub-images are different.
In order to improve the accuracy of the gray threshold, the adjustment parameter may be specifically set according to the lens characteristic parameters (such as thickness, light transmittance, etc.) at the corresponding position in the lens to be measured corresponding to the first sub-image. In addition, the adjustment parameter can be determined according to the standard deviation corresponding to the first sub-image. Specifically, the standard deviation may be divided into a plurality of value intervals, and the adjustment parameters corresponding to different value intervals are different, wherein the larger the standard deviation is, the larger the corresponding adjustment parameter is. The relationship between the adjustment parameter and the standard deviation can be as follows:
a (adjustment parameters) S (standard deviation)
0 (-∞,2)
1.5 [2,5)
3 [5,+∞)
And step S203, carrying out binarization processing on the first sub-image based on the gray threshold value to obtain a second sub-image.
Specifically, the pixel in the first sub-image with the gray scale value larger than the gray scale threshold is determined as the first pixel, and the pixel in the first sub-image with the gray scale value smaller than the gray scale threshold is determined as the second pixel. And adjusting the gray value of the first pixel to be a first value, and adjusting the gray value of the second pixel to be a second value to obtain a binarized second sub-image. Wherein the first value is different from the second value in value. Specifically, the first value is specifically a maximum gray value 255, and the second value is specifically a minimum gray value 0.
In this embodiment, by the above manner, the method is adaptable to current image characteristics of different first sub-images, determines the grayscale threshold value of the first sub-image as the binarization reference, and independently performs binarization processing on each first sub-image based on different grayscale threshold values, so as to ensure that image characteristics corresponding to a dirty area in the lens to be detected can be accurately represented in the obtained second sub-image even if the lens itself has influences such as light transmission uniformity factors, thereby ensuring that the feature parameters corresponding to the dirty area can be accurately identified based on the binarized image corresponding to the whole lens to be detected, and improving the dirt detection accuracy of the lens to be detected.
Further, based on the above embodiments, another embodiment of the lens inspection method of the present application is provided. In this embodiment, referring to fig. 5, the step S221 includes:
step S221a, determining a first characteristic parameter of image segmentation according to the target image;
different target images correspond to different first characteristic parameters. The first characteristic parameter can be preset, and can also be determined after analysis according to the actual situation of the target image. The first characteristic parameter is a rule parameter for segmenting the target image, and is a reference for segmenting the target image.
Specifically, when the lens to be measured is circular, the center and radius of the target image can be determined; and taking the obtained second characteristic parameters related to the center, the radius and the area size as the first characteristic parameters. The center and the radius can be determined based on the center and the length and the width of the circumscribed rectangle image corresponding to the target image, the center of the circumscribed rectangle image is taken as the center of the target image, and 0.5 times of the shorter length of the length and the width in the circumscribed rectangle image is taken as the radius of the target image. The second characteristic parameter may specifically be a parameter representing a size of an area where each first sub-image is located, and may specifically include a central angle corresponding to the area where each first sub-image is located, a width of the area in the radius direction, and the like, and the specific numerical value may be set according to actual test requirements.
Step S221b, segmenting the target image based on the first feature parameter to form a plurality of first sub-images.
The image area where the target image is located can be segmented into a plurality of sub-areas based on the first characteristic parameter. Each sub-area is the image area in which each first sub-image is located. Specifically, when the lens to be measured is circular, and the first characteristic parameter includes the center, the radius and the characteristic parameter, the obtained center is used as a center of a circle, a circular image area formed by the radius is a target area, the target area is divided into a plurality of sector areas based on a central angle in the characteristic parameter (the central angle of the sector area is the central angle in the characteristic parameter), and then each sector area is further divided into a plurality of sector sub-areas based on a width in the characteristic parameter along the radial direction (the width in the radial direction of the sector sub-area is the width in the characteristic parameter along the radial direction). The image of the target image in each sector-shaped sub-area is then the first sub-image.
In this embodiment, the corresponding first characteristic parameter is determined based on the actual situation of the target image to perform image segmentation on the target image, so that the accuracy of image segmentation can be ensured. The optical characteristics of the round lens generally change from the circle center to the edge in a different manner and adapt to the characteristics of the round lens, the first image parameters for segmenting the target image are determined based on the second characteristic parameters of the center, the radius and the area size of the target image, the image segmentation accuracy can be further improved, and the binary image obtained after the binarization is performed on the plurality of first sub-images obtained by segmentation can accurately represent the dirty area and the non-dirty area without being influenced by the optical characteristic difference of the lens, so that the dirty detection accuracy of the lens is further improved.
In addition, an embodiment of the present invention further provides a readable storage medium, where a lens detection program is stored, and when being executed by a processor, the lens detection program implements the operation steps in any of the above lens detection methods.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (11)

1. A lens inspection method, comprising the steps of:
acquiring a first image of a lens to be detected;
determining a binary image corresponding to the lens to be detected according to the first image;
and determining the characteristic parameters of the dirty area of the lens to be detected according to the image characteristic parameters of the binary image.
2. The lens detection method according to claim 1, wherein the step of determining the binarized image corresponding to the lens to be detected from the first image comprises:
extracting an image of the lens to be detected from the first image as a target image;
and carrying out binarization processing on the target image to obtain the binarized image.
3. The lens detection method according to claim 2, wherein the step of performing binarization processing on the target image to obtain the binarized image comprises:
segmenting the target image into a plurality of first sub-images;
carrying out binarization processing on the first sub-image to obtain a second sub-image;
and merging the second sub-images according to the segmentation mode of the first sub-images to obtain the binary image.
4. The lens inspection method according to claim 3, wherein the step of binarizing the first sub-image to obtain a second sub-image comprises:
determining the mean value and the standard deviation of the gray values of all pixels in the first sub-image;
determining a gray threshold according to the average value, the standard deviation and an adjusting parameter corresponding to the first sub-image;
and carrying out binarization processing on the first sub-image based on the gray threshold value to obtain a second sub-image.
5. The lens inspection method of claim 4, wherein the step of determining a gray scale threshold based on the mean, the standard deviation, and the adjustment parameter corresponding to the first sub-image is preceded by the step of determining a gray scale threshold based on the mean, the standard deviation, and the adjustment parameter corresponding to the first sub-image further comprising
And determining the adjusting parameter according to the standard deviation.
6. The lens inspection method of claim 3, wherein the step of segmenting the target image into a plurality of first sub-images comprises:
determining a first characteristic parameter of image segmentation according to the target image;
and segmenting the target image based on the first characteristic parameter to form a plurality of first sub-images.
7. The lens inspection method according to claim 6, wherein when the lens to be inspected is circular, the step of determining the first characteristic parameter of image segmentation from the target image comprises:
determining a center and a radius of the target image;
and taking a second characteristic parameter related to the center, the radius and the area size as the first characteristic parameter.
8. The lens detection method according to any one of claims 2 to 7, wherein the step of subjecting the target image to binarization processing to obtain the binarized image further comprises, before the step of subjecting the target image to binarization processing:
and carrying out contrast improvement processing on the target image.
9. The lens detection method according to any one of claims 1 to 7, wherein the step of determining the characteristic parameter of the area where contamination occurs in the lens to be tested from the image characteristic parameter of the binarized image comprises:
analyzing a connected region of the binary image to obtain the image characteristic parameters;
and determining the characteristic parameters of the dirty area of the lens to be detected according to the image characteristic parameters.
10. A lens inspection device, comprising: a memory, a processor and a lens inspection program stored on the memory and executable on the processor, the processor being connected to the camera, the lens inspection program when executed by the processor implementing the steps of the lens inspection method of any one of claims 1 to 9.
11. A readable storage medium, characterized in that it has stored thereon a lens inspection program which, when executed by a processor, implements the steps of the lens inspection method according to any one of claims 1 to 9.
CN202010449962.0A 2020-05-25 2020-05-25 Lens detection method, lens detection device and readable storage medium Pending CN111678673A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010449962.0A CN111678673A (en) 2020-05-25 2020-05-25 Lens detection method, lens detection device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010449962.0A CN111678673A (en) 2020-05-25 2020-05-25 Lens detection method, lens detection device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111678673A true CN111678673A (en) 2020-09-18

Family

ID=72453078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010449962.0A Pending CN111678673A (en) 2020-05-25 2020-05-25 Lens detection method, lens detection device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111678673A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309546A (en) * 2023-05-10 2023-06-23 宁德时代新能源科技股份有限公司 Detection method and detection device for vibrating mirror, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103245676A (en) * 2013-03-23 2013-08-14 明基材料有限公司 Optics lens smudge detecting method
CN107271453A (en) * 2017-08-11 2017-10-20 丹阳市雷登智能科技有限公司 The detection method and detection means of eyeglass
CN108288264A (en) * 2017-12-26 2018-07-17 横店集团东磁有限公司 A kind of dirty test method of wide-angle camera module
CN108827979A (en) * 2018-04-23 2018-11-16 东莞高伟光学电子有限公司 A kind of module group lens appearance detecting method
WO2020019352A1 (en) * 2018-07-27 2020-01-30 深圳市大疆创新科技有限公司 Method, device and system for inspecting camera module, and machine readable storage medium
CN110766679A (en) * 2019-10-25 2020-02-07 普联技术有限公司 Lens contamination detection method and device and terminal equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103245676A (en) * 2013-03-23 2013-08-14 明基材料有限公司 Optics lens smudge detecting method
CN107271453A (en) * 2017-08-11 2017-10-20 丹阳市雷登智能科技有限公司 The detection method and detection means of eyeglass
CN108288264A (en) * 2017-12-26 2018-07-17 横店集团东磁有限公司 A kind of dirty test method of wide-angle camera module
CN108827979A (en) * 2018-04-23 2018-11-16 东莞高伟光学电子有限公司 A kind of module group lens appearance detecting method
WO2020019352A1 (en) * 2018-07-27 2020-01-30 深圳市大疆创新科技有限公司 Method, device and system for inspecting camera module, and machine readable storage medium
CN110766679A (en) * 2019-10-25 2020-02-07 普联技术有限公司 Lens contamination detection method and device and terminal equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309546A (en) * 2023-05-10 2023-06-23 宁德时代新能源科技股份有限公司 Detection method and detection device for vibrating mirror, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108460757B (en) Mobile phone TFT-LCD screen Mura defect online automatic detection method
CN115375676A (en) Stainless steel product quality detection method based on image recognition
CN107490582B (en) Assembly line workpiece detection system
CN115018844B (en) Plastic film quality evaluation method based on artificial intelligence
CN114782329A (en) Bearing defect damage degree evaluation method and system based on image processing
CN114519714B (en) Method and system for judging smudgy defect of display screen
CN115063407B (en) Scratch and crack identification method for annular copper gasket
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN108889635B (en) Online visual inspection method for manufacturing defects of ring-pull cans
CN110706224A (en) Optical element weak scratch detection method, system and device based on dark field image
CN115690089A (en) Image enhancement preprocessing method and system for weak defect detection
CN116542975A (en) Defect classification method, device, equipment and medium for glass panel
CN113537037A (en) Pavement disease identification method, system, electronic device and storage medium
CN115661157A (en) Panel circle defect detection method, device, medium, equipment and program product
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN111678673A (en) Lens detection method, lens detection device and readable storage medium
CN116563298B (en) Cross line center sub-pixel detection method based on Gaussian fitting
CN115797314B (en) Method, system, equipment and storage medium for detecting surface defects of parts
CN114937037B (en) Product defect detection method, device and equipment and readable storage medium
CN113554688B (en) O-shaped sealing ring size measurement method based on monocular vision
CN115239663A (en) Method and system for detecting defects of contact lens, electronic device and storage medium
CN112465817B (en) Pavement crack detection method based on directional filter
CN114299092A (en) Fingerprint image humidity evaluation method, device and system
CN115018829A (en) Glass flaw positioning method and device
CN115082379A (en) Activated sludge phase contrast microscopic image floc and filamentous bacterium segmentation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200918

RJ01 Rejection of invention patent application after publication