Camera module local analytic force failure detection method based on image fuzzy evaluation

文档序号:196222 发布日期:2021-11-02 浏览:18次 中文

阅读说明:本技术 基于图像模糊评价的摄像头模组局部解析力失效检测方法 (Camera module local analytic force failure detection method based on image fuzzy evaluation ) 是由 张卫冬 王璠 陈佳 艾轶博 张英杰 于 2021-07-16 设计创作,主要内容包括:本发明公开了一种基于图像模糊评价的摄像头模组局部解析力失效检测方法,包括:使用待检测摄像头模组拍摄预设的测试图卡,并将拍摄的图片分割为多个矩形测试区域;对每个矩形测试区域的图像进行清晰度评价,得到所述摄像头模组的局部清晰度指标;根据所述局部清晰度指标绘制可视化热图,直观展示所述摄像头模组清晰度从中心位置到边缘位置的变化过程。本发明方法能够对任意摄像头模组区域的解析力进行检测,并能直观判断解析力局部失效的位置和程度。(The invention discloses a camera module local resolving power failure detection method based on image fuzzy evaluation, which comprises the following steps: shooting a preset test chart by using a camera module to be detected, and dividing the shot picture into a plurality of rectangular test areas; performing definition evaluation on the image of each rectangular test area to obtain a local definition index of the camera module; and drawing a visual heat map according to the local definition index, and visually displaying the change process of the definition of the camera module from the central position to the edge position. The method can detect the analytic force of any camera module area and can intuitively judge the position and the degree of local failure of the analytic force.)

1. A camera module local resolving power failure detection method based on image fuzzy evaluation is characterized by comprising the following steps:

s1, shooting a preset test chart by using the camera module to be detected, and dividing the shot picture into a plurality of rectangular test areas;

s2, evaluating the definition of the image of each rectangular test area to obtain a local definition index of the camera module;

and S3, drawing a visual heat map according to the local definition index, and visually displaying the change process of the definition of the camera module from the central position to the edge position.

2. The camera module local analytic force failure detection method based on image blur evaluation according to claim 1, wherein the test chart comprises a plurality of uniformly distributed and tangent circles, each circle occupying more than 16 pixels; and when shooting, the selected area to be detected comprises at least one circle.

3. The method for detecting the local resolving power failure of the camera module based on the image blur evaluation according to claim 1, wherein in the step S2, the specifically performing the sharpness evaluation on the image of each rectangular test area includes:

the evaluation criteria are divided into three sections: pixel intensity, first order gradient, and 8 neighborhood second order gradient;

the first step, calculating the mean value of the pixels of the area to be detected:

wherein MN is the width and height of the region to be detected, f (x, y) is the pixel value of the (x, y) position, and then the standard deviation of the pixel value of the region to be detected is:

second, calculate the first order gradient:

the angle of the gradient vector with respect to the x-axis is:

since the edges of the circle have a certain curvature, when calculating the first order total derivative value, for the horizontal gradientAnd vertical gradient valueAccording to the angle of the gradient vector, adopting a weighted addition method:

wherein L is N8(p) represents an 8 neighborhood adjacent to pixel point (x, y);angle of gradient vectorOrWhen k is more than 0.5 and less than or equal to 1, whenK is more than or equal to 0 and less than or equal to 0.5;

thirdly, calculating 8 neighborhood second-order gradient, and dividing the gradient into a horizontal vertical neighborhood and a diagonal neighborhood;

the calculation method of the horizontal and vertical 4 neighborhoods is as follows:

the calculation method for the diagonal 4 neighborhood is as follows:

combining the three parts, and simultaneously considering the pixel standard deviation of different parts to obtain the definition of the region MN to be detected as follows:

wherein, C1,C2,C3Is a constant, L ═ N8(x, y) represents an 8-neighborhood of pixel point (x, y), and L1 is equal to N4(x, y) represents the 4 horizontal and vertical neighbors of pixel (x, y), L2 ═ ND(x, y) represents a 4 neighborhood, σ, of diagonal positions adjacent to pixel point (x, y)LIs the standard deviation of the pixels in the L neighborhood.

4. The method for detecting the failure of the local resolving power of the camera module based on the image blur evaluation according to claim 3, wherein in the step S3, the method for drawing the visual heat map is as follows:

sequentially calculating the definition of all rectangular test areas according to the step S2;

and drawing a visual heat map according to the calculation result, wherein different definitions are represented by different colors.

