Automatic detection method for defects of camera

文档序号:1408366 发布日期:2020-03-06 浏览:10次 中文

阅读说明:本技术 一种摄像头缺陷自动化检测方法 (Automatic detection method for defects of camera ) 是由 王勃 李汝鹏 于 2019-11-08 设计创作,主要内容包括:本发明提供了一种摄像头缺陷自动化检测方法,包括:收集测试样图作为算法训练库,其中每一台手机均拍摄一张白屏照片和一张黑屏照片作为测试样图;判断算法训练库中的每张测试样图有无缺陷,并且标注出测试样图的缺陷类型;使待检测摄像头拍摄一张白屏照片和一张黑屏照片作为测试照片;将测试照片的图片数据以浮点数矩阵形式输入到深度卷积模型;深度卷积模型根据测试照片进行计算,得到一个二维浮点数向量,其中二维浮点数向量的两维参数分别代表了图片无斑点的概率和图片有斑点的概率,而且两维参数的和为1;根据二维浮点数向量的两维参数判断待检测摄像头是否有斑点缺陷。(The invention provides a camera defect automatic detection method, which comprises the following steps: collecting a test sample image as an algorithm training library, wherein each mobile phone takes a white screen photo and a black screen photo as the test sample image; judging whether each test sample in the algorithm training library has defects, and marking the defect type of the test sample; enabling a camera to be detected to shoot a white screen picture and a black screen picture as test pictures; inputting the picture data of the test photo into the depth convolution model in a floating-point number matrix form; the depth convolution model is calculated according to the test picture to obtain a two-dimensional floating point number vector, wherein two-dimensional parameters of the two-dimensional floating point number vector respectively represent the probability of no speckles and the probability of speckles of the picture, and the sum of the two-dimensional parameters is 1; and judging whether the camera to be detected has a spot defect according to the two-dimensional parameters of the two-dimensional floating point number vector.)

1. A camera defect automatic detection method is characterized by comprising the following steps:

the first step is as follows: collecting a test sample image as an algorithm training library, wherein each mobile phone takes a white screen photo and a black screen photo as the test sample image;

the second step is as follows: judging whether each test sample in the algorithm training library has defects, and marking the defect type of the test sample;

the third step: enabling a camera to be detected to shoot a white screen picture and a black screen picture as test pictures;

the fourth step: inputting the picture data of the test photo into the depth convolution model in a floating-point number matrix form;

the fifth step: the depth convolution model is calculated according to the test picture to obtain a two-dimensional floating point number vector, wherein two-dimensional parameters of the two-dimensional floating point number vector respectively represent the probability of no speckles and the probability of speckles of the picture;

a sixth step: and judging whether the camera to be detected has a spot defect according to the two-dimensional parameters of the two-dimensional floating point number vector.

2. The method of claim 1, wherein the sum of the two-dimensional parameters is 1.

3. The method for automatically detecting the defects of the camera according to claim 1, further comprising: and (3) training a deep convolution model by using the mobile phone white screen photos with the preset number and marked with the defect types of the test sample pictures as training data, so that the value of the loss function is converged to be stable and is not reduced any more.

4. The automatic camera defect detection method according to one of claims 1 to 3, wherein in the sixth step, when a parameter value representing a probability that a picture has speckles in the two-dimensional floating point number vector exceeds a predetermined threshold, it is determined that the camera to be detected has speckles, and otherwise, it is determined that the camera to be detected is not defective.

5. The method according to claim 4, wherein the predetermined threshold is not less than 0.5.

6. The method according to claim 4, wherein the predetermined threshold is 0.75.

7. The automatic detection method for the defects of the camera head as claimed in one of the claims 1 to 3, wherein the deep convolution model is an Efficientnet model of google open source.

8. The automatic camera defect detection method according to one of claims 1 to 3, wherein the detection light source is artificial sunlight.

9. The method for automatically detecting the defects of the camera according to one of the claims 1 to 3, wherein each mobile phone takes a white screen picture and a black screen picture as test sample pictures, and the method comprises the following steps: a white screen picture and a full black screen picture with uniform color temperature and uniform brightness are taken in a lamp box by using a detection light source.

