[go: up one dir, main page]

CN114286078B - Camera module lens appearance inspection method and equipment - Google Patents

Camera module lens appearance inspection method and equipment Download PDF

Info

Publication number
CN114286078B
CN114286078B CN202011039123.8A CN202011039123A CN114286078B CN 114286078 B CN114286078 B CN 114286078B CN 202011039123 A CN202011039123 A CN 202011039123A CN 114286078 B CN114286078 B CN 114286078B
Authority
CN
China
Prior art keywords
camera
lens
light source
shooting point
shallow depth
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.)
Active
Application number
CN202011039123.8A
Other languages
Chinese (zh)
Other versions
CN114286078A (en
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.)
Hefei Sineva Intelligent Machine Co Ltd
Original Assignee
Hefei Sineva Intelligent Machine 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 Hefei Sineva Intelligent Machine Co Ltd filed Critical Hefei Sineva Intelligent Machine Co Ltd
Priority to CN202011039123.8A priority Critical patent/CN114286078B/en
Publication of CN114286078A publication Critical patent/CN114286078A/en
Application granted granted Critical
Publication of CN114286078B publication Critical patent/CN114286078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

本发明涉及摄像头模组镜片外观检查技术领域,公开了一种摄像头模组镜片外观检查方法及设备,该方法包括将相机的浅景深镜头调整至设定位置;控制相机向靠近待测产品的方向匀速移动设定行程,设定行程内设有多个预设的拍摄点,相机在各个预设的拍摄点拍摄图像,通过预设算法将浅景深镜头在除首个拍摄点之外的任一拍摄点获取的图像与在该拍摄点的上一个拍摄点获取的图像进行清晰度最大值和清晰度最大值所在的聚焦层的比对,生成融合图像;当最后一个拍摄点的融合图像生成后,进入主检测流程,分析所有检测到的缺陷所处的聚焦层;上报检测结果。此方法能够减少工控机的计算压力,提高产线的产能;且浅景深镜头能够保证缺陷图像的清晰度。

The present invention relates to the technical field of camera module lens appearance inspection, and discloses a camera module lens appearance inspection method and equipment, the method comprising adjusting a shallow depth of field lens of a camera to a set position; controlling the camera to uniformly move a set stroke in a direction close to a product to be tested, wherein a plurality of preset shooting points are provided within the set stroke, the camera shoots images at each preset shooting point, and the image acquired by the shallow depth of field lens at any shooting point other than the first shooting point is compared with the image acquired at the previous shooting point of the shooting point by a preset algorithm in terms of the maximum clarity and the focus layer where the maximum clarity is located, to generate a fused image; when the fused image of the last shooting point is generated, the main detection process is entered to analyze the focus layers where all detected defects are located; and the detection results are reported. This method can reduce the computing pressure of an industrial computer and improve the production capacity of a production line; and the shallow depth of field lens can ensure the clarity of defect images.

Description