5. The method for detecting the local resolving power failure of the camera module based on the image blur evaluation according to claim 1, further comprising:

taking a picture without fuzzy points as a standard picture, carrying out regional definition detection on the standard picture and drawing a standard visual heat map;

adopting a picture with preset fuzzy points as a verification picture, carrying out regional definition detection on the verification picture and drawing a visual heat map;

and comparing the visual heat map of the verification picture with the standard visual heat map to verify the effectiveness of the method.

Technical Field

The invention relates to the technical field of camera analysis force evaluation, in particular to a camera module local analysis force failure detection method based on image fuzzy evaluation.

Background

With the development of artificial intelligence, video and images have been used in mass production manufacturing, for example: the method is used for identifying and classifying materials, detecting defects of various parts, monitoring processing quality and the like in industrial manufacturing. Meanwhile, with the development of smart phones and digital cameras, the life of recording images and videos becomes a normal state of people. In both industrial manufacturing and daily life, users are more and more interested in the imaging capability of photographing equipment, and the requirements on the quality of lenses are also more and more high. In order to ensure the imaging quality, the definition detection of the camera module before leaving the factory and the definition failure detection in the use process are necessary. At present, many camera manufacturers mainly detect resolution by three methods, namely TVline detection, MTF detection and SFR detection. There are also a number of test standards currently, for example the ISO/TC42 photography technical committee issued ISO12233:2017 in 2017 specifying methods for measuring camera resolution and SFR for monochrome and color cameras. BOG/CAG issued P1858(CPIQ) in 2016, which defined a standard objective and subjective test method for measuring the image quality attributes of camera phones.

In addition to the performance of the camera itself, the camera sensor and lens can be damaged differently during manufacturing and assembly as well as during use. In the production process, the lens glass may have the problems of air bubble, uneven coating and the like; in the using process, damages such as scratches, fogging, mildewing, demoulding and the like can occur to the lens, meanwhile, dust can be generated, the lens is cleaned too much, abrasion and coating loss occur, and the damages can affect the overall imaging quality or the local imaging quality of the camera.

The resolution and sharpness of the camera lens are determined at the time of camera assembly, where japan mainly focuses on judging the resolution of the digital axis and the united states mainly uses the SFR calculation standard for measurement. Because of the production efficiency, most of the analysis force tests are not divided into too many test areas, and are usually divided into 5 areas: the horizontal and vertical analysis force tests are respectively carried out on the 5 areas, the analysis force of the 5 key positions represents the whole horizontal, and the analysis force of the edge position is generally reduced relative to the central position. However, when the local resolving power of the camera has a problem, the problem is difficult to find in time by adopting the current detection method of 5 regions, so that it is very meaningful to find a method for intuitively judging whether the overall resolving power level and the local resolving power of the camera fail or not.

Disclosure of Invention

The invention aims to provide a camera module local analysis force failure detection method based on image fuzzy evaluation, which can detect the analysis force of any camera module area and can intuitively judge the position and the degree of the local analysis force failure.

To solve the above technical problem, an embodiment of the present invention provides the following solutions:

a camera module local resolving power failure detection method based on image fuzzy evaluation comprises the following steps:

s1, shooting a preset test chart by using the camera module to be detected, and dividing the shot picture into a plurality of rectangular test areas;

s2, evaluating the definition of the image of each rectangular test area to obtain a local definition index of the camera module;

and S3, drawing a visual heat map according to the local definition index, and visually displaying the change process of the definition of the camera module from the central position to the edge position.

Preferably, the test chart comprises a plurality of uniformly distributed and tangent circles, each circle occupying more than 16 pixels; and when shooting, the selected area to be detected comprises at least one circle.

Preferably, in step S2, the evaluating the sharpness of the image of each rectangular test area specifically includes:

the evaluation criteria are divided into three sections: pixel intensity, first order gradient, and 8 neighborhood second order gradient;

the first step, calculating the mean value of the pixels of the area to be detected:

wherein MN is the width and height of the region to be detected, f (x, y) is the pixel value of the (x, y) position, and then the standard deviation of the pixel value of the region to be detected is:

second, calculate the first order gradient:

the angle of the gradient vector with respect to the x-axis is:

since the edges of the circle have a certain curvature, when calculating the first order total derivative value, for the horizontal gradientAnd vertical gradient valueAccording to the angle of the gradient vector, adopting a weighted addition method:

