CN111292344A - Detection method of camera module - Google Patents
Detection method of camera module Download PDFInfo
- Publication number
- CN111292344A CN111292344A CN201811494065.0A CN201811494065A CN111292344A CN 111292344 A CN111292344 A CN 111292344A CN 201811494065 A CN201811494065 A CN 201811494065A CN 111292344 A CN111292344 A CN 111292344A
- Authority
- CN
- China
- Prior art keywords
- camera module
- center
- detection method
- photosensitive element
- contour
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 19
- 230000003287 optical effect Effects 0.000 claims abstract description 25
- 230000001186 cumulative effect Effects 0.000 claims description 8
- 238000005315 distribution function Methods 0.000 claims description 7
- 238000004519 manufacturing process Methods 0.000 claims description 3
- 230000000295 complement effect Effects 0.000 claims description 2
- 239000004065 semiconductor Substances 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 9
- 238000000034 method Methods 0.000 description 5
- 238000009826 distribution Methods 0.000 description 2
- 241001270131 Agaricus moelleri Species 0.000 description 1
- 241000270295 Serpentes Species 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/002—Diagnosis, testing or measuring for television systems or their details for television cameras
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及光学领域,尤其涉及一种摄像模块的检测方法。The invention relates to the field of optics, in particular to a detection method of a camera module.
背景技术Background technique
近年来,随着电子工业的演进以及工业技术的蓬勃发展,各种电子装置设计及开发的走向逐渐朝轻便、易于携带的方向发展,以利使用者随时随地应用于移动商务、娱乐或休闲等用途。举例而言,各式各样的摄像模块正广泛应用于各种领域,例如智能手机、穿戴式电子装置等便携式电子装置的领域,其具有体积小且方便携带的优点,人们得以于有使用需求时随时取出进行影像获取并存储,或进一步通过移动网络上传至网际网络之中,不仅具有重要的商业价值,更让一般大众的日常生活更添色彩。当然,摄像模块不仅被应用于便携式电子装置的领域,现亦被大量地应用在注重安全性的车用电子领域。In recent years, with the evolution of the electronic industry and the vigorous development of industrial technology, the design and development of various electronic devices have gradually developed towards the direction of lightness and portability, so that users can use it in mobile commerce, entertainment or leisure anytime, anywhere. use. For example, various camera modules are widely used in various fields, such as in the field of portable electronic devices such as smart phones and wearable electronic devices. They have the advantages of small size and easy portability, and people can use them when they need it. It can be taken out at any time for image acquisition and storage, or further uploaded to the Internet through the mobile network, which not only has important commercial value, but also makes the daily life of the general public more colorful. Of course, camera modules are not only used in the field of portable electronic devices, but are also widely used in the field of vehicle electronics where safety is important.
请参阅图1,其为现有摄像模块的概念示意图。摄像模块1包括摄像镜头11以及感光元件12,感光元件12是感测通过摄像镜头11并投射至其上的外界光束以获得图像,其中,摄像镜头11的光轴111是否能对准感光元件12的成像中心121是影响摄像模块1的成像品质的重要关键。是以,于摄像模块1的生产与组装过程中,如何有效检测摄像镜头11的光轴111是否对准感光元件12的成像中心121已成为亟待研究的课题。Please refer to FIG. 1 , which is a conceptual diagram of a conventional camera module. The
发明内容SUMMARY OF THE INVENTION
本发明的主要目的在于提供一种摄像模块的检测方法,特别是一种可检测摄像镜头的光轴是否对准感光元件的成像中心的检测方法。The main purpose of the present invention is to provide a detection method of a camera module, especially a detection method that can detect whether the optical axis of the camera lens is aligned with the imaging center of the photosensitive element.
于一优选实施例中,本发明提供一种摄像模块的检测方法,应用于具有一摄像镜头以及一感光元件的一摄像模块,包括:In a preferred embodiment, the present invention provides a method for detecting a camera module, which is applied to a camera module having a camera lens and a photosensitive element, including:
(A)利用该摄像镜头以及该感光元件获取一原始图像;(A) using the camera lens and the photosensitive element to obtain an original image;
(B)转换该原始图像为一灰度图像(gray scale image);(B) converting the original image into a grayscale image (gray scale image);
(C)依据一临界灰度值转换该灰度图像为一二值图像(binary image);(C) converting the grayscale image into a binary image according to a critical grayscale value;
(D)获得该二值图像中大于等于(≥)该临界灰度值的多个像素的一边界轮廓;(D) obtaining a boundary contour of a plurality of pixels that are greater than or equal to (≥) the critical gray value in the binary image;
(E)获得该边界轮廓的一轮廓中心;以及(E) obtaining a contour center of the boundary contour; and
(F)依据该感光元件的一成像中心以及该轮廓中心而判断该摄像镜头的一光轴是否对准该感光元件的该成像中心。(F) According to an imaging center of the photosensitive element and the contour center, it is determined whether an optical axis of the camera lens is aligned with the imaging center of the photosensitive element.
附图说明Description of drawings
图1:是为现有摄像模块的概念示意图。Figure 1: is a conceptual schematic diagram of an existing camera module.
图2:是为本发明摄像模块的检测方法的一优选方法流程图。FIG. 2 is a flowchart of a preferred method of the detection method of the camera module of the present invention.
图3:是为经由图2所示步骤S1所获取的原始图像的概念示意图。FIG. 3 is a conceptual schematic diagram of the original image obtained through step S1 shown in FIG. 2 .
图4:是为图3所示原始图像经由图2所示步骤S2而获得灰度图像的概念示意图。FIG. 4 is a conceptual schematic diagram of obtaining a grayscale image from the original image shown in FIG. 3 through step S2 shown in FIG. 2 .
图5:是为图2所示步骤S3的一优选执行流程图。FIG. 5 is a flow chart of a preferred execution of step S3 shown in FIG. 2 .
图6A:是为图4所示灰度图像中每一灰度值与相对应的像素数量的概念示意图。FIG. 6A is a conceptual schematic diagram of each gray value and the corresponding number of pixels in the gray image shown in FIG. 4 .
图6B:是为图4所示灰度图像的一优选累积分布函数图。FIG. 6B is a graph of a preferred cumulative distribution function for the grayscale image shown in FIG. 4 .
图7:是为图4所示灰度图像经由图5所示步骤S31与步骤S32而转换为二值图像的概念示意图。FIG. 7 is a conceptual schematic diagram illustrating that the grayscale image shown in FIG. 4 is converted into a binary image through steps S31 and S32 shown in FIG. 5 .
图8:是为图7所示二值图像经由图2所示步骤S4而获得边界轮廓的概念示意图。FIG. 8 is a conceptual schematic diagram of obtaining the boundary contour of the binary image shown in FIG. 7 through step S4 shown in FIG. 2 .
图9:是为图8所示边界轮廓经由图2所示步骤S5而获得轮廓中心的概念示意图。FIG. 9 is a conceptual schematic diagram of obtaining the contour center for the boundary contour shown in FIG. 8 through step S5 shown in FIG. 2 .
其中,附图标记说明如下:Among them, the reference numerals are described as follows:
1摄像模块1 camera module
2原始图像2 original images
3灰度图像3 Grayscale images
4二值图像4 binary images
11摄像镜头11 camera lens
12感光元件12 photosensitive elements
41边界轮廓41 Border Outlines
42光学圆42 Optical Circle
43轮廓中心43 Contour Center
44二值图像的中心44 center of binary image
111光轴111 optical axis
121成像中心121 Imaging Center
S1步骤S1 step
S2步骤S2 step
S3步骤S3 step
S4步骤Step S4
S5步骤Step S5
S6步骤Step S6
S31步骤Step S31
S32步骤Step S32
具体实施方式Detailed ways
首先说明的是,本公开摄像模块的检测方法可应用于图1所示的摄像模块1,并适用于摄像模块1的生产线,一般来说,感光元件12上的光源密度会随着越接近摄像镜头11的光轴111而越高,因此本公开摄像模块的检测方法是利用感光元件12上的多个像素的亮度值(Intensity)来寻找感光元件12上相对应于摄像镜头11的光轴111的所在处(光学中心),再通过比较该所在处与感光元件12的成像中心121的间距而判断摄像镜头11的光轴111是否对准感光元件12的成像中心121。于一优选实施例中,感光元件12可为互补式金属氧化物半导体(Complementary Metal-Oxide-Semiconductor,CMOS)或感光耦合元件(ChargeCoupled Device,CCD),且成像中心121是位于整个感光元件12的中心处,但不以上述为限。First of all, it should be noted that the detection method of the camera module of the present disclosure can be applied to the
请参阅图2,其为本发明摄像模块的检测方法的一优选方法流程图。摄像模块的检测方法包括:步骤S1,利用摄像镜头以及感光元件获取一原始图像;步骤S2,转换原始图像为灰度图像(gray scale image);步骤S3,依据一临界灰度值转换灰度图像为二值图像(binary image);步骤S4,获得二值图像中大于等于(≥)临界灰度值的多个像素的一边界轮廓;步骤S5,获得边界轮廓的轮廓中心;步骤S6,依据感光元件的成像中心以及边界轮廓的轮廓中心而判断摄像镜头的光轴是否对准感光元件的成像中心。Please refer to FIG. 2 , which is a flowchart of a preferred method of the detection method of the camera module of the present invention. The detection method of the camera module includes: step S1, using a camera lens and a photosensitive element to obtain an original image; step S2, converting the original image into a gray scale image; step S3, converting the gray scale image according to a critical gray value is a binary image (binary image); step S4, obtains a boundary contour of a plurality of pixels that is greater than or equal to (≥) critical gray value in the binary image; step S5, obtains the contour center of the boundary contour; step S6, according to the photosensitive The imaging center of the element and the contour center of the boundary outline determine whether the optical axis of the camera lens is aligned with the imaging center of the photosensitive element.
以下以一优选实施例说明上述步骤S1~步骤S6,并以图3~图9所示内容辅助说明。图3为经由图2所示步骤S1所获取的原始图像2,其可为RGB类型的彩色图像,亦可为CMYK类型的彩色图像。图4为图3所示原始图像经由图2所示步骤S2而获得的灰度图像3,其中,灰度图像3中的每个像素是由0~255的灰度值表示,而不同的灰度值分别代表不同的亮度。The above steps S1 to S6 are described below with a preferred embodiment, and the content shown in FIG. 3 to FIG. 9 is used to assist the description. FIG. 3 shows the original image 2 obtained through step S1 shown in FIG. 2 , which can be a color image of RGB type or a color image of CMYK type. FIG. 4 is a grayscale image 3 obtained from the original image shown in FIG. 3 through step S2 shown in FIG. 2 , wherein each pixel in the grayscale image 3 is represented by a grayscale value of 0 to 255, and different grayscales The degree values represent different brightness respectively.
再者,图5示意了图2所示步骤S3的一优选执行流程图,其包括:步骤S31,利用累积分布函数(Cumulative Distribution Function,CDF)获得与一特定盖率相对应的临界灰度值;步骤S32,将灰度图像中大于等于(≥)临界灰度值的每一像素归类为高亮度像素,并将灰度图像中小于(<)临界灰度值的每一像素归类为低亮度像素,以二值化灰度图像。Furthermore, FIG. 5 illustrates a preferred execution flow chart of step S3 shown in FIG. 2 , which includes: step S31 , using a cumulative distribution function (Cumulative Distribution Function, CDF) to obtain a critical gray value corresponding to a specific coverage ratio. ; Step S32, is greater than or equal to (≥) each pixel of the critical gray value in the grayscale image is classified as a high-brightness pixel, and in the grayscale image is less than (<) each pixel of the critical gray value is classified as Low luminance pixels to binarize grayscale images.
进一步而言,请参阅图6A与图6B,图6A示意了灰度图像中每一灰度值(横轴)所对应的像素数量(纵轴),而通过执行步骤S31可得到如图6B所示的累积分布函数图,累积分布函数是定义为:FX(x)=P(X≤x),P为盖率,x为灰度值,X为随机变量。于本优选实施例中,特定盖率设定为0.4,但实际应用并不以此为限,而由图6B所示可知,与特定盖率0.4相对应的临界灰度值为120,亦即,于本优选实施例中,经由图5所示步骤S31可获得临界灰度值120。Further, please refer to FIG. 6A and FIG. 6B , FIG. 6A illustrates the number of pixels (vertical axis) corresponding to each gray value (horizontal axis) in the grayscale image, and by performing step S31, the result shown in FIG. 6B can be obtained. The cumulative distribution function diagram shown in the figure, the cumulative distribution function is defined as: F X (x)=P (X≤x), P is the coverage rate, x is the gray value, and X is a random variable. In this preferred embodiment, the specific coverage ratio is set to 0.4, but the practical application is not limited to this. As shown in FIG. 6B , the critical gray value corresponding to the specific coverage ratio of 0.4 is 120, that is, , in this preferred embodiment, the critical
此外,累积分布函数是几率密度函数的积分,能完整描述一个随机变量X的几率分布,其为熟知本技艺人士所知悉,故在此即不再予以赘述,而本公开并不限定利用累积分布函数获得临界灰度值,熟知本技艺人士皆可依据实际应用需求而进行任何均等的变更设计。In addition, the cumulative distribution function is the integral of the probability density function, which can completely describe the probability distribution of a random variable X, which is known to those skilled in the art, so it will not be repeated here, and the present disclosure does not limit the use of the cumulative distribution The function obtains the critical gray value, and those skilled in the art can make any equivalent design changes according to actual application requirements.
又,于本优选实施例中,通过执行步骤S32,可将灰度图像3中大于等于(≥)临界灰度值120的每一像素设为灰度极大值(如255)以及将灰度图像3中小于(<)临界灰度值120的每一像素设为灰度极小值(如0),从而使图4所示灰度图像3转换为图7所示二值图像4,其中,为了清楚示意,图7所示二值图像4中以黑点表示的是设为灰度极大值(如255)的像素。In addition, in this preferred embodiment, by executing step S32, each pixel in the grayscale image 3 that is greater than or equal to (≥) the critical grayscale value of 120 can be set to a grayscale maximum value (such as 255) and the grayscale Each pixel in the image 3 that is less than (<) the critical
请参阅图8,其为图7所示二值图像经由图2所示步骤S4所获得的边界轮廓。于本优选实施例中,步骤S4是利用主动轮廓模型(Active Contour Model)获得二值图像4中设为灰度极大值(如255)的多个像素的边界轮廓41;其中,主动轮廓模型又被称为「Snakes」,是一种从可能含有噪声的二维图像中提取物体轮廓线的架构,而主动轮廓模型亦为熟知本技艺人士所知悉,故在此即不再予以赘述。当然,本公开亦不限定利用主动轮廓模型获得边界轮廓,熟知本技艺人士皆可依据实际应用需求而进行任何均等的变更设计。Please refer to FIG. 8 , which is the boundary contour of the binary image shown in FIG. 7 obtained through step S4 shown in FIG. 2 . In this preferred embodiment, step S4 is to use an active contour model (Active Contour Model) to obtain the
请参阅图9,其为图8所示边界轮廓经由图2所示步骤S5而获得的轮廓中心。于本优选实施例中,步骤S5是利用椭圆拟合演算法(Ellipse Fitting Algorithm)获得与边界轮廓41相拟合的光学圆42并以该光学圆42的圆心作为轮廓中心43,而由于二值图像4的大小与感光元件12的大小相对应,因此步骤S5所获得的轮廓中心43可代表感光元件12上相对应于摄像镜头11的光轴111的所在处(光学中心);其中,椭圆拟合演算法亦为熟知本技艺人士所知悉,故在此即不再予以赘述。当然,本公开亦不限定利用椭圆拟合演算法获得边界轮廓的轮廓中心,熟知本技艺人士皆可依据实际应用需求而进行任何均等的变更设计。Please refer to FIG. 9 , which is the contour center of the boundary contour shown in FIG. 8 obtained through step S5 shown in FIG. 2 . In this preferred embodiment, step S5 is to use an ellipse fitting algorithm (Ellipse Fitting Algorithm) to obtain the
同样地,由于二值图像4的大小与感光元件12的大小相对应,因此二值图像4的中心44可代表感光元件12的成像中心121。于本优选实施例中,当二值图像4的中心44(代表感光元件12的成像中心121)与边界轮廓41的轮廓中心43(代表感光元件12上相对应于摄像镜头11的光轴111的所在处)的间隔距离在一预定距离以内时,视为感光元件12的成像中心121与感光元件12上相对应于摄像镜头11的光轴111的所在处相重叠或相邻近,则判断摄像镜头11的光轴111已对准感光元件12的成像中心121,反之,当二值图像4的中心44(代表感光元件12的成像中心121)与边界轮廓41的轮廓中心43(即感光元件12上相对应于摄像镜头11的光轴111的所在处)的间隔距离大于一预定距离以内时,则判断摄像镜头11的光轴111未对准感光元件12的成像中心121,此时摄像镜头11与感光元件12须重新组装或校正。Likewise, since the size of the
以上所述仅为本发明的优选实施例,并非用以限定本发明的权利要求,因此凡其它未脱离本发明所公开的精神下所完成的等效改变或修饰,均应包含于本公开的权利要求内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the claims of the present invention. Therefore, all other equivalent changes or modifications made without departing from the spirit of the present disclosure shall be included in the scope of the present disclosure. within the claims.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811494065.0A CN111292344A (en) | 2018-12-07 | 2018-12-07 | Detection method of camera module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811494065.0A CN111292344A (en) | 2018-12-07 | 2018-12-07 | Detection method of camera module |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111292344A true CN111292344A (en) | 2020-06-16 |
Family
ID=71023078
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811494065.0A Pending CN111292344A (en) | 2018-12-07 | 2018-12-07 | Detection method of camera module |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111292344A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105678739A (en) * | 2015-12-29 | 2016-06-15 | 中国兵器科学研究院宁波分院 | Resolution test method for three-dimensional image of cone beam CT system |
WO2017080441A1 (en) * | 2015-11-09 | 2017-05-18 | 宁波舜宇光电信息有限公司 | Method for finding optical centre of lens, device for selecting shadow computation region for lens and testing surround view video-shooting module, method for testing white balance of surround view video-shooting module, and wide-angle integrating sphere |
EP3264361A1 (en) * | 2015-02-13 | 2018-01-03 | BYD Company Limited | Method and device for calculating ridge distance |
CN108683907A (en) * | 2018-05-31 | 2018-10-19 | 歌尔股份有限公司 | Optical module pixel defect detection method, device and equipment |
-
2018
- 2018-12-07 CN CN201811494065.0A patent/CN111292344A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3264361A1 (en) * | 2015-02-13 | 2018-01-03 | BYD Company Limited | Method and device for calculating ridge distance |
WO2017080441A1 (en) * | 2015-11-09 | 2017-05-18 | 宁波舜宇光电信息有限公司 | Method for finding optical centre of lens, device for selecting shadow computation region for lens and testing surround view video-shooting module, method for testing white balance of surround view video-shooting module, and wide-angle integrating sphere |
CN105678739A (en) * | 2015-12-29 | 2016-06-15 | 中国兵器科学研究院宁波分院 | Resolution test method for three-dimensional image of cone beam CT system |
CN108683907A (en) * | 2018-05-31 | 2018-10-19 | 歌尔股份有限公司 | Optical module pixel defect detection method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114424253B (en) | Model training method, device, storage medium and electronic device | |
WO2017121018A1 (en) | Method and apparatus for processing two-dimensional code image, and terminal and storage medium | |
US11398016B2 (en) | Method, system, and computer-readable medium for improving quality of low-light images | |
CN109871845B (en) | Certificate image extraction method and terminal equipment | |
WO2020093782A1 (en) | Method, system, and computer-readable medium for improving quality of low-light images | |
US11972543B2 (en) | Method and terminal for improving color quality of images | |
WO2019201184A1 (en) | License plate enhancement method, apparatus and electronic device | |
US12333696B2 (en) | Electronic device for detecting defect in image on basis of difference among sub-images acquired by multiple photodiode sensors, and operation method thereof | |
CN110309715B (en) | Indoor positioning method, device and system for lamp identification based on deep learning | |
CN114049264A (en) | Dark light image enhancement method, device, electronic device and storage medium | |
CN106651816B (en) | Method and system for halftone processing of digital image | |
CN112070682A (en) | Method and device for compensating image brightness | |
CN112597788A (en) | Target measuring method, target measuring device, electronic apparatus, and computer-readable medium | |
CN113052768A (en) | Method for processing image, terminal and computer readable storage medium | |
TWI669962B (en) | Method for detecting camera module | |
CN111292344A (en) | Detection method of camera module | |
CN104851114B (en) | A kind of method and terminal for realizing image local discoloration | |
CN114648467B (en) | Image defogging method and device, terminal equipment and computer readable storage medium | |
CN116597086A (en) | Image processing method and device | |
CN114764822B (en) | Image processing method, device and electronic equipment | |
CN111598785A (en) | A method, device, device and storage medium for enhancing image contrast | |
CN114187185A (en) | A data processing method, system and device | |
CN113112418B (en) | Low-illumination image iteration enhancement method | |
JP2016048828A (en) | Information processing device, information processing method, and program | |
CN115082415B (en) | Method, device and electronic equipment for determining device contamination specifications |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200616 |
|
WD01 | Invention patent application deemed withdrawn after publication |