CN115082415A - Device contamination specification determination method and device and electronic equipment - Google Patents

Device contamination specification determination method and device and electronic equipment Download PDF

Info

Publication number
CN115082415A
CN115082415A CN202210804697.2A CN202210804697A CN115082415A CN 115082415 A CN115082415 A CN 115082415A CN 202210804697 A CN202210804697 A CN 202210804697A CN 115082415 A CN115082415 A CN 115082415A
Authority
CN
China
Prior art keywords
dirty
preset
target surface
image
spectrum data
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
Application number
CN202210804697.2A
Other languages
Chinese (zh)
Inventor
高峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunshanqiu Titanium Photoelectric Technology Co Ltd
Original Assignee
Kunshanqiu Titanium Photoelectric Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kunshanqiu Titanium Photoelectric Technology Co Ltd filed Critical Kunshanqiu Titanium Photoelectric Technology Co Ltd
Priority to CN202210804697.2A priority Critical patent/CN115082415A/en
Publication of CN115082415A publication Critical patent/CN115082415A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The application discloses device dirt specification determining method, device and electronic equipment, a preset optical imaging model is built in advance according to a camera module, a plurality of different reference dirt specification dirt areas are simulated on the target surface in the preset optical imaging model, corresponding optical spectrum data are generated, then an imaging image under the action of the corresponding reference dirt specification dirt area is generated based on the optical spectrum data, and therefore whether the imaging image meets preset qualified conditions is detected, the dirt specification of the target surface is determined from a preset dirt specification sequence, the efficiency of determining the dirt specification of an optical component can be effectively improved, and the cost is reduced.

Description