wherein L is N8(p) represents an 8 neighborhood adjacent to pixel point (x, y);angle of gradient vectorOrWhen k is more than 0.5 and less than or equal to 1, whenK is more than or equal to 0 and less than or equal to 0.5;

thirdly, calculating 8 neighborhood second-order gradient, and dividing the gradient into a horizontal vertical neighborhood and a diagonal neighborhood;

the calculation method of the horizontal and vertical 4 neighborhoods is as follows:

the calculation method for the diagonal 4 neighborhood is as follows:

combining the three parts, and simultaneously considering the pixel standard deviation of different parts to obtain the definition of the region MN to be detected as follows:

wherein, C1,C2,C3Is a constant, L ═ N8(x, y) represents an 8-neighborhood of pixel point (x, y), and L1 is equal to N4(x, y) represents the 4 horizontal and vertical neighbors of pixel (x, y), L2 ═ ND(x, y) represents a 4 neighborhood, σ, of diagonal positions adjacent to pixel point (x, y)LIs the standard deviation of the pixels in the L neighborhood.

Preferably, in step S3, the method for drawing the visualization heat map includes:

sequentially calculating the definition of all rectangular test areas according to the step S2;

and drawing a visual heat map according to the calculation result, wherein different definitions are represented by different colors.

Preferably, the method further comprises:

taking a picture without fuzzy points as a standard picture, carrying out regional definition detection on the standard picture and drawing a standard visual heat map;

adopting a picture with preset fuzzy points as a verification picture, carrying out regional definition detection on the verification picture and drawing a visual heat map;

and comparing the visual heat map of the verification picture with the standard visual heat map to verify the effectiveness of the method.

The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:

according to the method, the problem that the local resolving power of the camera module is possibly invalid in production and use and the resolving power at any position cannot be evaluated in a production test is solved, and the local resolving power of the camera module is visually shown by evaluating the image definition of the shot test chart image and drawing a visual heat map. The method can calculate the analytic force of any position of the camera module, can position the lens with the problem of local analytic force to the defect position, and can visually see the change of the analytic force from the center position to the edge position. In addition, the method has low requirement on the test environment, is not influenced by the illumination intensity, and has wide application range.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.

Fig. 1 is a flowchart of a camera module local resolving power failure detection method based on image blur evaluation according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a test chart for detecting a local resolving power failure of a camera according to an embodiment of the present invention;

fig. 3 is a heat map for visualizing a local analytic force test result of a camera according to an embodiment of the present invention;

fig. 4 is a visualization heatmap of a camera local resolving power test result of a preset fuzzy point according to an embodiment of the present invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

The embodiment of the invention provides a camera module local resolving power failure detection method based on image blur evaluation, as shown in fig. 1, the method comprises the following steps:

s1, shooting a preset test chart by using the camera module to be detected, and dividing the shot picture into a plurality of rectangular test areas;

s2, evaluating the definition of the image of each rectangular test area to obtain a local definition index of the camera module;

and S3, drawing a visual heat map according to the local definition index, and visually displaying the change process of the definition of the camera module from the central position to the edge position.

Fig. 2 is a schematic diagram of a test chart according to an embodiment of the present invention. The test chart comprises a plurality of circles which are uniformly distributed and tangent, because of the characteristics of the circles, as long as the side length of the test area is larger than the diameter of the circle, the edge contour of the circle can be obtained in the test area, and when the size of the test area is the same, the side length of the contained circle is approximately the same no matter where the position of the image the test area is in, without considering the image distortion. When shooting, each circle is ensured to occupy more than 16 pixels, and the selected test area comprises at least one circle.

Further, in step S2, the evaluating the sharpness of the image of each rectangular test area specifically includes:

the evaluation criteria are divided into three sections: pixel intensity, first order gradient, and 8 neighborhood second order gradient;

the first step, calculating the mean value of the pixels of the area to be detected:

wherein MN is the width and height of the region to be detected, f (x, y) is the pixel value of the (x, y) position, and then the standard deviation of the pixel value of the region to be detected is:

second, calculate the first order gradient:

the angle of the gradient vector with respect to the x-axis is:

since the edges of the circle have a certain curvature, when calculating the first order total derivative value, for the horizontal gradientAnd vertical gradient valueAccording to the angle of the gradient vector, adopting a weighted addition method:

wherein L is N8(p) represents an 8 neighborhood adjacent to pixel point (x, y);angle of gradient vectorOrWhen k is more than 0.5 and less than or equal to 1, whenK is more than or equal to 0 and less than or equal to 0.5;

thirdly, calculating 8 neighborhood second-order gradient, and dividing the gradient into a horizontal vertical neighborhood and a diagonal neighborhood;

the calculation method of the horizontal and vertical 4 neighborhoods is as follows:

the calculation method for the diagonal 4 neighborhood is as follows:

combining the three parts, and simultaneously considering the pixel standard deviation of different parts to obtain the definition of the region MN to be detected as follows:

wherein, C1,C2,C3Is a constant, L ═ N8(x, y) represents an 8-neighborhood of pixel point (x, y), and L1 is equal to N4(x, y) represents the 4 horizontal and vertical neighbors of pixel (x, y), L2 ═ ND(x, y) represents a 4 neighborhood, σ, of diagonal positions adjacent to pixel point (x, y)LIs the standard deviation of the pixels in the L neighborhood.

Further, in step S3, the method for drawing the visualization heat map includes:

sequentially calculating the definition of all rectangular test areas according to the step S2;

and drawing a visual heat map according to the calculation result, wherein different definitions are represented by different colors.

Further, the method further comprises:

taking a picture without fuzzy points as a standard picture, carrying out regional definition detection on the standard picture and drawing a standard visual heat map;

adopting a picture with preset fuzzy points as a verification picture, carrying out regional definition detection on the verification picture and drawing a visual heat map;

and comparing the visual heat map of the verification picture with the standard visual heat map to verify the effectiveness of the method.

In one embodiment, a tripod fixed camera (camera includes a camera module) is used, adjusted to a professional capture Raw image autofocus mode, IOS 100, exposure 1/4, capture image size 4:3(1600 ten thousand pixels), and image resolution 4624 x 3472. In order to judge whether the algorithm can detect the fuzzy position, five fuzzy points are preset on the Raw image in a Gaussian fuzzy mode. Diagonal positions of the image are selected, and coordinates are A (782, 567), B (1731,1200), C (1200,2239), D (3345,692) and E (2843,2045). The width and the height are both 300.

The image was then divided into 80 x 60 regions of interest, each region of interest being a 62 x 58 rectangle. And evaluating the definition of each rectangular test area.

Taking one of the rectangular test areas as an example, in the first step, the mean value of the pixels of the area to be detected is calculated:

wherein MN is the width and height of the region to be detected, f (x, y) is the pixel value of the (x, y) position, and then the standard deviation of the pixel value of the region to be detected is:

second, a first order gradient is computed, for an 8 neighborhood of each pixel of the region:

the angle of the gradient vector with respect to the x-axis is:

the gradients of a segment of 8 neighborhoods of all pixels of the region are added and averaged.

Thirdly, calculating a second-order gradient, wherein the second-order gradient is divided into a horizontal vertical neighborhood and a diagonal neighborhood, and the horizontal vertical neighborhood is 4, and the calculation method comprises the following steps:

the calculation method for the diagonal 4 neighborhood is as follows:

the two-step gradients of 8 neighborhoods of all pixels of the region are added and averaged.

Finally, combining the three parts to obtain a local definition measurement standard, and simultaneously considering the pixel standard deviation of different parts to obtain the definition of the MN to be detected as follows:

and sequentially calculating the definition of all the areas to be detected, and drawing a visual heat map according to the result, as shown in fig. 2. And (3) performing definition detection on the image with the preset fuzzy points in different regions, and then drawing a visual heat map, as shown in fig. 3. Therefore, the method can reflect the degradation degree of the resolving power of the camera module at different positions compared with the central point. The method for presetting the fuzzy points on the image can reflect the change of definition to a certain extent, and when the camera fails in local resolving power, the failure position and degree can be intuitively judged on the visual heat map.

In summary, the invention aims at the problems that the camera module may have local analysis failure in production and use and the analysis at any position cannot be evaluated in production test, and the shot test chart image is subjected to image definition evaluation and a visual heat map is drawn, so that the local analysis capability of the camera module is visually demonstrated. The method can calculate the analytic force of any position of the camera module, can position the lens with the problem of local analytic force to the defect position, and can visually see the change of the analytic force from the center position to the edge position. In addition, the method has low requirement on the test environment, is not influenced by the illumination intensity, and has wide application range.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

12页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种用于计算摄像机防抖性能的系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!