Technical Field

The present invention relates to the field of detection; more particularly, the invention relates to an automatic detection method for defects of a camera.

Background

At present, a second-hand intelligent terminal has no standard flow and method for detecting defects of a camera, and most of the defects are distinguished by human eyes. The human eye resolution scheme is influenced by differences among engineers, and defects cannot be reflected to the maximum extent, so that the accuracy is low, and data and standardized results cannot be output.

The existing image analysis technology of mobile phone cameras and digital cameras can analyze defects, but the analysis time cost is too high, different targets need to be shot in a specific laboratory environment, specific analysis software is introduced for analysis, and the required test environment is unique and cannot be applied to large-scale detection processes of the second-hand intelligent terminal.

Disclosure of Invention

The invention aims to solve the technical problem of providing an automatic camera defect detection method which can effectively improve the efficiency and the accuracy of camera defect test aiming at the defects in the prior art.

According to the invention, the automatic detection method for the defects of the camera comprises the following steps:

the first step is as follows: collecting a test sample image as an algorithm training library, wherein each mobile phone takes a white screen photo and a black screen photo as the test sample image;

the second step is as follows: judging whether each test sample in the algorithm training library has defects, and marking the defect type of the test sample;

the third step: enabling a camera to be detected to shoot a white screen picture and a black screen picture as test pictures;

the fourth step: inputting the picture data of the test photo into the depth convolution model in a floating-point number matrix form;

the fifth step: the depth convolution model is calculated according to the test picture to obtain a two-dimensional floating point number vector, wherein two-dimensional parameters of the two-dimensional floating point number vector respectively represent the probability of no speckles and the probability of speckles of the picture, and the sum of the two-dimensional parameters is 1;

a sixth step: and judging whether the camera to be detected has a spot defect according to the two-dimensional parameters of the two-dimensional floating point number vector.

Preferably, the method for automatically detecting the defects of the camera further comprises the following steps: and (3) training a deep convolution model by using the mobile phone white screen photos with the preset number and marked with the defect types of the test sample pictures as training data, so that the value of the loss function is converged to be stable and is not reduced any more.

Preferably, each mobile phone taking a white screen photo and a black screen photo as the test sample comprises: a white screen picture and a full black screen picture with uniform color temperature and uniform brightness are taken in a lamp box by using a detection light source.

Preferably, in the sixth step, when a parameter value representing the probability of the picture having the speckles in the two-dimensional floating point number vector exceeds a predetermined threshold, it is determined that the camera to be detected has the speckles, and otherwise, it is determined that the camera to be detected is not defective.

Preferably, the predetermined threshold is not less than 0.5.

Preferably, the predetermined threshold is 0.75.

Preferably, the deep convolution model is the google open source Efficientnet model.

Preferably, the detection light source is artificial sunlight.

The image defect analysis scheme can be favorably applied to the field of professional image quality analysis, simplifies the method for professional image quality analysis, is suitable for the rapid detection of the defects of the camera of a large-scale second-hand intelligent terminal, takes standardization and data as the core from sampling to the output analysis result of a system algorithm, and improves the test efficiency and the test precision. The test process of the invention is highly automated, and the output result is more accurate.

Drawings

A more complete understanding of the present invention, and the attendant advantages and features thereof, will be more readily understood by reference to the following detailed description when considered in conjunction with the accompanying drawings wherein:

fig. 1 schematically shows a flowchart of a camera defect automated detection method according to a preferred embodiment of the present invention.

It is to be noted, however, that the appended drawings illustrate rather than limit the invention. It is noted that the drawings representing structures may not be drawn to scale. Also, in the drawings, the same or similar elements are denoted by the same or similar reference numerals.

Detailed Description

In order that the present disclosure may be more clearly and readily understood, reference will now be made in detail to the present disclosure as illustrated in the accompanying drawings.

Fig. 1 schematically shows a flowchart of a camera defect automated detection method according to a preferred embodiment of the present invention.