Device dirt specification determining method and device and electronic equipment
Technical Field
The present disclosure relates to the field of optical detection technologies, and in particular, to a method and an apparatus for determining a device contamination specification, and an electronic device.
Background
With more and more electronic products having a camera function, such as smart phones, tablet computers, and the like, the imaging quality of the electronic products also becomes an important influence factor of the market competitiveness of the electronic products. The imaging quality is often determined by the camera module in the electronic device, and therefore, the production quality of the camera module is particularly important.
The degree of contamination of the optical components is one of the important factors affecting the imaging quality of the camera module. At present, the dirty specification of an optical component in a camera module firstly requires a manufacturer, selects different dirty specification gradient products on the surface of the optical component, then uses the selected dirty specification gradient products of the optical component to form an actual module, and then judges the imaging interval of the gradient products through actual imaging shooting, so that the imaging specification of the optical component is obtained, and then the manufacturer or internal production is carried out according to the specification. This is inefficient and also results in wasted costs.
Disclosure of Invention
By providing the device contamination specification determining method and device and the electronic equipment, the optical device contamination specification determining efficiency can be effectively improved, and the cost is reduced.
In a first aspect, an embodiment of the present application provides a device contamination specification determining method for determining a contamination specification of a surface of an optical component in a camera module, where the method includes:
acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, wherein the preset optical imaging model is constructed according to the camera module, the multiple groups of optical spectrum data are image surface illumination distribution data obtained after simulating a dirty area on the corresponding target surface according to a preset dirty specification sequence, the preset dirty specification sequence comprises multiple reference dirty specifications which are distributed from small to large, and each group of optical spectrum data of the same target surface corresponds to one reference dirty specification;
respectively generating an imaging image under the action of a dirty area of a corresponding reference dirty specification aiming at each group of optical spectrum data of each target surface based on the optical spectrum data;
and respectively aiming at each target surface, determining the dirt specification of the target surface from the preset dirt specification sequence by detecting whether the imaging image meets preset qualified conditions.
Further, each set of optical spectrum data corresponding to each target surface is generated according to the following steps:
simulating a dirty area with the same reference dirty specification at a plurality of different half-image-height positions of the target surface;
and generating illumination distribution data at the corresponding position of the image plane under the action of the simulated dirty area by performing ray tracing on the preset optical imaging model, and taking the generated illumination distribution data as a group of optical spectrum data of the corresponding target surface.
Further, the generating an imaging image under the effect of the dirty region according to the corresponding reference dirty specification based on the optical spectrum data includes:
converting the optical spectrum data into a picture containing original image information;
and based on the pixel arrangement of the image sensor in the camera module, carrying out color filtering and color analysis processing on the picture to obtain an imaging image under the action of a dirty region of a corresponding reference dirty specification.
Further, the sizes of the reference dirt specifications in the preset dirt specification sequence are arranged in an equal gradient manner, wherein the minimum size is 10 μm, the maximum size is 100 μm, and the gradient is 10 μm.
Further, the detecting whether the imaging image meets a preset qualified condition includes:
detecting a dirty point group and a bright point group in the imaging image by comparing the brightness difference between each pixel point in the imaging image and a pixel point in a preset neighborhood, wherein the dirty point group comprises a plurality of adjacent dirty points, the bright point group comprises a plurality of adjacent bright points, and the dirty points and the bright points are abnormal pixel points caused by the influence of the dirty area;
and judging whether the imaging image meets a preset qualified condition or not based on the number of the detected dirty point clusters, the number of the bright point clusters, the number of the dirty points contained in each dirty point cluster and the number of the bright points contained in each bright point cluster.
Further, the preset qualified conditions include:
the number of the dirty point groups is smaller than or equal to a first preset threshold, and the number of the dirty points contained in each dirty point group is smaller than or equal to a second preset threshold; and
the number of the bright point groups is less than or equal to a third preset threshold, and the number of the bright points contained in each bright point group is less than or equal to a fourth preset threshold.
Further, determining a soil specification of the target surface from the preset soil specification sequence includes:
and according to the sequence from small to large, determining the imaging image corresponding to the last imaging image in the preset dirt specification sequence to meet the reference dirt specification of the preset qualified condition as the dirt specification of the target surface.
Further, before acquiring multiple sets of optical spectrum data corresponding to each target surface in the preset optical imaging model, the method further includes:
acquiring reference optical spectrum data of the preset optical imaging model, wherein the reference optical spectrum data is image surface illumination distribution data obtained under the condition that each optical component in the preset optical imaging model has no dirty area;
generating a reference imaging image based on the reference optical spectrum data;
if the reference imaging image meets a preset calibration condition, executing the step of acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, and determining the dirt specification of each target surface;
and if the reference imaging image does not meet the preset calibration condition, judging that the preset optical imaging model is abnormal, and stopping determining the dirt specification of the target surface.
In a second aspect, an embodiment of the present application provides a device contamination specification determining apparatus, configured to determine a contamination specification of a surface of an optical component in a camera module, where the apparatus includes:
the data acquisition module is used for acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, wherein the preset optical imaging model is built according to the camera module, the multiple groups of optical spectrum data are image surface illumination distribution data obtained after a dirty area is simulated on the corresponding target surface according to a preset dirty specification sequence, the preset dirty specification sequence comprises a plurality of reference dirty specifications which are distributed from small to large, and each group of optical spectrum data of the same target surface corresponds to one reference dirty specification;
the generating module is used for respectively generating an imaging image under the action of a dirty area of a corresponding reference dirty specification aiming at each group of optical spectrum data of each target surface based on the optical spectrum data;
and the determining module is used for determining the dirt specification of the target surface from the preset dirt specification sequence by detecting whether the imaging image meets a preset qualified condition or not aiming at each target surface.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and a computer program stored on the memory, wherein the processor implements the steps of the device contamination specification determining method provided by the first aspect when executing the computer program.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
the device contamination specification determining method provided by the embodiment of the application is characterized in that a preset optical imaging model is built in advance according to a camera module, a plurality of different reference contamination specification contamination regions are simulated on the target surface in the preset optical imaging model, corresponding optical spectrum data are generated, then an imaging image under the action of the corresponding reference contamination specification contamination region is generated based on the optical spectrum data, whether the imaging image meets preset qualified conditions or not is detected, the contamination specification of the target surface is determined from a preset contamination specification sequence, the labor and cost are reduced, the contamination specification determination of the surface of an optical component can be efficiently and accurately completed, the quality of the optical component is favorably improved, and the production yield of the camera module is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are 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 schematic structural diagram of a camera module in an embodiment of the present application;
FIG. 2 is a flow chart of a device contamination specification determination method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a default optical imaging model in an embodiment of the present application;
FIG. 4 is a set of exemplary relative luminance optical spectrum data plots in an embodiment of the present application;
FIG. 5 is a schematic view of an exemplary dirty region layout in an embodiment of the present application;
FIG. 6 is a picture containing original image information according to an embodiment of the present application;
FIG. 7 is an imaged image in an embodiment of the present application;
FIG. 8 is a block diagram of a device contamination specification determining apparatus according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood that such description is merely illustrative and not intended to limit the scope of the present application. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present application.
Various structural schematics according to embodiments of the present application are shown in the drawings. The figures are not drawn to scale, wherein certain details are exaggerated and possibly omitted for clarity of presentation. The shapes of the various structures and the relative sizes and positional relationships therebetween shown in the drawings are merely exemplary, and deviations may occur in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design structures having different shapes, sizes, relative positions according to actual needs.
Generally, as shown in fig. 1, the image pickup module 1 includes a lens 10, an infrared cut filter 20, an image sensor 30, and the like. The contamination of the optical components, such as the infrared cut filter 20 and the lens in the lens 10, will affect the imaging quality of the assembled camera module 1. Therefore, the contamination of these optical components is strictly controlled.
Considering that the existing dirty specification determining mode is high in cost, a large amount of human resources and time are consumed, and comprehensive gradient products are difficult to select, so that verification is incomplete, and the reliability of a dirty specification determining result cannot be guaranteed.
In view of this, an embodiment of the present application provides a device contamination specification determining method, where a preset optical imaging model is built in advance according to a camera module, a target surface in the preset optical imaging model is used to simulate a plurality of contamination areas with different reference contamination specifications, and generate corresponding optical spectrum data, and then based on the optical spectrum data, an imaging image under the action of the contamination areas with the corresponding reference contamination specifications is generated, so that a contamination specification of the target surface is determined from a preset contamination specification sequence by detecting whether the imaging image meets a preset qualified condition. Therefore, the labor and cost are reduced, the dirty specification of the surface of the optical component can be efficiently and accurately determined, the quality of the optical component is improved, and the production yield of the camera module is improved.
The method, the apparatus and the electronic device for determining the device contamination specification provided in the embodiments of the present application are described in detail below. It should be understood that the specific features in the embodiments and examples of the present application are detailed description of the technical solutions in the embodiments of the present application, and are not limited to the technical solutions in the present application, and the technical features in the embodiments and examples of the present application may be combined with each other without conflict.
In a first aspect, an embodiment of the present application provides a device contamination specification determining method, which is used for determining a contamination specification of a surface of an optical component in a camera module. As shown in fig. 2, the method may include the following steps S101 to S103.
Step S101, multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model are obtained, the multiple groups of optical spectrum data are image surface illumination distribution data obtained after a corresponding target surface is simulated with a dirty area according to a preset dirty specification sequence, and each group of optical spectrum data of the same target surface corresponds to a reference dirty specification.
In this embodiment, the preset optical imaging model is constructed according to an optical imaging system in the actual camera module. For example, fig. 3 shows an exemplary preset optical imaging model, which includes a lens cover glass CG of a camera module, a lens group (e.g., including lenses L1 to L5 shown in fig. 3), an IR cut filter IR, and an image plane IMG. Incident light sequentially passes through lens cover plate glass CG, lens groups L1-L5 and an infrared cut-off filter IR and then forms an image on an image surface IMG.
In specific implementation, a target surface requiring dirty specification determination can be selected from the constructed optical imaging model according to actual needs. In an alternative embodiment, in order to reduce the data processing amount and save the specification test time, one lens surface closest to the image sensor in the lens and both surfaces of the infrared cut filter IR may be used as target surfaces. For example, in the preset optical imaging model example shown in fig. 3, the surface S1 of the lens L5 near the infrared cut filter IR, and both surfaces S2 and S3 of the infrared cut filter IR may be determined as target surfaces. Of course, in other application scenarios, other optical component surfaces in the preset optical imaging model may also be used as the target surface, for example, each surface of each optical component in the optical path may be used as the target surface, which is not limited in this embodiment.
In addition, a plurality of different reference contamination specifications are determined in advance according to actual experience, and the reference contamination specifications are arranged from small to large to form a preset contamination specification sequence. The shape of the simulated dirty area may be configured according to the requirements of the actual application scenario, and may be, for example, a circle or a square. The reference soil specification includes a simulated soil region size. For example, in the case where the shape of the dirty region is a circular shape, the size of the dirty region may be the diameter of the circular dirty region. For example, the sizes of the reference stain specifications in the preset stain specification sequence may be arranged in an equal gradient, such as a minimum size of 10 μm, a maximum size of 100 μm, and a gradient of 10 μm. Of course, other size ranges and gradients may be set according to actual needs, which is not limited in this embodiment.
Further, for each target surface, a dirty area is simulated on the target surface according to a preset dirty specification sequence. Of course, each time a target surface is simulated for a dirty region of a reference dirty specification, a set of optical spectral data of the target surface at the reference dirty specification is acquired. It should be noted that the simulation of the dirty area can be realized by arranging the light-shielding area with the corresponding specification on the surface of the component.
For example, fig. 4 shows a set of exemplary relative illumination optical spectrum data plots with half-image high field of view on the abscissa and relative illumination on the ordinate. The set of optical spectrum data was generated in the case where the S3 surface of the above infrared cut filter IR simulates a circular dirty area of a specification size of 40 μm and the imaging distance is infinite. The surface of S3 is the surface close to the image sensor in the camera module. It can be understood that the farther the imaging distance is, the closer the lens of the camera module is to the image sensor, and when the imaging distance is infinite, the lens is closest to the image sensor, and if the generated imaging image meets the preset qualified condition, the imaging image generated at other imaging distances also meets the preset qualified condition. Thus, in an alternative embodiment, the sets of optical spectrum data for each target surface may be generated at an imaging distance of infinity.
Specifically, for each target surface, the process of acquiring optical spectrum data may include: simulating a dirty area with the same reference dirty specification at a plurality of different half-image height positions of the target surface, then performing light ray tracing on the preset optical imaging model to generate illumination distribution data at a position corresponding to the image plane IMG under the action of the simulated dirty area, and taking the generated illumination distribution data as a group of optical spectrum data of the target surface.
Furthermore, according to the preset contamination specification sequence, the specification size of the simulated contamination region on the target surface is changed, and multiple groups of optical spectrum data corresponding to the target surface, that is, optical spectrum data under different contamination specifications, can be obtained. Different sets of optical spectrum data correspond to different reference stain specifications in the preset stain specification sequence. For example, a 10 μm-standard dirty region is simulated on the surface of the S3 of the IR cut filter IR in sequence, and optical spectrum data generated under the influence of the 10 μm-standard dirty region is acquired and recorded as the 1 st set of optical spectrum data corresponding to the surface of the S3; simulating a 20-micron-specification dirty area on the surface S3 of the infrared cut-off filter IR, acquiring optical spectrum data generated under the influence of the 20-micron-specification dirty area, and recording the optical spectrum data as a 2 nd group of optical spectrum data corresponding to the surface S3; by analogy, the optical spectrum data generated under the influence of the dirty area of the 100 μm specification is obtained and recorded as the 10 th group of optical spectrum data corresponding to the surface of the S3.
For example, when the target surface simulates a dirty region, as shown in fig. 5, a plurality of different half image height positions, such as P1 to P6 shown in fig. 5, may be determined on the target surface 100 based on the half image height of the effective imaging region AIMG on the image plane IMG. The half image height is half of the diagonal length of the effective imaging area AIMG. It should be noted that the 6 half image height positions P1 to P6 shown in fig. 5 are only illustrative and not limiting, and the specific division of the half image height positions may be determined according to actual needs, for example, the half image height position range may be normalized to 0 to 1, and the average is 100, and then one dirty area is set at an interval of 0.01. Considering that the relative contrast values of the images formed on the image plane IMG at the same half image height position are the same, it is enough that a dirty area is simulated at the same half image height position. It should be noted that, the dirty regions of the same specification, which are disposed at different half-image-height positions of the same surface, have different influences on the imaging, and the closer the dirty region is to the center of the component, the smaller the influence on the imaging is, and conversely, the closer the dirty region is to the edge of the component, the larger the influence on the imaging is.
Of course, in other embodiments of the present invention, the dirty area may also be simulated at only one designated position on one target surface, and the simulated position of the specific dirty area on the target surface may be determined according to the needs of the actual scene, which is not limited in this embodiment.
In an optional implementation manner, in order to further improve the accuracy of the dirty specification determination result, a preset calibration condition for the imaging quality configuration to be achieved may be configured according to an ideal condition, that is, under the condition that each optical component in the optical imaging model meets the design specification of the camera module and is not dirty, for calibrating the constructed optical imaging model. Then, before the above step S101 is performed, an imaging calibration step is performed.
Specifically, the imaging calibration step may include: acquiring reference optical spectrum data of a preset optical imaging model, wherein the reference optical spectrum data is image surface illumination distribution data obtained under the condition that each optical component in the preset optical imaging model has no dirty area; generating a reference imaging image based on the reference optical spectrum data; if the reference imaging image meets the preset calibration condition and indicates that the preset optical imaging model is not abnormal, the steps S101 to S103 can be executed on the basis of the preset optical imaging model to determine the contamination specification of each target surface; and if the reference imaging image does not meet the preset calibration condition, judging that the preset optical imaging model is abnormal, and stopping determining the dirt specification of the target surface. For example, a prompt message may be issued to prompt an abnormality in the optical imaging model, which requires that the abnormality in the model itself be resolved. It should be noted that, in the above-described process, the implementation process of generating the reference imaged image based on the reference optical spectrum data is similar to the implementation process of generating the imaged image based on the optical spectrum data in the following step S102, and the specific implementation process will be described in relevant parts of the following step S102.
Therefore, the problem of the optical imaging model can be avoided from influencing the imaging quality, the imaging abnormity in the imaging image obtained in the subsequent step is ensured to be caused by the simulated dirty area, and the accuracy of the dirty specification determination result is improved.
And S102, generating an imaging image under the action of the dirty area of the corresponding reference dirty specification based on the optical spectrum data respectively aiming at each group of optical spectrum data of each target surface.
Specifically, in an alternative embodiment, each set of optical spectrum data obtained in step S101 may be respectively converted into a picture containing original image information; and then, based on the pixel arrangement of the image sensor in the camera module, carrying out color filtering and color analysis processing on the picture to obtain an imaging image under the action of a dirty region of a corresponding reference dirty specification.
Since the relative illuminance values of the same half image height position (the same elliptical dotted line position shown in fig. 5) on the target surface imaged on the image plane IMG are the same, for each target surface, a set of optical spectrum data (for example, when the dirty regions of the same reference dirty specification are set at P1-P6, the relative illuminance data at the corresponding position on the image plane IMG) is obtained, and the relative illuminance values at the corresponding position on the image plane IMG when the dirty regions of the reference dirty specification are set at other positions on the target surface can be obtained. In this way, when the reference contamination specification contamination area is laid on the entire target surface, the relative illuminance distribution of the effective imaging area on the image plane IMG can be obtained, so as to obtain a picture including the original image information, as shown in fig. 6, the specific conversion process may refer to the related art. In practical applications, the picture is in color, and fig. 6 shows the picture after the gray processing.
It should be noted that the original image converted from the optical spectrum data can be understood as an image that has not been subjected to color filtering and subsequent color analysis processing by the image sensor when the actual image capturing module is used. Further, in an actual application scene, corresponding Color filtering processing is performed on a picture by referring to pixel arrangement in an image sensor of the camera module, that is, arrangement of a Color Filter Array (CFA for short), and then Color analysis is performed to obtain three primary Color component data, so as to obtain Color imaging data, that is, an imaging image, as shown in fig. 7. It should be noted that, in practical applications, the imaged image is in color, and fig. 7 shows the imaged image after the gray-scale processing is performed. For example, in the case where filters of odd-numbered rows of the CFA are arranged in a cycle of RGRG and filters of even-numbered rows are arranged in a cycle of GBGB in the image sensor, the weight of green (G) is 2 and the weights of red (R) and blue (B) are 1 in each pixel. The specific process can refer to the color filtering and color analysis principle of the image sensor, and is not described in detail here.
Thus, for each target surface, a set of imaging data, and thus an imaged image, may be obtained for each reference smudge specification in the preset smudge specification sequence. For example, taking the example that the target surface includes the S1 surface of the lens L5, and the S2 surface and the S3 surface of the IR cut filter IR, and the preset contamination specification sequence includes 10 μm, 20 μm, … …, and 100 μm, through the above steps S101 and S102, 10 imaged images corresponding to the S1 surface, 10 imaged images corresponding to the S2 surface, and 10 imaged images corresponding to the S3 surface can be obtained, respectively, and one imaged image corresponds to one reference contamination specification.
Further, the following step S103 of determining the contamination standard may be executed for the obtained imaged image.
Step S103, determining the dirt specification of the target surface from a preset dirt specification sequence by detecting whether the imaging image meets a preset qualified condition or not aiming at each target surface.
Before the dirty specification is judged, qualified conditions are configured in advance according to the imaging quality requirement of an actual camera module, and the qualified conditions are used for measuring the influence of dirty areas with different specifications on imaging.
For example, the imaging requirements of the camera module are as follows: allowing a dirty point groups, wherein the dirty point group is composed of a plurality of adjacent dirty points, and each dirty point group allows N dirty points; b bright spot groups are allowed to exist, each bright spot group is composed of a plurality of adjacent bright spots, and each bright spot group is allowed to have M bright spots, wherein a, b, N and M are determined according to the requirements of the actual application scene. It can be understood that the dirty points and the bright points are brightness abnormal pixel points, wherein the dirty points are pixel points with too low brightness, and the bright points are pixel points with too high brightness. Then, the preset qualification conditions may include: dirty dot sub-conditions and bright dot sub-conditions, the dirty dot population number quantum conditions are as follows: the quantity of the dirty point groups in the imaging image is less than or equal to a first preset threshold, the quantity of the dirty points contained in each dirty point group is less than or equal to a second preset threshold, and the bright point group quantity quantum condition is as follows: the number of the bright spot groups in the imaging image is smaller than or equal to a third preset threshold, and the number of the bright spot groups in each bright spot group is smaller than or equal to a fourth preset threshold. The first preset threshold, the second preset threshold, the third preset threshold and the fourth preset threshold can be set according to the a, the N, the b and the M and the actual specification test requirements.
Thus, the process of detecting whether the imaged image meets the preset qualified condition may include: and detecting dirty point groups and bright point groups in the imaged image, and judging whether the imaged image meets a preset qualified condition or not based on the number of the detected dirty point groups, the number of the detected bright point groups, the number of the dirty points contained in each dirty point group and the number of the detected bright points contained in each bright point group. The dirty points and the bright points are considered as abnormal pixel points caused by the influence of the dirty areas.
Taking the above qualified condition as an example, if the number of the detected dirty point clusters is less than or equal to a first preset threshold, and the number of the dirty points included in each dirty point cluster is less than or equal to a second preset threshold; if the number of the bright point groups is less than or equal to a third preset threshold and the number of the bright points contained in each bright point group is less than or equal to a fourth preset threshold, judging that the imaged image meets a preset qualified condition; on the contrary, if the number of the detected dirty point groups is greater than the first preset threshold, or there are dirty point groups whose number of the dirty points is greater than the second preset threshold, or the number of the detected bright point groups is greater than the third preset threshold, or there are bright point groups whose number of the bright points is greater than the fourth preset threshold, it is determined that the imaged image does not satisfy the preset qualified condition. For example, the imaged image illustrated in fig. 7 (a) does not satisfy the preset qualification condition, a dirty point group having a number of dirty points greater than the second preset threshold exists at the elliptical labeling position, and the imaged image illustrated in fig. 7 (b) satisfies the preset qualification condition.
Specifically, the dirty point group and the bright point group in the imaging image can be detected by comparing the brightness difference between each pixel point in the imaging image and the pixel point in the preset neighborhood. For example, sub-images of each color channel in each imaged image, such as an R channel sub-image, a G channel sub-image, and a B channel sub-image, may be extracted first; then, dirty dot group and bright dot group detection are performed for the sub-images of each color channel, respectively. For example, the luminance of the ith pixel point in the sub-image is recorded as Pi, the average luminance of 8 pixel points around the pixel point is recorded as Yi, if (Yi-Pi)/Yi 100 > a dirty point contrast threshold, the ith pixel point is recorded as a dirty point, and if (Pi-Yi)/Yi 100 > a bright point contrast threshold, the ith pixel point is recorded as a bright point. Further, all adjacent dirty dots are recorded as a dirty dot group, and all adjacent bright dots are recorded as a bright dot group.
It should be noted that, if each color channel sub-image satisfies the preset qualified condition, the imaged image is considered to satisfy the preset qualified condition, and if any one color channel sub-image does not satisfy the preset qualified condition, the imaged image is considered to not satisfy the preset qualified condition.
Alternatively, in another embodiment, the imaged image may be compared with the reference imaged image satisfying the preset calibration condition, and a dirty spot and a bright spot in the imaged image may be detected. For example, the sub-images of each color channel in each imaged image and the sub-images of each color channel in the reference imaged image may be extracted, the luminance of the i-th pixel in each color channel of the imaged image is denoted as Pi, the luminance of the i-th pixel in the sub-image of the corresponding color channel of the reference imaged image is denoted as Yi ', if (Yi ' -Pi)/Yi ' × 100 > a dirty point contrast threshold, the i-th pixel is denoted as a dirty point, and if (Pi-Yi ')/Yi ' × 100 > a bright point contrast threshold, the i-th pixel is denoted as a bright point.
It should be noted that there are various ways of determining whether an imaged image is qualified, and the method is not limited to the above-listed embodiments, and reference may be made to the related art.
For each target surface, each imaging image corresponds to one reference dirt specification, and whether the dirt area with the corresponding reference dirt specification on the target surface can bring influence on imaging quality can be judged by detecting whether the imaging image meets the preset qualified condition.
In specific implementation, the detection sequence of the imaging image corresponding to the preset contamination specification sequence may be determined according to actual needs, which is not limited in this embodiment.
For example, the reference contamination standard that the last corresponding imaging image in the preset contamination standard sequence satisfies the preset qualified condition may be determined as the contamination standard of the target surface according to the order from small to large for each target surface. For example, taking the S1 surface of the lens L5 as an example, the imaged images corresponding to the reference contamination standards 10 μm, 20 μm, 30 μm, 40 μm … …, and 100 μm are sequentially named as No. 1-10 imaged images. And sequentially detecting each imaging image according to the sequence of the No. 1 to No. 10 imaging images, wherein the No. 1 to No. 4 imaging images all meet preset qualified conditions, and the No. 5 imaging image does not meet the preset qualified conditions, so that the reference dirt specification of the last corresponding imaging image meeting the preset qualified conditions is 40 mu m, and the 40 mu m is determined as the dirt specification of the surface of S1.
Or, in the preset contamination specification sequence, the first corresponding imaged image in the preset contamination specification sequence may meet the reference contamination specification of the preset qualified condition, and be determined as the contamination specification of the target surface. For example, in the above example, each imaged image is detected in order of No. 10-1 imaged images, and the reference stain specification for which the first corresponding imaged image satisfies the preset qualification condition is also 40 μm.
This allows the dirty specification for each target surface to be determined. It should be noted that, if the target surface includes one lens surface closest to the image sensor in the lens and two surfaces of the infrared cut filter IR, such as the S1 surface, the S2 surface and the S3 surface shown in fig. 3, the contamination specifications of the S1 surface, the S2 surface and the S3 surface can be determined respectively, the other lens surfaces in the lens are farther from the image sensor than the S1 surface, the contamination specification of the S1 surface can also be used as the contamination specifications of the other lens surfaces, and when the contamination specifications are met, the imaging requirements of the imaging module can be met.
Afterwards, when the module is made a video recording in production, just can make a video recording required each optical components of module as the camera lens contains according to the dirty specification that determines, infrared cut-off filter IR carries out dirty detection, in time rejects the optical components who exceeds dirty specification, avoids dirty article to get into follow-up production flow and causes the material extravagant, guarantees the imaging quality of product.
Compared with the existing dirty specification determining mode, the device dirty specification determining method provided by the embodiment of the application does not need to consume a large amount of human resources and expenses to purchase dirty specification gradient products, and is beneficial to reducing the labor and expense costs. Moreover, the influence of various different reference dirt specifications on imaging can be comprehensively verified by simulating a dirty area on the surface of the target, the problem that verification is incomplete due to the fact that comprehensive gradient products are difficult to select is solved, the dirty specification determination on the surface of the optical component is efficiently and accurately completed, the quality of the optical component is favorably improved, and the production yield of the camera module is improved.
In a second aspect, based on the same inventive concept, an embodiment of the present application further provides a device contamination specification determining apparatus, configured to determine a contamination specification of a surface of an optical component in a camera module. As shown in fig. 8, the device contamination specification determining apparatus 80 includes:
the data acquisition module 801 is configured to acquire multiple sets of optical spectrum data corresponding to each target surface in a preset optical imaging model, where the preset optical imaging model is constructed according to the camera module, the multiple sets of optical spectrum data are image plane illumination distribution data obtained after a dirty area is simulated on the corresponding target surface according to a preset dirty specification sequence, the preset dirty specification sequence includes multiple reference dirty specifications which are arranged from small to large, and each set of optical spectrum data of the same target surface corresponds to one reference dirty specification;
a generating module 802, configured to generate, based on each set of optical spectrum data of each target surface, an imaging image under the action of a dirty region in a corresponding reference dirty specification;
a determining module 803, configured to determine, for each target surface, a contamination specification of the target surface from the preset contamination specification sequence by detecting whether the imaged image meets a preset qualified condition.
In an optional implementation manner, the data obtaining module 801 is specifically configured to:
simulating a dirty area with the same reference dirty specification at a plurality of different half-image-height positions of the target surface;
and generating illumination distribution data at the corresponding position of the image plane under the action of the simulated dirty area by performing ray tracing on the preset optical imaging model, and taking the generated illumination distribution data as a group of optical spectrum data of the corresponding target surface.
In an optional implementation manner, the generating module 802 is specifically configured to:
converting the optical spectrum data into a picture containing original image information;
and based on the pixel arrangement of the image sensor in the camera module, carrying out color filtering and color analysis processing on the picture to obtain an imaging image under the action of a dirty region of a corresponding reference dirty specification.
In an optional embodiment, the reference stain specifications in the preset stain specification sequence are arranged in an equal gradient of sizes, wherein the minimum size is 10 μm, the maximum size is 100 μm, and the gradient is 10 μm.
In an optional implementation manner, the determining module 803 is specifically configured to:
detecting a dirty point group and a bright point group in the imaging image by comparing the brightness difference between each pixel point in the imaging image and a pixel point in a preset neighborhood, wherein the dirty point group comprises a plurality of adjacent dirty points, the bright point group comprises a plurality of adjacent bright points, and the dirty points and the bright points are abnormal pixel points caused by the influence of the dirty area;
and judging whether the imaging image meets a preset qualified condition or not based on the number of the detected dirty point clusters, the number of the bright point clusters, the number of the dirty points contained in each dirty point cluster and the number of the bright points contained in each bright point cluster.
In an optional embodiment, the preset qualified condition includes:
the number of the dirty point groups is smaller than or equal to a first preset threshold, and the number of the dirty points contained in each dirty point group is smaller than or equal to a second preset threshold; and
the number of the bright point groups is less than or equal to a third preset threshold, and the number of the bright points contained in each bright point group is less than or equal to a fourth preset threshold.
In an optional implementation manner, the determining module 803 is specifically configured to:
and according to the sequence from small to large, determining the imaging image corresponding to the last imaging image in the preset dirt specification sequence to meet the reference dirt specification of the preset qualified condition as the dirt specification of the target surface.
In an alternative embodiment, the device contamination specification determining apparatus 80 further includes: a calibration module to:
acquiring reference optical spectrum data of the preset optical imaging model, wherein the reference optical spectrum data is image surface illumination distribution data obtained under the condition that each optical component in the preset optical imaging model has no dirty area;
generating a reference imaging image based on the reference optical spectrum data;
if the reference imaging image meets a preset calibration condition, executing the step of acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, and determining the dirt specification of each target surface;
and if the reference imaging image does not meet the preset calibration condition, judging that the preset optical imaging model is abnormal, and stopping determining the dirt specification of the target surface.
The modules may be implemented by software codes, or may be implemented by hardware, for example, an integrated circuit chip.
It should be further noted that, for the specific process of implementing the respective function by each module, please refer to the specific content described in the foregoing method embodiments, which is not described herein again.
In a third aspect, based on the same inventive concept, an embodiment of the present application further provides an electronic device, for example, the electronic device may be a terminal device or a server. As shown in fig. 9, the electronic device comprises a memory 904, one or more processors 902 and a computer program stored on the memory 904 and executable on the processors 902, the processor 902 when executing the program implementing the steps of any of the embodiments of the device fouling specification determining method as provided in the first aspect above.
Where in fig. 9 a bus architecture (represented by bus 900), bus 900 may include any number of interconnected buses and bridges, and bus 900 links together various circuits including one or more processors, represented by processor 902, and memory, represented by memory 904. The bus 900 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 905 provides an interface between the bus 900 and the receiver 901 and transmitter 903. The receiver 901 and the transmitter 903 may be the same element, i.e., a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 902 is responsible for managing the bus 900 and general processing, and the memory 904 may be used for storing data used by the processor 902 in performing operations.
It is to be understood that the configuration shown in fig. 9 is merely illustrative, and that electronic devices provided by embodiments of the present invention may include more or fewer components than shown in fig. 9, or have a different configuration than shown in fig. 9. The components shown in fig. 9 may be implemented in hardware, software, or a combination thereof.
In a fourth aspect, based on the same inventive concept, embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any embodiment of the device contamination specification determining method provided in the first aspect.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus, and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element. The term "plurality" means more than two, including two or more.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A device contamination specification determining method for determining a contamination specification of a surface of an optical component in a camera module, the method comprising:
acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, wherein the preset optical imaging model is constructed according to the camera module, the multiple groups of optical spectrum data are image surface illumination distribution data obtained after a corresponding target surface is simulated with a dirty area according to a preset dirty specification sequence, the preset dirty specification sequence comprises multiple reference dirty specifications which are distributed from small to large, and each group of optical spectrum data of the same target surface corresponds to one reference dirty specification;
respectively generating an imaging image under the action of a dirty area of a corresponding reference dirty specification aiming at each group of optical spectrum data of each target surface based on the optical spectrum data;
and respectively determining the dirt specification of the target surface from the preset dirt specification sequence by detecting whether the imaging image meets a preset qualified condition or not aiming at each target surface.
2. The method of claim 1, wherein each set of optical spectrum data corresponding to each target surface is generated according to the following steps:
simulating a dirty area with the same reference dirty specification at a plurality of different half-image-height positions of the target surface;
and generating illumination distribution data at the corresponding position of the image plane under the action of the simulated dirty area by performing ray tracing on the preset optical imaging model, and taking the generated illumination distribution data as a group of optical spectrum data of the corresponding target surface.
3. The method of claim 1, wherein generating an image under the influence of a corresponding reference soil specification soil region based on the optical spectrum data comprises:
converting the optical spectrum data into a picture containing original image information;
and based on the pixel arrangement of the image sensor in the camera module, carrying out color filtering and color analysis processing on the picture to obtain an imaging image under the action of a dirty region of a corresponding reference dirty specification.
4. The method of claim 1, wherein the reference stain specifications in the predetermined stain specification sequence are arranged in an equal gradient of sizes, wherein the minimum size is 10 μm, the maximum size is 100 μm, and the gradient is 10 μm.
5. The method according to claim 1, wherein the detecting whether the imaged image meets a preset qualification condition comprises:
detecting a dirty point group and a bright point group in the imaging image by comparing the brightness difference between each pixel point in the imaging image and a pixel point in a preset neighborhood, wherein the dirty point group comprises a plurality of adjacent dirty points, the bright point group comprises a plurality of adjacent bright points, and the dirty points and the bright points are abnormal pixel points caused by the influence of the dirty area;
and judging whether the imaging image meets a preset qualified condition or not based on the number of the detected dirty point clusters, the number of the bright point clusters, the number of the dirty points contained in each dirty point cluster and the number of the bright points contained in each bright point cluster.
6. The method of claim 5, wherein the preset qualifying condition comprises:
the number of the dirty point groups is smaller than or equal to a first preset threshold, and the number of the dirty points contained in each dirty point group is smaller than or equal to a second preset threshold; and
the number of the bright point groups is less than or equal to a third preset threshold, and the number of the bright points contained in each bright point group is less than or equal to a fourth preset threshold.
7. The method of claim 1, wherein determining the soil specification for the target surface from the preset soil specification sequence comprises:
and according to the sequence from small to large, determining the imaging image corresponding to the last imaging image in the preset dirt specification sequence to meet the reference dirt specification of the preset qualified condition as the dirt specification of the target surface.
8. The method of claim 1, before acquiring the plurality of sets of optical spectrum data corresponding to each target surface in the preset optical imaging model, further comprising:
acquiring reference optical spectrum data of the preset optical imaging model, wherein the reference optical spectrum data is image surface illumination distribution data obtained under the condition that each optical component in the preset optical imaging model has no dirty area;
generating a reference imaging image based on the reference optical spectrum data;
if the reference imaging image meets a preset calibration condition, executing the step of acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, and determining the dirt specification of each target surface;
and if the reference imaging image does not meet the preset calibration condition, judging that the preset optical imaging model is abnormal, and stopping determining the dirt specification of the target surface.
9. A device contamination specification determining apparatus for determining a contamination specification of a surface of an optical component in a camera module, the apparatus comprising:
the data acquisition module is used for acquiring multiple groups of optical spectrum data corresponding to each target surface in a preset optical imaging model, wherein the preset optical imaging model is built according to the camera module, the multiple groups of optical spectrum data are image surface illumination distribution data obtained after a dirty area is simulated on the corresponding target surface according to a preset dirty specification sequence, the preset dirty specification sequence comprises a plurality of reference dirty specifications which are distributed from small to large, and each group of optical spectrum data of the same target surface corresponds to one reference dirty specification;
the generating module is used for respectively generating an imaging image under the action of a dirty area of a corresponding reference dirty specification aiming at each group of optical spectrum data of each target surface based on the optical spectrum data;
and the determining module is used for determining the dirt specification of the target surface from the preset dirt specification sequence by detecting whether the imaging image meets a preset qualified condition or not aiming at each target surface.
10. An electronic device, comprising: a processor, a memory and a computer program stored on the memory, wherein the steps of the method of any one of claims 1-8 are implemented when the computer program is executed by the processor.
CN202210804697.2A 2022-07-08 2022-07-08 Device contamination specification determination method and device and electronic equipment Pending CN115082415A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210804697.2A CN115082415A (en) 2022-07-08 2022-07-08 Device contamination specification determination method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210804697.2A CN115082415A (en) 2022-07-08 2022-07-08 Device contamination specification determination method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115082415A true CN115082415A (en) 2022-09-20

