Method for detecting whether first frame data of camera is abnormal
By detecting the first frame of the camera in a completely black environment and dividing it into multiple channels and small areas for analysis, the problem of difficulty in detecting whether the first frame of the camera is abnormal is solved in the prior art, and the accuracy of chip performance detection is achieved.
Patent Information
- Application Number
- CN202411409892.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to detect whether the first frame data of the camera is abnormal, making it difficult to judge the performance of the chip.
By setting up the test environment, place the test camera in a completely black environment, obtain the first frame of the screen, read the image data, and divide it into four channels: R, GR, GB, and B. Each channel is divided into multiple small areas, calculate the maximum and minimum values of each channel, and determine whether the difference value of each channel exceeds the standard.
This method can effectively detect whether the first frame data of the camera is abnormal and ensure the accuracy of detection of chip performance.
Smart Images

Figure CN119603441A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera detection, and in particular to a method for detecting whether the first frame data of a camera is abnormal. Background Art
[0002] The camera module is composed of capacitors, chips, connectors, flexible circuit boards, lens + holder integrated materials and other main parts. Among them, the chip is a particularly important part of the camera module. The quality of the chip determines the performance of the camera module. Therefore, the performance of the chip needs to be tested before the camera module leaves the factory. Due to the characteristics of some chips, it is difficult to detect whether there is an abnormality in the camera image in conventional tests, and it is difficult to judge the performance of the chip. Summary of the invention
[0003] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a method for detecting whether the first frame data of a camera is abnormal.
[0004] The objective of the present invention is achieved through the following technical solutions:
[0005] A method for detecting whether the first frame data of a camera is abnormal comprises the following steps:
[0006] Step 1: Set up the test environment and place the test camera in the test environment;
[0007] Step 2: Turn on the test camera and obtain the first frame of the test camera;
[0008] Step 3, read the image data of the first frame;
[0009] Step 4, analyzing the image data of the first frame;
[0010] Step 5: Determine whether the image data value of the first frame is qualified.
[0011] In one embodiment, in step 1, the test environment is to cover the test camera with a blackboard to block the lens light hole, so that the test camera images a completely black picture, and the gain value of the test camera is adjusted to the maximum.
[0012] In one implementation manner, in step 2, after acquiring the first frame of the test camera, the first frame is stored.
[0013] In one implementation manner, in step 3, reading the image data of the first frame is reading pixels of the first frame.
[0014] In one embodiment, in step 4,
[0015] Step 4-1, dividing the image data of the first frame into four channels of R, GR, GB, and B, and each channel is divided into multiple small areas;
[0016] Step 4-2, calculate the average value of each small area in each channel;
[0017] Step 4-3, obtain the maximum and minimum values in multiple small areas in each channel.
[0018] In one implementation manner, in step 4-1, the size of each small area is 80*60 pixels.
[0019] In one embodiment, in step 4-3, the maximum and minimum values in multiple small areas in each channel are obtained, and there are eight data in total for four channels, and the eight data are: Rmax, Rmin, GRmax, GRmin, GBmax, GBmin, Bmax, and Bmin.
[0020] In one embodiment, in step 5,
[0021] Step 5-1, calculate the max-min value in each channel respectively.
[0022] In one embodiment, in step 5-1, the value of max-min is the product of subtracting the minimum value from the maximum value among the multiple small regions of the channel.
[0023] In one embodiment, in step 5,
[0024] Step 5-2, obtain the max-min value of each channel and determine whether the diff value of each channel exceeds the standard.
[0025] Compared with the prior art, the present invention has at least the following advantages:
[0026] A method for detecting whether the first frame data of a camera is abnormal is provided by placing a test camera in a test environment, turning on the test camera and acquiring the first frame, reading and analyzing the image data of the first frame, dividing the image data of the first frame into four channels of R, GR, GB, and B, and dividing each channel into a plurality of small areas for analysis to obtain the max-min value of each channel, thereby determining whether the diff value of each channel exceeds the standard. If the diff of one channel exceeds the standard, it indicates that the test camera has an abnormality, thereby detecting the test camera with an abnormal chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 A flow chart of a method for detecting whether the first frame of camera data is abnormal provided by the present invention. DETAILED DESCRIPTION
[0029] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thoroughly understood.
[0030] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only implementation method.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0032] A method for detecting whether the first frame of camera data is abnormal, referring to Figure 1 , including the following steps:
[0033] Step 1: Set up the test environment and place the test camera in the test environment;
[0034] Step 2: Turn on the test camera and obtain the first frame of the test camera;
[0035] Step 3, read the image data of the first frame;
[0036] Step 4, analyzing the image data of the first frame;
[0037] Step 5: Determine whether the image data value of the first frame is qualified.
[0038] Reference Figure 1 In step 1, the test environment is an important parameter in the test camera detection. In order to better detect the abnormality of the test camera, the test camera needs to be tested in a dark environment with a completely black screen. Therefore, the test environment is to cover the test camera with a blackboard to block the lens light hole, so that the test camera has a completely black screen in the imaging, and the gain value of the test camera is adjusted to the maximum. This can make the abnormal phenomenon of the test camera more obvious.
[0039] Reference Figure 1 In step 2, after acquiring the first frame of the test camera, the first frame is stored. The purpose of storage is to facilitate subsequent analysis of the first frame.
[0040] Reference Figure 1 In step 3, reading the image data of the first frame is reading the pixels of the first frame. The first frame is composed of a plurality of pixels, and reading the pixels of the first frame facilitates subsequent analysis.
[0041] Reference Figure 1 , in step 4,
[0042] Step 4-1, dividing the image data of the first frame into four channels of R, GR, GB, and B, and each channel is divided into multiple small areas;
[0043] Step 4-2, calculate the average value of each small area in each channel;
[0044] Step 4-3, obtain the maximum and minimum values in multiple small areas in each channel.
[0045] Each channel is divided into multiple small areas, each of which is 80*60 pixels in size. The purpose of dividing into multiple small areas is to facilitate data analysis. The average value of each small area in each channel is calculated to represent the value of this area, and the maximum and minimum values are selected from the values of multiple small areas in each channel, so that each of the four channels has eight data, which are: Rmax, Rmin, GRmax, GRmin, GBmax, GBmin, Bmax, Bmin.
[0046] Reference Figure 1 , in step 5,
[0047] Step 5-1, calculate the max-min value in each channel respectively; the max-min value is the maximum value minus the minimum value in multiple small areas of the channel.
[0048] Step 5-2, obtain the max-min value of each channel, and determine whether the diff value of each channel exceeds the standard. If the diff value of one channel exceeds the standard, it means that the test camera has an abnormality, so as to detect the test camera with abnormal chip.
[0049] In summary, place the test camera in the test environment, turn on the test camera and obtain the first frame, read the image data of the first frame and analyze it, divide the image data of the first frame into four channels: R, GR, GB, and B, and divide each channel into multiple small areas for analysis to obtain the max-min value of each channel, so as to determine whether the diff value of each channel exceeds the standard. If the diff of one channel exceeds the standard, it means that the test camera has an abnormality, so as to detect the test camera with an abnormal chip.
[0050] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for detecting whether the first frame of camera data is abnormal, characterized in that: The following steps are involved: Step 1: Set up the test environment and place the test camera in the test environment; Step 2: Turn on the test camera and obtain the first frame of the test camera; Step 3, read the image data of the first frame; Step 4, analyzing the image data of the first frame; Step 5: Determine whether the image data value of the first frame is qualified.
2. A method for detecting whether the first frame data of a camera is abnormal according to claim 1, characterized in that: In step 1, the test environment is to cover the test camera with a blackboard to block the lens light hole, so that the test camera images a completely black picture, and the gain value of the test camera is adjusted to the maximum.
3. The method for detecting whether the first frame data of a camera is abnormal according to claim 1, characterized in that: In step 2, after acquiring the first frame of the test camera, the first frame is stored.
4. The method for detecting whether the first frame data of a camera is abnormal according to claim 1, characterized in that: In step 3, reading the image data of the first frame is reading the pixels of the first frame.
5. The method for detecting whether the first frame data of a camera is abnormal according to claim 1, characterized in that: In step 4, Step 4-1, dividing the image data of the first frame into four channels of R, GR, GB, and B, and each channel is divided into multiple small areas; Step 4-2, calculate the average value of each small area in each channel; Step 4-3, obtain the maximum and minimum values in multiple small areas in each channel.
6. A method for detecting whether the first frame data of a camera is abnormal according to claim 5, characterized in that: In step 4-1, the size of each small area is 80*60 pixels.
7. The method for detecting whether the first frame data of a camera is abnormal according to claim 6, characterized in that: In step 4-3, the maximum and minimum values in multiple small areas in each channel are obtained. There are eight data in total for the four channels, and the eight data are: Rmax, Rmin, GRmax, GRmin, GBmax, GBmin, Bmax, and Bmin.
8. The method for detecting whether the first frame data of a camera is abnormal according to claim 7, characterized in that: In step 5, Step 5-1, calculate the max-min value in each channel respectively.
9. The method for detecting whether the first frame data of a camera is abnormal according to claim 8, characterized in that: In step 5-1, the value of max-min is the product of subtracting the minimum value from the maximum value among multiple small areas of the channel.
10. The method for detecting whether the first frame data of a camera is abnormal according to claim 9, characterized in that: In step 5, Step 5-2, obtain the max-min value of each channel and determine whether the diff value of each channel exceeds the standard.
Citation Information
Patent Citations
Image sensor with self-testing black level correction
CN112188126A
Image dead pixel detection method, system and device
CN113873229A
Camera dead pixel detection method and device
CN114245110A
Imaging apparatus
JP2003092705A
Imaging device and imaging method
JP2016058771A