Method and equipment for checking appearance of lens of camera module
Technical Field
The invention relates to the technical field of appearance inspection of camera module lenses, in particular to a method and equipment for appearance inspection of camera module lenses.
Background
At present, on the assembly production line of most of domestic camera modules, a method for manually detecting appearance defects of lenses is also used, a great deal of labor force is consumed, and meanwhile, the accuracy of detection results cannot be guaranteed. There are two few schemes for detecting the appearance of a lens by using industrial vision technology:
firstly, a large depth lens is used for collecting a light-passing hole image and then detecting, secondly, a shallow depth lens is used for collecting a plurality of light-passing hole images on different focusing surfaces, then the images are detected one by one, and finally the detection results are summarized.
However, the first method has the defects that the height difference between the end surface and the inner part of the light-passing hole can reach 10mm, and the large-depth view lens is difficult to clearly shoot each height layer, so that the detection result is inaccurate, and the second method has the defects that each image is required to be detected one by one, so that the redundancy of the detection mode is caused, calculation pressure is brought to the detection industrial personal computer, the detection time is long, and the productivity of the production line is reduced.
Disclosure of Invention
The invention provides a camera module lens appearance inspection method and equipment, wherein the camera module lens appearance inspection method can ensure the definition of a defect image, reduce the calculation pressure of an industrial personal computer, shorten the compression detection time and improve the productivity of a production line.
In order to achieve the above purpose, the present invention provides the following technical solutions:
A method for checking the appearance of a lens of a camera module comprises the following steps of adjusting a shallow depth of field lens of a camera to a set position, controlling the camera to move at a constant speed to a set stroke in a direction close to a product to be tested, arranging a plurality of preset shooting points in the set stroke, shooting images at all preset shooting points by the camera, comparing an image acquired by the shallow depth of field lens at any shooting point except the first shooting point with a focusing layer at which a definition maximum value is located by an image acquired by the last shooting point through a preset algorithm to generate a fused image, entering a main detection flow after the fused image of the last shooting point is generated, analyzing the focusing layers at which all detected defects are located, and reporting a detection result.
According to the visual inspection method for the lens of the camera module, as the shallow depth lens of the camera shoots the product to be detected at each shooting point, the preset algorithm synchronously fuses the shot images, and only after the shooting of the last shooting point is completed, a unique primary detection algorithm flow is carried out.
The method for the simultaneous shooting and simultaneous fusion can reduce the calculation pressure of an industrial personal computer, shorten the compression detection time, improve the productivity of a production line, and ensure the definition of a defect image due to the fact that a camera is provided with a shallow depth lens, thereby ensuring the accuracy of a detection result.
Optionally, adjusting the shallow depth lens of the camera to a set position includes adjusting a center of a through hole of the first light source, a center of the shallow depth lens, and a center of a light passing hole of the product to be measured to be coaxial, and ensuring that the second light source and the third light source are respectively located at two sides of the product to be measured.
Optionally, except the first shooting point, the image is shot at any other shooting point to generate a fused image, wherein the fused image comprises the steps of recording the definition value of each pixel in the image acquired by the corresponding shooting point, comparing the definition value of each pixel with the definition value of the maximum definition value graph corresponding to the last shooting point, enabling each pixel to select a larger definition value in two pictures, fusing the pixels with the selected maximum definition values to form a maximum definition value graph corresponding to the shooting point, and recording a focusing layer where the definition maximum value of each pixel is located according to the formed maximum definition value graph corresponding to the shooting point to form a mark graph corresponding to the shooting point.
Optionally, after analyzing the focusing layers where all the detected defects are located and before reporting the detection results, the main detection flow keeps the defects on each layer of lenses of the light passing holes and filters the defects on the surface of the protective film.
The main detection process comprises the steps of automatically dividing non-concentric circular areas by using a circular gradient method when detecting a light-passing hole lens, detecting defects of different areas by using different parameters, detecting low-contrast defects by using a circular area dynamic threshold segmentation method, extracting the defects by using a deeplab v & lt3+ & gt semantic segmentation model when detecting an end face, calculating the size, average gray level and contrast information of each area, and further judging the defects by using a support vector machine.
A camera module lens appearance inspection device of a camera module lens appearance inspection method comprises a frame, a camera, a first light source, a second light source, a third light source, a lifting adjusting mechanism and an industrial personal computer, wherein the frame is provided with a positioning mechanism used for positioning a product to be inspected, the camera is arranged on the frame through the lifting mechanism so that the camera can move along a first direction relative to the frame for a set stroke, the camera is provided with a shallow depth lens, the center of a through hole of the first light source and the center of the shallow depth lens are coaxially arranged, the axis extends along the first direction, the second light source and the third light source are respectively positioned at two sides of the product to be inspected along a second direction perpendicular to the first direction, and the industrial personal computer is used for carrying out algorithm processing on images acquired by the shallow depth lens.
Optionally, the camera is a high-frame-rate industrial camera, the first light source is a sorghum stroboscopic dome light source, the second light source and the third light source are light supplementing strip light sources, the industrial personal computer is provided with a first module and a second module, the first module is used for storing a maximum definition map, and the second module is used for storing a marker map.
Drawings
FIG. 1 is a flowchart illustrating a method for inspecting the appearance of a lens of a camera module according to an embodiment of the present invention;
FIG. 2 is a flowchart showing specific steps of a fused image in a method for inspecting the appearance of a lens of a camera module according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a camera module lens appearance inspection device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The method for checking the appearance of the lens of the camera module comprises the following steps of adjusting a shallow depth of field lens of a camera to a set position, controlling the camera to move at a constant speed to a direction close to a product to be tested for a set stroke, arranging a plurality of preset shooting points in the set stroke, shooting images at all preset shooting points by the camera, wherein an image obtained by the shallow depth of field lens at any shooting point except a first shooting point is compared with a focusing layer where a definition maximum value and a definition maximum value are located by an image obtained by the last shooting point through a preset algorithm to generate a fusion image, after the fusion image of the last shooting point is generated, entering a main detection flow by the algorithm, analyzing the focusing layers where all detected defects are located, and reporting a detection result.
Fig. 1 is an overall flowchart of a method for inspecting the appearance of a lens of a camera module according to an embodiment of the present invention, and referring to fig. 1, in the method for inspecting the appearance of a lens of a camera module according to the embodiment, as a shallow depth lens of a camera photographs a product to be inspected at each photographing point, a preset algorithm synchronously performs a fusion operation on photographed images, and only after the last photographing point completes photographing an image, a unique primary detection algorithm flow is performed.
The method for simultaneous shooting and simultaneous fusion can reduce the calculation pressure of an industrial personal computer, shorten the time consumption of compression detection and improve the productivity of a production line, and in addition, the camera is provided with a shallow depth lens, so that the definition of a defect image can be ensured, and the accuracy of a detection result is ensured.
The camera can select microsecond exposure time to ensure that images shot by the camera in the moving process are free of smear.
As an alternative embodiment, the adjustment of the shallow depth lens of the camera to the set position includes adjusting the center of the through hole of the first light source, the center of the shallow depth lens and the center of the light passing hole of the product to be measured to be coaxial, and ensuring that the second light source and the third light source are respectively located at two sides of the product to be measured.
In this embodiment, when reaching a shooting point, the motion control card simultaneously sends trigger signals to the first light source, the second light source, the third light source and the camera, the camera collects images after the three light sources are all lightened, and after the image collection is completed, the three light sources are extinguished, and then image fusion is performed through an algorithm.
The first light source, the second light source and the third light source can be high-brightness high-speed stroboscopic light sources, so that the camera can capture images with enough brightness under the condition of low exposure time.
Fig. 2 is a flowchart of specific steps of a fused image in a method for inspecting the appearance of a lens of a camera module, and referring to fig. 2, as an alternative embodiment, the fused image is generated after an image is captured at any other capturing point except for a first capturing point, which includes recording a definition value of each pixel in an image obtained at a corresponding capturing point, comparing the definition value with a definition value of a maximum definition value map corresponding to a last capturing point, selecting a larger definition value in two pictures for each pixel, fusing pixels with the selected maximum definition value to form a maximum definition value map corresponding to the capturing point, and recording a focusing layer where a definition maximum value of each pixel is located according to the formed maximum definition value map corresponding to the capturing point, so as to form a mark map corresponding to the capturing point.
In this embodiment, the previous three shooting points are specifically described as examples, the image shot at the first shooting point is the first image, the image shot at the second shooting point is the second image, and so on.
After the first image is shot, as no more images exist before the first image is shot, the definition value graph of each pixel in the first image is the maximum definition value graph corresponding to the first shooting point, namely the first maximum definition graph;
After the second image is shot, comparing the definition value of each pixel in the second image with the first maximum definition map, and selecting a numerical value with a larger definition value to form a maximum definition map corresponding to a second shooting point, namely a second maximum definition map;
after the third image is shot, comparing the definition value of each pixel in the third image with the definition value of each pixel in the second maximum definition map, and selecting a numerical value with a larger definition value to form a maximum definition map corresponding to a third shooting point, which is called a third maximum definition map;
and the image shooting is finished until the last shooting point, and a maximum definition map and a mark map corresponding to the last shooting point are generated after comparison, namely a final maximum definition map and a final mark map.
The multi-focusing layer images can be fused with high precision by utilizing a pixel-by-pixel multi-line fusion technology.
Referring to fig. 1, as an alternative embodiment, after analyzing the focusing layer where all the detected defects are located, the main detection process retains the defects on each layer of lenses of the light passing hole and filters out the defects on the surface of the protective film before reporting the detection result.
In this embodiment, the interference of the defect of the protective film on the detection result can be eliminated, so that the detected defect of the lens is more accurate.
The main detection flow comprises the steps of automatically dividing non-concentric circular areas by using a circular gradient method when detecting a light-passing hole lens, detecting defects of different areas by using different parameters, detecting low-contrast defects by using a circular area dynamic threshold segmentation method, extracting the defects by using a deeplab v3+ semantic segmentation model when detecting an end face, calculating the size, average gray level and contrast information of each area, and further judging the defects by using a support vector machine.
In this embodiment, due to the polishing mode and the internal lens structure, the images will show non-concentric circular areas with different gray levels, so the circular gradient method is used to automatically divide the non-concentric circular areas, different parameters are used to detect defects in different areas to improve the adaptability of the algorithm, in addition, in order to accurately detect the defects with low contrast and eliminate the interference of camera noise, the dynamic threshold segmentation algorithm of the circular areas is used to greatly improve the detection rate of defects of the lens with the light-transmitting holes, and in addition, due to the existence of textures of the end face with both brightness and darkness and the very low contrast of part of the defects, in order to accurately detect the defects and eliminate the influence of the textures of the end face, the deeplab v3+ semantic segmentation model is used to extract the defects, the size, average gray level and contrast information of each area are calculated, and the defects are further judged by using a support vector machine, so that other interference is filtered.
Fig. 3 is a schematic structural diagram of a camera module lens appearance inspection device provided by an embodiment of the invention, and referring to fig. 3, the embodiment of the invention also provides a camera module lens appearance inspection device of a camera module lens appearance inspection method, which comprises a frame, a camera, a first light source, a second light source, a third light source, a lifting adjustment mechanism and an industrial personal computer, wherein the frame is provided with a positioning mechanism for positioning a product to be tested, the camera is arranged on the frame through the lifting mechanism so that the camera can move along a first direction for a set stroke relative to the frame, the camera is provided with a shallow depth lens, the center of a through hole of the first light source and the center of the shallow depth lens are coaxially arranged, the axis extends along the first direction, the second light source and the third light source are respectively positioned at two sides of the product to be tested along a second direction perpendicular to the first direction, and the industrial personal computer is used for carrying out algorithm processing on images acquired by the shallow depth lens.
In this embodiment, the first direction may be a vertical direction, and the second direction may be a horizontal direction. The lifting adjusting mechanism can control the camera to move at a uniform speed along the vertical direction.
As an alternative embodiment, the camera is a high frame rate industrial camera, the first light source is a sorghum stroboscopic dome light source, the second light source and the third light source are light supplementing strip light sources, and the industrial personal computer is provided with a first module and a second module, wherein the first module is used for storing a maximum definition map, and the second module is used for storing a marking map.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (5)