As shown in fig. 1, the method for automatically detecting defects of a camera according to the preferred embodiment of the invention comprises:

first step S1: collecting a test sample image as an algorithm training library, wherein each mobile phone takes a white screen photo and a black screen photo as the test sample image;

specifically, for example, a test pattern is acquired by taking a photograph with a camera. For example, photos taken by thousands of machines are collected on the production line in the early stage as an algorithm training library.

More specifically, each mobile phone takes a white screen photo and a black screen photo as test patterns, and the method comprises the following steps: white screen pictures and full black screen pictures with uniform color temperature and uniform brightness are taken in a light box using a detection light source (preferably, the detection light source is artificial sunlight, for example, a D65 light source). This unifies the samples.

Second step S2: judging whether each test sample in the algorithm training library has defects, and marking the defect type of the test sample;

third step S3: enabling a camera to be detected to shoot a white screen picture and a black screen picture as test pictures; for example, the test photographs are 3-dimensional matrices in rgb format and scaled to a uniform size of 300x 300.

Fourth step S4: inputting picture data of the test photograph to the depth convolution model in a floating point matrix form (e.g., a floating point matrix form of 300x300x 3);

for example, the deep convolution model is an Efficientnet model of a google open source, but similar image classification models can be replaced with each other, and the use of the deep convolution model mainly considers higher identification precision and relatively less calculation amount.

Fifth step S5: the depth convolution model is calculated according to the test picture to obtain a two-dimensional floating point number vector, wherein two-dimensional parameters of the two-dimensional floating point number vector respectively represent the probability that the picture has no speckles (background class) and the probability that the picture has speckles, and the sum of the two-dimensional parameters is 1;

sixth step S6: and judging whether the camera to be detected has a spot defect according to the two-dimensional parameters of the two-dimensional floating point number vector.

Specifically, for example, when a parameter value representing the probability that a picture has a speckle in a two-dimensional floating point number vector exceeds a predetermined threshold (for example, the predetermined threshold is not less than 0.5, for example, the predetermined threshold is 0.75), it is determined that the camera to be detected has a speckle defect, otherwise, it is determined that the camera to be detected is not defective.

Preferably, the deep convolution model is trained by using a predetermined number (for example, 1000) of mobile phone white screen photos marked with defect types of the test sample as training data, so that the convergence to the loss function value is stable and does not decrease any more.

Therefore, in the invention, two pictures are taken, wherein firstly, the camera is tightly attached to the artificial sunlight source lamp box for shooting, and secondly, the camera is tightly attached to the full black part of the lamp box for shooting; the method comprises the steps of capturing defect characteristic points of two pictures through an algorithm, judging whether the defect points of each picture are flawless or not according to each picture, automatically judging whether the analysis camera has the flawless defects (the pictures with the defects of bright spots, dead spots, speckles and abnormal grains are collected in the early stage, extracting the characteristics of the defects and then storing the characteristics in a database, and identifying whether the two newly-shot pictures have similar characteristic points or not through the algorithm so as to judge whether the camera has the flawless or not).

The image defect analysis scheme can be favorably applied to the field of professional image quality analysis, simplifies the method for professional image quality analysis, is suitable for the rapid detection of the defects of the camera of a large-scale second-hand intelligent terminal, takes standardization and data as the core from sampling to the output analysis result of a system algorithm, and improves the test efficiency and the test precision. The test process of the invention is highly automated, and the output result is more accurate.

It should be noted that the terms "first", "second", "third", and the like in the description are used for distinguishing various components, elements, steps, and the like in the description, and are not used for indicating a logical relationship or a sequential relationship between the various components, elements, steps, and the like, unless otherwise specified.

It is to be understood that while the present invention has been described in conjunction with the preferred embodiments thereof, it is not intended to limit the invention to those embodiments. It will be apparent to those skilled in the art from this disclosure that many changes and modifications can be made, or equivalents modified, in the embodiments of the invention without departing from the scope of the invention. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention are still within the scope of the protection of the technical solution of the present invention, unless the contents of the technical solution of the present invention are departed.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种视频图像预测方法及装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!