Family

ID=83258306

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210804697.2A Pending CN115082415A (en) 2022-07-08 2022-07-08 Device contamination specification determination method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115082415A (en)

Similar Documents

Publication Publication Date Title
CN109068025B (en) Lens shadow correction method and system and electronic equipment
CN102821285A (en) Digital film playing method and digital film playing system as well as digital film optimizing device
CN102165783A (en) Image capture using separate luminance and chrominance sensors
CN102316326A (en) Image processing device, image processing method, and program
US8488004B2 (en) System and method for identifying discrepancy of image of object
CN104639923A (en) Method and device for processing image data, and terminal
CN102035988A (en) System and method for testing photographic effect of mobile phone camera
CN112004077B (en) Calibration method and device for off-screen camera, storage medium and electronic equipment
US20230410369A1 (en) Method and apparatus for adjusting an image acquisition apparatus, compensation method of a display panel, device and medium
US11875531B1 (en) Detection method, electronic device, and computer-readable storage medium
CN103458194B (en) Method and device for analyzing exposure degree of digital image and video and digital imaging system
US10951806B2 (en) Sensor system, information processing device, and sensor management method
US20120140084A1 (en) System and method for marking discrepancies in image of object
CN112150392A (en) Low-illumination image restoration method and device
CN115082415A (en) Device contamination specification determination method and device and electronic equipment
CN111917986A (en) Image processing method, medium thereof, and electronic device
US11245881B2 (en) Method and apparatus for correcting color convergence error
CN110033412B (en) Image processing method and device
CN115297257A (en) Method, device and equipment for acquiring multiple paths of video streams
US20190265681A1 (en) Sensor system, information processing device, and sensor management method
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN115346464A (en) Display compensation data setting method, display compensation method and driving chip
CN111595438B (en) Method and device for detecting stability of burning light source of module AWB
CN114866755B (en) Automatic white balance method and device, computer storage medium and electronic equipment
CN112712004B (en) Face detection system, face detection method and device and electronic equipment

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