1. The method for checking the appearance of the lens of the camera module is characterized by comprising the following steps of:
The method comprises the steps of adjusting a shallow depth lens of a camera to a set position, enabling a through hole center of a first light source for highlighting high-speed stroboscopic light, a center of the shallow depth lens and a light passing hole center of a product to be detected to be coaxial, and guaranteeing that a second light source for highlighting high-speed stroboscopic light and a third light source for highlighting high-speed stroboscopic light are respectively located on two sides of the product to be detected;
The camera is controlled to move at a constant speed towards the direction close to the product to be detected, a plurality of preset shooting points are arranged in the setting travel, the camera shoots images at all preset shooting points, wherein the image acquired by the shallow depth lens at any shooting point except the first shooting point is compared with the image acquired at the last shooting point of the shooting point through a preset algorithm, and the definition maximum value and the focusing layer where the definition maximum value are positioned are compared so as to generate a fusion image;
When the fused image of the last shooting point is generated, an algorithm enters a main detection flow to analyze focusing layers where all detected defects are located, wherein when a light passing hole lens is detected, a circular gradient method is used for automatically dividing a non-concentric circular area, and different parameters are used for detecting the defects in different areas;
And reporting the detection result.
2. The method of claim 1, wherein generating a fused image after capturing images at any of the remaining capture points, except for the first capture point, comprises:
Recording the definition value of each pixel in the image acquired by the corresponding shooting point, comparing the definition value of each pixel with the definition value of the maximum definition value graph corresponding to the last shooting point, enabling each pixel to select a larger definition value in two pictures, and fusing the pixels with the selected maximum definition value to form the maximum definition value graph corresponding to the shooting point;
And recording a focusing layer where the definition maximum value of each pixel is positioned according to the formed maximum definition value graph corresponding to the shooting point so as to form a mark graph corresponding to the shooting point.
3. The method for inspecting the appearance of a lens of a camera module according to claim 1, wherein after analyzing the focusing layers where all the detected defects are located and before reporting the detection results, the main detection process retains the defects on each layer of lens of the light passing hole and filters the defects on the surface of the protective film.
4. A camera module lens appearance inspection device suitable for the camera module lens appearance inspection method according to any one of claims 1-3, comprising a frame, a camera, a first light source, a second light source, a third light source, a lifting adjusting mechanism and an industrial personal computer;
the rack is provided with a positioning mechanism for positioning the product to be tested;
The camera is arranged on the stand through a lifting mechanism so that the camera can move along a first direction for a set stroke relative to the stand, and the camera is provided with a shallow depth lens;
The center of the through hole of the first light source and the center of the shallow depth-of-field lens are coaxially arranged, and the axis extends along a first direction;
The second light source and the third light source are respectively positioned at two sides of the product to be tested along a second direction perpendicular to the first direction;
the industrial personal computer is used for carrying out algorithm processing on the image acquired by the shallow depth lens.
5. The camera module lens appearance inspection device of claim 4, wherein the camera is a high frame rate industrial camera;
The first light source is a high-brightness stroboscopic dome light source, and the second light source and the third light source are light supplementing strip light sources;
The industrial personal computer is provided with a first module and a second module, wherein the first module is used for storing the maximum definition map, and the second module is used for storing the mark map.
CN202011039123.8A 2020-09-28 2020-09-28 Camera module lens appearance inspection method and equipment Active CN114286078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011039123.8A CN114286078B (en) 2020-09-28 2020-09-28 Camera module lens appearance inspection method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011039123.8A CN114286078B (en) 2020-09-28 2020-09-28 Camera module lens appearance inspection method and equipment

