Method and device for detecting and intercepting poor peripheral shallow stripes of camera module
By acquiring the center overexposure image of the camera module and performing cropping and edge detection filtering, the problem of high complexity and high cost of detection of poor peripheral shallow stripes of the camera module in the prior art is solved, and efficient detection and interception are achieved to avoid Bad modules flow to the market.
Patent Information
- Application Number
- CN202411424649.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-12
AI Technical Summary
When the existing technology improves the poor outer shallow stripes of camera modules, the technical complexity is high and requires a large amount of R&D resources. Optimizing the circuit requires more complex structures and more advanced components, which increases production costs, and the actual effect may be subject to production. The impact of process fluctuations and component performance differences in process.
By obtaining the center overexposure image of the camera module, cropping its peripheral area, using an edge detection filter to filter each column of pixel points, accumulating the filter values and comparing them with the preset threshold to determine whether there are shallow stripes in the camera module. bad.
The detection and interception of poor outer shallow stripes of the camera module during the production stage is achieved, and the shooting module with poor outer shallow stripes is avoided from flowing to the market, reducing production costs, and improving detection efficiency.
Smart Images

Figure CN119484801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of camera module detection, and in particular to a method and device for detecting and intercepting shallow stripe defects on the periphery of a camera module. Background Art
[0002] A camera module is a modular component that integrates an image sensor, an optical lens, an image processing chip, and other related circuits. This modular design makes the integration of the camera much simpler and can be easily integrated into various devices such as smartphones, tablets, smart home devices, industrial vision systems, etc.
[0003] The working principle of the camera module is that the light from the captured scene passes through the lens to project the generated optical image onto the image sensor, the light signal is converted into an electrical signal through the photodiode, and then the analog signal is converted into a digital signal through the analog-to-digital converter (ADC) and the signal is preliminarily processed before output, and then the data is processed by the ISP and finally converted into an image that can be read on the screen.
[0004] When the wiring resistance of certain columns of pixels in the image sensor deviates abnormally, resulting in a large deviation in the signal voltage, or when there is a large deviation in the threshold voltage of certain analog-to-digital converters (ADCs), light stripes will appear in the peripheral area of the image output by the camera module. In order to reduce the stripes generated when the column-type AD converter is in operation, a Chinese patent application numbered CN201410072518.6 discloses a solid-state imaging device comprising: a pixel array section, in which pixels for accumulating charges after photoelectric conversion are arranged in a matrix; a reference voltage generating circuit for generating a reference voltage; a column ADC circuit, in which a comparator is provided for comparing a pixel signal read from the above-mentioned pixel with the above-mentioned reference voltage, and the column ADC circuit calculates the AD conversion value of the above-mentioned pixel signal for each column based on the comparison result of the above-mentioned comparator; a vertical signal line for transmitting the above-mentioned pixel signal for each of the above-mentioned columns; a capacitor for performing analog sampling by holding the charge corresponding to the above-mentioned pixel signal for each of the above-mentioned columns; an inter-column short-circuit circuit for short-circuiting the above-mentioned vertical signal line between the above-mentioned columns before the above-mentioned analog sampling; and an analog sampling time control section for controlling the time from the release of the short circuit between the above-mentioned columns to the above-mentioned analog sampling.
[0005] However, improving the peripheral shallow stripe problem of the camera device by optimizing the circuit is not only technically complex, but also requires more R&D resources to be invested in the design stage, including circuit design, simulation, testing and other links. The technical threshold is relatively high, and the optimization circuit requires the use of more complex circuit structures and more advanced components, thereby increasing production costs. Although the optimization circuit solution aims to fundamentally reduce the stripe problem, its actual effect may be affected by many factors, such as process fluctuations in the production process, differences in component performance, etc., which may introduce new deviation problems. Summary of the invention
[0006] In order to solve the deficiencies of the above-mentioned prior art, the present invention provides a method and device for detecting and intercepting poor peripheral shallow streaks of a camera module, aiming to detect and intercept poor peripheral shallow streaks of a camera module during the production stage, thereby preventing camera modules with poor peripheral shallow streaks from entering the market.
[0007] The technical problem to be solved by the present invention is achieved through the following technical solutions: A method for detecting and intercepting shallow stripe defects on the periphery of a camera module comprises the following steps: Step 100: Acquire a central overexposed image of the camera module; Step 200: cropping at least one peripheral side of the central overexposed image to obtain at least one peripheral image; Step 300: using an edge detection filter to filter each column of pixels in each peripheral image to obtain a plurality of column pixel filtering values; Step 400: Accumulate the filter values of each column pixel of the same peripheral image to obtain at least one filter accumulation value; Step 500: Compare each filtered cumulative value with a preset threshold value to determine whether the camera module has peripheral shallow stripe defects.
[0008] Furthermore, in step 100, the steps of obtaining the central overexposed image of the camera module are as follows: Step 110: setting the exposure time of the camera module and the brightness value of the light source panel so that the central area of the camera module is normally exposed; Step 120: increasing the gain value of the camera module so that the central area of the camera module is overexposed; Step 130: controlling the camera module to shoot the light source panel to obtain an original image; Step 140: If there is only one original image, the original image is used as the center overexposed image; if there are multiple original images, the original images are superimposed and synthesized to obtain the center overexposed image.
[0009] Furthermore, the camera module has multiple color channels; in step 120, only the gain value of the camera module on a single color channel is increased, and in step 300, only each column of pixels in each peripheral image is filtered on a single color channel, and the color channel for increasing the gain value and filtering is the same.
[0010] Furthermore, the single color channel is a red channel.
[0011] Furthermore, the center overexposed image has four sides; in step 200, when cropping the center overexposed image, the four sides of the center overexposed image are cropped at the same time, or, based on the past detection results of the same batch of camera modules or the same model of camera modules, only one or two sides of the center overexposed image are cropped.
[0012] Furthermore, the cropping size of each peripheral image is preset or automatically generated using an algorithm.
[0013] Furthermore, when an algorithm is used to automatically generate the cropping size of each peripheral image, the brightness values of all pixels in the central overexposed image are first obtained, and then each pixel is judged whether it is overexposed based on the brightness value, and each overexposed pixel is extracted to form the central area, and each normally exposed pixel is extracted to form the peripheral area, and finally the cropping size of each peripheral image is generated according to the length and width of the peripheral area and a preset reduction ratio.
[0014] Furthermore, in step 300, before filtering each column of pixels in each peripheral image, edge enhancement processing is first performed on each peripheral image.
[0015] Further, in step 500, when one of the filter cumulative values is equal to or greater than the preset threshold, it is determined that the camera module has peripheral light stripes; when each filter cumulative value is less than the preset threshold, it is determined that the camera module does not have peripheral light stripes.
[0016] A device for detecting and intercepting shallow streaks on the periphery of a camera module includes a processor and a memory electrically connected to the processor, wherein the memory stores a computer program for execution by the processor, and when the processor executes the computer program, the processor performs the above-mentioned detection and interception method.
[0017] The present invention has the following beneficial effects: the detection and interception method of this patent performs overexposure processing on the central area of the camera module to improve the contrast between the light stripes and the pixel points in the peripheral area, thereby obtaining the central overexposed image, and then the central overexposed image is cropped and edge detected and filtered in sequence, and it is determined whether the camera module has peripheral light stripe defects based on the filtered accumulated value. The peripheral light stripe defects of the camera module can be detected and intercepted during the production stage, thereby preventing camera modules with peripheral light stripe defects from entering the market. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of the detection and interception method provided by the present invention.
[0019] Figure 2 A schematic diagram of the area of the central overexposed image of the detection and interception method provided by the present invention.
[0020] Figure 3 A schematic diagram of cropping a central overexposed image of the detection and interception method provided by the present invention.
[0021] Figure 4 Another schematic diagram of cropping the central overexposed image of the detection and interception method provided by the present invention.
[0022] Figure 5 This is another schematic diagram of cropping of a central overexposed image of the detection and interception method provided by the present invention.
[0023] Figure 6 This is a block diagram of step 100 of the detection and interception method provided by the present invention.
[0024] Figure 7 This is a principle block diagram of the detection and interception device provided by the present invention. DETAILED DESCRIPTION
[0025] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments, examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0026] In the description of the present invention, it should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0027] In addition, the terms "first", "second", and "third" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0028] In the present invention, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fix", "set" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0029] Embodiment 1 like Figure 1 As shown, a method for detecting and intercepting shallow stripes on the periphery of a camera module comprises the following steps: Step 100: Obtain a central overexposed image of the camera module.
[0030] In step 100, if Figure 2 The image output by the camera module includes a central area and a peripheral area, and the peripheral area surrounds the central area. When the wiring resistance of certain columns of pixel points of the image sensor in the camera module deviates abnormally, resulting in a large deviation in the signal voltage, or when the threshold voltage of certain analog-to-digital converters (ADCs) in the camera module has a large deviation, light stripes will appear in the peripheral area of the image output by the camera module.
[0031] The central overexposed image refers to an image in which the central area is overexposed, while the peripheral area is normally exposed. The central area and the peripheral area are determined based on the brightness distribution of the pixels. Due to the focusing effect of the optical lens, the closer the pixel is to the geometric center of the image, the greater its brightness, and the farther the pixel is from the geometric center of the image, the smaller its brightness. There is actually no obvious dividing line between the central area and the peripheral area. Therefore, this patent can define the set of overexposed pixels close to the geometric center of the image in the central overexposed image as the central area, and define the set of normally exposed pixels far from the geometric center of the image in the central overexposed image as the peripheral area.
[0032] The reason why the central area is overexposed is that the brightness of the light stripes is relatively small. When the central area is exposed normally, the brightness of the peripheral area is too low, and the brightness difference between the light stripes and the pixel points in the peripheral area is small. When the central area is overexposed, the brightness of the peripheral area is high, and the brightness difference between the light stripes and the pixel points in the peripheral area is large. The contrast between the light stripes and the pixel points in the peripheral area can be improved, which facilitates edge detection of the light stripes in the peripheral area.
[0033] Step 200: cropping at least one peripheral side of the central overexposed image to obtain at least one peripheral image.
[0034] In step 200, the central overexposed image has four side peripheries, which are respectively located at the upper side, lower side, left side and right side of the central area. For the convenience of explanation, this embodiment defines the four side peripheries of the central overexposed image as an upper periphery, a lower periphery, a left periphery and a right periphery, respectively. The upper periphery, the lower periphery, the left periphery and the right periphery are connected end to end in sequence to form a peripheral area surrounding the central area.
[0035] When cropping the center overexposed image, Figure 3 The four sides of the central overexposed image can be cropped at the same time to simultaneously obtain the upper peripheral image, the lower peripheral image, the left peripheral image and the right peripheral image of the central overexposed image, and then the four peripheral images can be detected separately to determine whether there are light stripes.
[0036] Of course, in order to improve detection efficiency, only one or both sides of the central overexposed image may be cropped based on past detection results of the same batch of camera modules or the same model of camera modules to obtain one or two peripheral images for detection to determine whether there are light stripes.
[0037] For example, Figure 4As shown, in the past detection results of a batch of camera modules or a certain model of camera modules, light stripes all appear on the left periphery. Then, when detecting the batch of camera modules or the model of camera modules, only the left periphery of the central overexposed image can be cropped to obtain the left peripheral image for detection to determine whether there are light stripes. For example, Figure 5 As shown, in the past inspection results of a batch of camera modules or a certain model of camera modules, light stripes all appear on the left periphery or the right periphery. Therefore, when inspecting this batch of camera modules or this model of camera modules, only the left periphery and the right periphery of the center overexposed image can be cropped to obtain the left peripheral image and the right peripheral image for separate inspection to determine whether light stripes exist.
[0038] The cropping size of each peripheral image can be pre-set by the inspection personnel based on experience, or can be automatically generated by an algorithm. When the algorithm is used to automatically generate the cropping size of each peripheral image, the brightness values of all pixels in the central overexposed image are first obtained, and then the brightness values are used to determine whether each pixel is overexposed, and the overexposed pixels are extracted to form the central area, and the normally exposed pixels are extracted to form the peripheral area. Finally, the cropping size of each peripheral image is generated according to the length and width of the peripheral area and the preset reduction ratio.
[0039] Step 300: Use an edge detection filter to filter each column of pixels in each peripheral image to obtain a plurality of column pixel filtering values.
[0040] In step 300, the edge detection filter may be, but is not limited to, a Laplacian filter, a gradient filter, a nonlinear filter or a high-pass filter, etc. Wherein, a column pixel filter value corresponds to a column of pixels, and a peripheral image has multiple column pixel filter values.
[0041] Preferably, before filtering each column of pixels in each peripheral image, edge enhancement processing is first performed on each peripheral image to improve the filtering effect of the edge detection filter.
[0042] In step 300, edge enhancement processing may be performed on each peripheral image by using, but not limited to, morphological filtering, adaptive filtering, or histogram equalization.
[0043] Step 400: Accumulate the filter values of each column pixel of the same peripheral image to obtain at least one filter accumulation value.
[0044] In step 400, one filter accumulation value corresponds to one peripheral image, and the center overexposed image has at least one filter accumulation value. For example, the filter values of each column pixel of the upper peripheral image are accumulated to obtain a first filter accumulation value corresponding to the upper periphery of the center overexposed image, the filter values of each column pixel of the lower peripheral image are accumulated to obtain a second filter accumulation value corresponding to the lower periphery of the center overexposed image, the filter values of each column pixel of the left peripheral image are accumulated to obtain a third filter accumulation value corresponding to the left periphery of the center overexposed image, and the filter values of each column pixel of the lower peripheral image are accumulated to obtain a fourth filter accumulation value corresponding to the lower periphery of the center overexposed image.
[0045] Step 500: Compare each filtered cumulative value with a preset threshold value to determine whether the camera module has peripheral shallow stripe defects.
[0046] In step 500, when one of the filter cumulative values is equal to or greater than the preset threshold, it is determined that the camera module has peripheral light stripes; when each filter cumulative value is less than the preset threshold, it is determined that the camera module does not have peripheral light stripes.
[0047] The detection and interception method of this patent performs overexposure processing on the central area of the camera module to improve the contrast between the light stripes and the pixels of the peripheral area, thereby obtaining the central overexposed image, and then successively performs cropping and edge detection filtering on the central overexposed image, and determines whether the camera module has peripheral light stripe defects based on the filtered accumulated value. The peripheral light stripe defects of the camera module can be detected and intercepted during the production stage, thereby preventing camera modules with peripheral light stripe defects from entering the market.
[0048] Embodiment 2 As an optimization solution of the first embodiment, in this embodiment, if Figure 6 As shown, in step 100, the steps of obtaining the central overexposed image of the camera module are as follows: Step 110: setting the exposure time of the camera module and the brightness value of the light source panel so that the central area of the camera module is normally exposed.
[0049] In step 110, the light source panel is placed in front of the lens of the camera module so that the camera module exposes the light source panel, and the exposure time of the camera module and the brightness value of the light source panel are set according to different models of the camera module so that the central area of the camera module is normally exposed, thereby preventing the exposure time of the camera module and the brightness value of the light source panel from affecting the overexposure control of the camera module.
[0050] Step 120: Increase the gain value of the camera module so that the central area of the camera module is overexposed.
[0051] In this step 120, the gain value of the camera module can be gradually increased starting from a preset initial value (generally 0) until the central area of the camera module is overexposed; the gain value of the camera module can also be directly increased to the gain value of the same batch of camera modules or the same model of camera modules when the central area is overexposed in past inspections.
[0052] Due to the focusing effect of the optical lens, the closer the pixel is to the geometric center of the image, the brighter it is, and the farther the pixel is from the geometric center of the image, the smaller its brightness is. As the gain value of the camera module increases, the brightness of the pixel close to the geometric center of the image will first reach 255. When the proportion of pixels with a brightness value of 255 in the entire image reaches a preset range (generally 10%-20%), it can be determined that the central area of the camera module is overexposed.
[0053] Step 130: Control the camera module to shoot the light source panel to obtain an original image.
[0054] In step 130, each pixel point that is overexposed (brightness value reaches 255) in the original image together forms the central area, and each pixel point that is normally exposed (brightness value is lower than 255) together forms the peripheral area.
[0055] Step 140: If there is only one original image, the original image is used as the center overexposed image; if there are multiple original images, the original images are superimposed and synthesized to obtain the center overexposed image.
[0056] In step 140, if there is only one original image shot and output by the camera module, the original image is directly used as the center overexposed image for detection. If there are multiple original images shot and output by the camera module, each original image is firstly synthesized by stacking frames, and the synthesized image is used as the center overexposed image for detection. Among them, by stacking and synthesizing multiple original images to obtain the center overexposed image, it is possible to prevent the influence of noise points in a single original image on the detection result, thereby improving the detection accuracy.
[0057] Embodiment 3 As an optimization solution for Example 2, in this embodiment, the camera module has multiple color channels; in step 120, only the gain value of the camera module on a single color channel is increased, and in step 300, only each column of pixels in each peripheral image is filtered on a single color channel, and the color channels for increasing the gain value and filtering are the same.
[0058] Since different color channels in the camera module have different sensitivities to light, this embodiment increases the gain value of the camera module on a single color channel to cause overexposure of the central area of the camera module, thereby preventing other color channels from being affected in exposure due to different sensitivities to light.
[0059] It should be noted that when determining whether the central area of the camera module is overexposed in step 120, the overall brightness value of each color channel of the pixel point is still used as the basis for judgment, rather than the channel brightness value of a single color channel.
[0060] Each pixel in the image sensor of the camera module is composed of four color channels, RG, GB, and the output image format is RAW format. After RAW interpolation conversion, the image format of the center overexposed image is RGB format. That is to say, each pixel of the center overexposed image has three color channels, RGB, among which the G channel (i.e., the green channel) is the most sensitive to light, and the R channel (i.e., the red channel) is the least sensitive to light. Therefore, under the same exposure time and light source brightness, the G channel of the center overexposed image is the brightest, and the R channel is the darkest. By increasing the gain value of the R channel to make the central area of the camera module overexposed, the contrast between the light stripes and the pixels in the peripheral area can be maximized.
[0061] Embodiment 4 like Figure 7 As shown, a detection and interception device for shallow stripe defects on the periphery of a camera module includes a processor and a memory electrically connected to the processor, wherein the memory stores a computer program for execution by the processor; when the processor executes the computer program, the detection and interception method described in Example 1, Example 2 or Example 3 is performed.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the embodiments of the present invention can still be modified or replaced by equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting and intercepting shallow streaks on the periphery of a camera module, characterized in that: The steps include: Step 100: Acquire a central overexposed image of the camera module; Step 200: cropping at least one peripheral side of the central overexposed image to obtain at least one peripheral image; Step 300: using an edge detection filter to filter each column of pixels in each peripheral image to obtain a plurality of column pixel filtering values; Step 400: Accumulate the filter values of each column pixel of the same peripheral image to obtain at least one filter accumulation value; Step 500: Compare each filtered cumulative value with a preset threshold value to determine whether the camera module has peripheral shallow stripe defects.
2. The detection and interception method according to claim 1, characterized in that: In step 100, the steps of obtaining the center overexposed image of the camera module are as follows: Step 110: setting the exposure time of the camera module and the brightness value of the light source panel so that the central area of the camera module is normally exposed; Step 120: increasing the gain value of the camera module so that the central area of the camera module is overexposed; Step 130: controlling the camera module to shoot the light source panel to obtain an original image; Step 140: If there is only one original image, the original image is used as the center overexposed image; if there are multiple original images, the original images are superimposed and synthesized to obtain the center overexposed image.
3. The detection and interception method according to claim 2, characterized in that: The camera module has multiple color channels; in step 120, only the gain value of the camera module on a single color channel is increased, and in step 300, only each column of pixels in each peripheral image is filtered on a single color channel, and the color channel for increasing the gain value and filtering is the same.
4. The detection and interception method according to claim 3, characterized in that: The single color channel is a red channel.
5. The detection and interception method according to claim 1, characterized in that: The center overexposed image has four sides; in step 200, when cropping the center overexposed image, the four sides of the center overexposed image are cropped at the same time, or, based on the past detection results of the same batch of camera modules or the same model of camera modules, only one side or two sides of the center overexposed image are cropped.
6. The detection and interception method according to claim 5, characterized in that: The crop size of each peripheral image is preset or automatically generated by an algorithm.
7. The detection and interception method according to claim 6, characterized in that: When an algorithm is used to automatically generate the cropping size of each peripheral image, the brightness values of all pixels in the central overexposed image are first obtained, and then each pixel is judged whether it is overexposed based on the brightness value, and each overexposed pixel is extracted to form the central area, and each normally exposed pixel is extracted to form the peripheral area, and finally the cropping size of each peripheral image is generated according to the length and width of the peripheral area and a preset reduction ratio.
8. The detection and interception method according to claim 1, characterized in that: In step 300, before filtering each column of pixels in each peripheral image, edge enhancement processing is first performed on each peripheral image.
9. The detection and interception method according to claim 1, characterized in that: In step 500, when one of the filter cumulative values is equal to or greater than the preset threshold, it is determined that the camera module has peripheral light stripes; when each filter cumulative value is less than the preset threshold, it is determined that the camera module does not have peripheral light stripes.
10. A device for detecting and intercepting shallow streaks on the periphery of a camera module, comprising a processor and a memory electrically connected to the processor, wherein the memory stores a computer program for execution by the processor, characterized in that: When executing the computer program, the processor performs the detection and interception method described in claim 1.
Citation Information
Patent Citations
Solid-state imaging device
CN104469184A
Control method and control device
CN106851121A
Overexposure point detection method and device, electronic equipment and storage medium
CN112700422A
Calculation device and defect detection method for near-eye display device
CN114764779A
Multi-exposure-based grayscale image generation method for TOF camera module
CN115442494A