Publications (2)

Publication Number Publication Date
CN114286078A CN114286078A (en) 2022-04-05
CN114286078B true CN114286078B (en) 2024-12-20

Family

ID=80867898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011039123.8A Active CN114286078B (en) 2020-09-28 2020-09-28 Camera module lens appearance inspection method and equipment

Country Status (1)

Country Link
CN (1) CN114286078B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115950897A (en) * 2022-12-22 2023-04-11 惠州帆声智创科技有限公司 Cambered surface lens product appearance detection device and detection method
CN116819857A (en) * 2023-08-22 2023-09-29 苏州默然光电科技有限公司 Lighting unit, visual detection system and method thereof

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542545A (en) * 2010-12-24 2012-07-04 方正国际软件(北京)有限公司 Multi-focal length photo fusion method and system and photographing device
CN109814288A (en) * 2019-02-19 2019-05-28 武汉精立电子技术有限公司 A kind of method and system of automatic detection panel backlight
CN111256616A (en) * 2020-03-30 2020-06-09 阳宇春 Metering-level 3D super-depth-of-field microscopic system and detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740260B (en) * 2019-10-24 2023-04-07 深圳传音控股股份有限公司 Shooting method and device and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542545A (en) * 2010-12-24 2012-07-04 方正国际软件(北京)有限公司 Multi-focal length photo fusion method and system and photographing device
CN109814288A (en) * 2019-02-19 2019-05-28 武汉精立电子技术有限公司 A kind of method and system of automatic detection panel backlight
CN111256616A (en) * 2020-03-30 2020-06-09 阳宇春 Metering-level 3D super-depth-of-field microscopic system and detection method

Also Published As

Publication number Publication date
CN114286078A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN110596132A (en) A system suitable for industrial image inspection
CN111062961A (en) Contact lens edge defect detection method based on deep learning
TW201337839A (en) Segmentation for wafer inspection
CN103630544B (en) A kind of vision on-line detecting system
CN105812790B (en) Method for evaluating verticality between photosensitive surface and optical axis of image sensor and optical test card
CN116912475B (en) Display screen foreign matter detection method and device, electronic equipment and storage medium
CN112200790B (en) Cloth defect detection method, device and medium
CN114286078B (en) Camera module lens appearance inspection method and equipment
CN108550160B (en) Non-uniform light bar characteristic region extraction method based on light intensity template
CN110082360A (en) A kind of sequence optical element surface on-line detection device of defects and method based on array camera
CN118882520B (en) A three-dimensional detection device and method for surface defects of large-aperture curved optical elements
CN114219758A (en) Defect detection method, system, electronic device and computer readable storage medium
CN111103309A (en) Method for detecting flaws of transparent material object
TWI512284B (en) Bubble inspection system for glass
CN114897821A (en) Height detection method for probe card probe relative test platform
CN110333248A (en) The differentiating method of glass surface defects and surface dust fall
CN116297474A (en) A paint surface defect detection and location method based on phase measurement deflection
CN112798608B (en) Optical detection device and optical detection method for side wall of inner cavity of mobile phone camera support
CN110044918A (en) Automobile rearview mirror pimple detection method
CN119756230B (en) An automatic recognition and positioning method based on machine vision binocular measurement system
CN112964179B (en) Linewidth measurement error compensation method for CD measuring machine
CN120471914B (en) Screen arc edge area defect detection system and method based on area array camera mobile device
CN116523882B (en) Vision-based optical target area accuracy detection method and system
CN114119556B (en) An automatic detection method for the quality of laser repair of surface defects of fused quartz components
Li et al. A stereo optical comparison method for detection of metallic surface defects based on machine vision and laser triangulation

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 230013 Southwest District of Hefei City, Anhui Province

Applicant after: Hefei xinyihua Intelligent Machine Co.,Ltd.

Address before: 230013 Southwest District of Hefei City, Anhui Province

Applicant before: HEFEI SINEVA INTELLIGENT MACHINE Co.,Ltd.

GR01 Patent grant
GR01 Patent grant