CN106791807A - A kind of method and apparatus of camera module dust detection - Google Patents

A kind of method and apparatus of camera module dust detection Download PDF

Info

Publication number
CN106791807A
CN106791807A CN201611141723.9A CN201611141723A CN106791807A CN 106791807 A CN106791807 A CN 106791807A CN 201611141723 A CN201611141723 A CN 201611141723A CN 106791807 A CN106791807 A CN 106791807A
Authority
CN
China
Prior art keywords
brightness
data
column
row
stain
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.)
Granted
Application number
CN201611141723.9A
Other languages
Chinese (zh)
Other versions
CN106791807B (en
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.)
Goertek Optical Technology Co Ltd
Original Assignee
Goertek Techology 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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201611141723.9A priority Critical patent/CN106791807B/en
Publication of CN106791807A publication Critical patent/CN106791807A/en
Application granted granted Critical
Publication of CN106791807B publication Critical patent/CN106791807B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a kind of method and apparatus of camera module dust detection, methods described includes sampling image brightness data line by line or by column with predetermined sampling unit and step-length, the brightness gradient data for characterizing brightness gradual change degree between one's own profession or this row neighbouring sample point is obtained according to every row or each column luma sample, and whether there is stain in sample area described in rule judgment according to judging.According in the presence of stain, the brightness degree data at stain are located at the numerical intervals [C of zero crossings to the technical program1,C0] outside, if there is K abnormal data in continuous J brightness gradual change degrees of data, judge the affiliated sample area of the abnormal data and whether there is stain and stain position so as to rapidly and accurately judge the camera module to be detected for stain region.

Description

A kind of method and apparatus of camera module dust detection
It is on November 24th, 2014, Application No. 201410679535.6, entitled that present patent application is the applying date A kind of divisional application of the Chinese invention patent application of " method and apparatus of camera module dust detection ".
Technical field
The present invention relates to technical field of data processing, the method and dress of more particularly to a kind of camera module dust detection Put.
Background technology
The detection of camera head stain is always the technical barrier of generally existing in camera module manufacturer's industry.Existing skill The detection mode of art generally shoots a pair using the uniform source of light by camera module just to constant low colour temperature under certain distance Photo, and to data analysis, capture meets the abnormal data of stain feature, and give and recognize.But, how to determine stain feature Standard, prior art does not have a unification and effective standard, causes current camera module dust detection accuracy rate relatively low.
The content of the invention
The invention provides a kind of method and apparatus of camera module dust detection, camera can be quick and precisely judged Module whether there is stain.
To reach above-mentioned purpose, the technical proposal of the invention is realized in this way:
On the one hand, a kind of detection method of camera module stain is the embodiment of the invention provides, methods described includes:
Obtain the brightness data that camera module to be detected is just shooting the image of photo to flat-white light source;
With predetermined sampling unit and sampling step length line by line or by column to the brightness data sampling of described image, the row is obtained Or the unit luma samples value of each sampling unit of the row;
Unit luma samples value according to every row or each column determines to characterize brightness gradual change between one's own profession or this row neighbouring sample point The brightness gradual change degrees of data of degree;When the sample area of where each row or each column does not exist stain, the brightness gradual change degrees of data It is maintained at the numerical intervals [- C of zero crossings1,C0] in;When the brightness degree data jump to numerical intervals [- C1,C0] Outside when, determine the brightness gradual change degrees of data for abnormal data ,-C1And C0It is dust detection threshold value;
The brightness gradual change degrees of data according to every row or each column judges described image line by line or column by column, described to detect Camera module whether there is stain.
It is preferably, described that with predetermined sampling unit and sampling step length, the brightness data to described image is adopted line by line or by column Sample, the unit luma samples value for obtaining each sampling unit of the row or each sampling unit of the row includes:
Using the square area of pixel L*L as sampling unit, with L/2 as sampling step length;
Since the upper left corner of described image, the origin coordinates of sampling is (L/2, L/2), from left to right line by line or on to Under sampled column by column, wherein, when carrying out next line or next column and sampling, corresponding lastrow or previous column are sampled The ordinate of initial coordinate increases L/2 or abscissa and increases the initial coordinate or next column sampling sampled as next line after L/2 Initial coordinate;
Obtain every time sampling L*L pixel brightness value, and with the brightness value of the L*L pixel cube with As the unit luma samples value of the sampling unit of each sampling.
Preferably, the basis is often gone or the unit of each column adopts luma samples value determination sign one's own profession or this row neighbouring sample The brightness degree data of brightness gradual change degree include between point:
Assuming that when the sampling of the i-th row/column is carried out to described image, M unit luma samples value is obtained successively, wherein n-th Unit luma samples value is Yn
Following computing is done to the M unit luma samples value:
The brightness calculated between adjacent two sampled point of the i-th row/column deviates Percentage, obtains M-1 brightness and deviates percent data Sn, wherein W is the width of image;
Percent data S is deviateed to the M-1 brightnessnFollowing computing is done again:
Determine the i-th row/ The brightness gradual change degree between adjacent three sampled point is arranged, M-2 brightness gradual change degrees of data Q is obtainedn
Preferably, when the brightness degree data jump to numerical intervals [- C1,C0] outside when, determine the brightness gradually It is abnormal data to become degrees of data, including:
When stain occurs, and sampling unit, in stain left hand edge or top edge, the brightness degree data jump is arrived Less than-C1Negative peak;, in stain right hand edge or lower edge, the brightness degree data jump is to more than C for sampling unit0 Positive peak.
Preferably, the basis is often gone or the brightness gradual change degrees of data of each column is judged line by line or column by column, with Detect that the camera module includes with the presence or absence of stain:
In all brightness gradual change degrees of data of every row or each column, if occurring K in continuous J brightness gradual change degrees of data Less than-C1Or more than C0Abnormal data, then the sample area for judging the K abnormal data is stain region, the shooting There is stain in head mould group, otherwise, the camera module does not exist stain, and wherein K >=0.6J, J are according to different stain models Correlation values statistics is carried out to determine.
On the other hand, a kind of detection means of camera module stain is the embodiment of the invention provides, described device includes:
Unit luma samples value acquiring unit, for predetermined sampling unit and sampling step length line by line or by column to passing through Camera module to be detected just to flat-white light source shoot photo obtain image brightness data sampling, obtain the row or The unit luma samples value of the row;
Brightness degree data capture unit, for determining to characterize one's own profession according to the unit luma samples value of often row or each column Or between this row neighbouring sample point brightness gradual change degree brightness gradual change degrees of data;The sample area of where each row or each column does not exist During stain, the brightness gradual change degrees of data is maintained at the numerical intervals [- C of zero crossings1,C0] in;When the brightness gradual change number of degrees According to jumping to numerical intervals [- C1,C0] outside when, determine the brightness gradual change degrees of data for abnormal data ,-C1And C0It is stain Detection threshold value;
Detection unit, for judging the figure line by line or column by column according to the brightness gradual change degrees of data of often row or each column Picture, to detect that the camera module whether there is stain.
Preferably, the unit luma samples value acquiring unit is further used for,
Using the square area of pixel L*L as sampling unit, with L/2 as sampling step length;
Since the upper left corner of described image, the origin coordinates of sampling is (L/2, L/2), from left to right line by line or from upper Sampled column by column downwards, wherein, when next line is carried out or next column is sampled, corresponding lastrow or previous column are sampled The ordinate of initial coordinate increase that L/2 or abscissa increase the initial coordinate sampled as next line after L/2 or next column is adopted The initial coordinate of sample;
Obtain every time sampling L*L pixel brightness value, and with the brightness value of the L*L pixel cube with As the unit luma samples value of the sampling unit of each sampling.
Preferably, the brightness degree data capture unit is further used for,
Assuming that when the sampling of the i-th row/column is carried out to described image, M unit luma samples value is obtained successively, wherein n-th Unit luma samples value is Yn
Following computing is done to the M unit luma samples value:
The brightness calculated between adjacent two sampled point of the i-th row/column deviates Percentage, obtains M-1 brightness and deviates percent data Sn, wherein W is the width of image;
Percent data S is deviateed to the M-1 brightnessnFollowing computing is done again:
Determine the i-th row/ The brightness gradual change degree between adjacent three sampled point is arranged, M-2 brightness gradual change degrees of data Q is obtainedn
Preferably, the brightness degree data that the brightness degree data capture unit determines include:
When stain occurs, and sampling unit, in stain left hand edge or top edge, the brightness degree data jump is arrived Less than-C1Negative peak;, in stain right hand edge or lower edge, the brightness degree data jump is to more than C for sampling unit0 Positive peak.
Preferably, the detection unit is further used for,
In all brightness gradual change degrees of data of every row or each column, if there is K in continuous J brightness gradual change degrees of data Individual absolute value is more than C0Abnormal data, then the sample area for judging the K abnormal data is stain region, the camera There is stain in module, otherwise, the camera module does not exist stain;Wherein K >=0.6J, J enter according to different stain models Row correlation values statistics determines.
The beneficial effect of the embodiment of the present invention is:The detection method and device of the camera module stain that the present invention is provided, The brightness data for just shooting the image of photo to flat-white light source to camera module to be detected is carried out from left to right line by line Or from up to down sampling by column, the unit luma samples value according to every row or each column obtained for characterizing one's own profession or this row phase The brightness gradual change degrees of data of brightness gradual change degree between adjacent sampled point, due to when there is stain in the sample area of every row or each column, Brightness gradual change degrees of data at stain, therefore can be according to brightness degree different from the brightness gradual change degrees of data in surrounding normal region Data rapidly and accurately judge the camera module to be detected with the presence or absence of stain, and stain position is determined when there is stain Put.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the method for camera module dust detection provided in an embodiment of the present invention;
Fig. 2 is the image shot in face of constant low colour temperature uniform source of light using spotless camera module;
Fig. 3 be it is provided in an embodiment of the present invention by single file or single-row sampling luma samples value curvilinear motion schematic diagram;
Fig. 4 is the unit luma samples value of spotless single file sampling provided in an embodiment of the present invention, brightness deviation percentage Than and brightness degree curvilinear motion schematic diagram
Fig. 5 is unit luma samples value, the brightness deviation hundred of the single file sampling that there is stain provided in an embodiment of the present invention Divide ratio and brightness degree curvilinear motion schematic diagram;
Fig. 6 is the structural representation of the device of camera module dust detection provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention Formula is described in further detail.
Fig. 1 is the schematic flow sheet of the method for camera module dust detection provided in an embodiment of the present invention, the method bag Include:
S100, obtains the brightness data that camera module to be detected is just shooting the image of photo to flat-white light source.
S101, with predetermined sampling unit and sampling step length line by line or by column to the brightness data sampling of described image, obtains Obtain the unit luma samples value of often each sampling unit of row or each column.
Specifically,
Using the square area of pixel L*L as sampling unit, with L/2 as sampling step length;
Since the upper left corner of described image, the origin coordinates of sampling is (L/2, L/2), from left to right line by line or on to Under sampled column by column, wherein, when carrying out next line or next column and sampling, corresponding lastrow or previous column are sampled The ordinate of initial coordinate increases L/2 or abscissa and increases the initial coordinate or next column sampling sampled as next line after L/2 Initial coordinate;
Obtain every time sampling L*L pixel brightness value, and with the brightness value of the L*L pixel cube with As the unit luma samples value of the sampling unit of each sampling.
It should be noted that suitable sampling unit can be selected according to the actual requirements, the technical program is not limited to L*L The square sample unit of size, as long as suitable sampling can be carried out to often row or each column of image.
S102, the unit luma samples value according to every row or each column determines to characterize brightness between one's own profession or this row neighbouring sample point The brightness gradual change degrees of data of gradual change degree;When the sample area of where each row or each column does not exist stain, the brightness degree Data are maintained at the numerical intervals [- C of zero crossings1,C0] in;When brightness degree data jump to numerical intervals [- C1,C0] Outside when, determine the brightness gradual change degrees of data for abnormal data ,-C1And C0It is dust detection threshold value.
Wherein, when stain occurs, and sampling unit, in stain left hand edge or top edge, brightness degree data jump is arrived Less than-C1Negative peak;, in stain right hand edge or lower edge, brightness degree data jump is to more than C for sampling unit0Just Peak value;After sample area exits stain completely, brightness degree data recovery to the numerical intervals [- C1,C0]。
Specifically, when assuming that the i-th row/column is carried out to described image samples, M unit luma samples value is obtained successively, its In n-th unit luma samples value be Yn
Following computing is done to the M unit luma samples value:
It is determined that the brightness positioned between adjacent two sampled point of the i-th row/column Deviate percentage, obtain M-1 brightness and deviate percent data Sn, wherein W is the width of image;
Percent data S is deviateed to the M-1 brightnessnFollowing computing is done again:
Calculate the i-th row/ The brightness gradual change degree between adjacent three sampled point is arranged, M-2 brightness gradual change degrees of data Q is obtainedn
S103, the brightness gradual change degrees of data according to every row or each column judges described image line by line or column by column, to examine The camera module is surveyed with the presence or absence of stain.
Specifically, in all brightness gradual change degrees of data of every row or each column, if in continuous J brightness gradual change degrees of data Occur K and be less than-C1Or more than C0Abnormal data, then the sample area for judging the K abnormal data is stain region, There is stain in the camera module, otherwise, the camera module does not exist stain;Wherein K >=0.6J, J is according to different Stain model carries out correlation values statistics and determines.
Wherein, dust detection threshold value-C1、C0Correlation values statistics is carried out according to different stain models to determine, sampling unit And sampling step length determines according to the resolution ratio of image.
It should be noted that because the camera chip selected in practical application is different, the picture effect of software debugging is deposited In difference, the parameters value in the present invention is caused also to be had nothing in common with each other according to the actual requirements, it is therefore desirable to different stain moulds Type carries out the numerical statistic of mass data, after obtaining the data characteristics of stain region abnormal data, is obtained by the quantization to parameter Dust detection threshold value-the C that must be needed1、C0
In one embodiment of the invention, camera module to be detected is in face of a flat-white for constant low colour temperature Light source shoots a secondary photo, obtains the photo yuv format image brightness data, and with reference to Fig. 2, brightness value is with image in picture Center is reduced for the increase of the concentric radius of circle in the center of circle, and ideally, the brightness fade rates are stable;If picture In there is stain, the fade rates of stabilization will be destroyed, especially in the fringe region of stain, it may appear that brightness value rate of change is acute Strong fluctuating.The embodiment of the present invention judges regional in picture by a kind of mathematic(al) representation for evaluating brightness gradual change degree Brightness value it is whether interval in rational gradual change amplitude, if occurred in the aggregation of a certain close region a large amount of beyond reasonable data Abnormal data, then judge that the region is stain region.
With L/2 as sampling step length in the present embodiment, the square area using pixel L*L will be adopted often as sampling unit The brightness value of L*L pixel in sample unit cube with the unit luma samples for being added the sampling unit as each sampling Value;Specifically, the centre coordinate for assuming the square area of sampling unit is (i0,j0), the sample area length of side is L, then the unit Luma samples value isY in formulaijIt is the brightness value of pixel coordinate point (i, j).
In actual applications, often capable number of samples is generally between 150 to 200, if the width of image is 2592, then Sampling step length can be arranged on 13 to 17 length in pixels, the length of side L of sampling unit is arranged on 26 to 34 length in pixels.
Assuming that the size of the picture is W × H, illustrated so that the 1st row to described image is sampled as an example.
Since the upper left corner of described image data, the origin coordinates of sampling is (L/2, L/2), is entered line by line from left to right Row sampling,
The centre coordinate of n-th sampling unit of the 1st row isWherein I.e.W is the width of image;
The unit luma samples value of n-th of the 1st row sampling isWherein
When the sampling of the 2nd row is carried out, the origin coordinates of sampling is (L/2, L), is so sampled line by line from left to right, Until to m rows,H is the height of image.
After being sampled column by column line by line or from up to down from left to right to the picture according to above-mentioned sampling rule, this All unit luma samples values of the every a line for obtaining are fitted to a curve by embodiment, in order to unit luma samples value Intuitively analyzed;With reference to Fig. 3, the transverse axis of rectangular coordinate system represents sampled point in figure, and the longitudinal axis is expressed as unit luma samples Value Yn, the brightness value of the center position of curve is maximum, and brightness value is gradually reduced with coordinate convergence image border, right For sample per a line, initial samples value is relatively low, and sampled value gradually rises afterwards, when abscissa moves to picture centre When at position, sampled value reaches maximum, and sampled value is gradually reduced afterwards.
Then, the brightness of brightness gradual change degree between the unit luma samples value according to every row, acquisition sign neighbouring sample point Gradual change degrees of data.
Equally with the 1st behavior example, the 1st row image is sampled according to above-mentioned sampling rule, it is assumed that M sampling is obtained The unit luma samples value of point, n-th unit luma samples value of sampled point is Yn, the unit brightness to the M sampled point Sampled value does following computing:
The brightness calculated positioned between adjacent two sampled point of the 1st row deviates percentage, obtains M-1 brightness and deviates percentage number According to Sn, wherein n ∈ [1, M-1];In theory, S is worked asnDuring > 0, the unit luma samples value of sampled point is located at the curve in Fig. 3 First transition, works as SnDuring < 0, the unit luma samples value of sampled point is located at the last transition of the curve in Fig. 3.
Percent data S is deviateed to the M-1 brightnessnFollowing computing is done again:
The brightness degree degree positioned between adjacent three sampled point of the 1st row is calculated, M-2 brightness gradual change degrees of data is obtained Qn
In the present embodiment, the M-1 brightness is deviateed into percent data SnAnd M-2 brightness gradual change degrees of data QnPoint Brightness is not fitted to and deviates percentage curve and brightness degree curve, in order to intuitively be analyzed data.
As shown in figure 4, for the unit luma samples value of spotless single file sampling provided in an embodiment of the present invention, brightness are inclined From percentage and brightness degree curvilinear motion schematic diagram, when often the sample area of row or each column does not exist stain, unit is bright Degree sampled value curve Y relative smooths, the starting stage unit luma samples value sampled in every row or each column gradually increases, and works as brightness Sampled value reach maximum after, it is gradual to reduce;Brightness between two neighboring sampled point deviates percentage curve S and straight line is presented The even variation of type, i.e., the starting stage sampled from every row or each column is to obtaining largest unit luma samples value stage, adjacent two The brightness of individual sampled point deviates percentage and is uniformly reduced to zero, adopted to every row or each column after largest unit luma samples value from being obtained The ending stage of sample, the brightness deviation percentage of two neighboring sampled point is started from scratch and uniformly increase;And adjacent three sampled points Between brightness degree curve Q show parallel to transverse axis linear convergence zero change curve, i.e., when sampling step length foot Enough hours, unit luma samples value curve Y relative smooths, between adjacent three sampled points, brightness rate of change floating very little, because This brightness gradual change degrees of data Q in theorynZero crossings should be maintained at.
As shown in figure 5, being unit luma samples value, the brightness of the single file sampling that there is stain provided in an embodiment of the present invention Deviate percentage and brightness degree curvilinear motion schematic diagram, the brightness gradual change degrees of data Q at stainnDifferent from surrounding normal area The brightness gradual change degrees of data Q in domainn, at the stain edge being transitioned into by normal region inside stain, brightness gradual change degrees of data QnNumber It is worth from the regime values mutation of zero crossings and is less than-C to one1Negative peak, by the dirt of stain inner transition to normal region Point edge, brightness gradual change degrees of data QnNumerical value from the negative peak value mutation to one be more than C0Positive peak, when sample area is complete After exiting stain entirely, brightness gradual change degrees of data QnNumerical value return to the normal data of zero crossings.
It should be noted that in actual applications, when there is stain in every row (or each column) image, row (or the row) figure The edge of left and right (or up and down) two as not necessarily passing completely through stain, for example, when leftmost edge of the stain in picture, first Individual sampled value is just inside stain, therefore this sampling may obtain the characteristic less than stain left hand edge.
Thus, the technical program camera module to be detected according to following rule judgment whether there is stain:
In all brightness gradual change degrees of data of every row, if occur in continuous J brightness gradual change degrees of data K be less than- C1Or more than C0Abnormal data, then the sample area of the K abnormal data is stain region, i.e., described camera module deposits In stain, otherwise, the camera module does not exist stain.Wherein, J and K carries out correlation values according to different stain models Statistics determines.J=M/30, K >=0.6J are preferably chosen in the present embodiment, M is the unit brightness value number of every row.If i.e. every Capable sampling number M is 200, if in continuous 7 brightness gradual change degrees of data, there is the abnormal data of more than 4 or 4, then The sample area of these abnormal datas is stain region.
Fig. 6 is the structural representation of the device of camera module dust detection provided in an embodiment of the present invention, the device bag Include luma samples value acquiring unit 61, brightness degree curve acquisition unit 62 and detection unit 63.
Unit luma samples value acquiring unit 61, for predetermined sampling unit and sampling step length line by line or by column to logical The brightness data sampling that camera module to be detected is just shooting the image that photo is obtained to flat-white light source is crossed, the row is obtained Or the unit luma samples value of the row;
Brightness degree data capture unit 62, for determining to characterize this according to the unit luma samples value of often row or each column The brightness gradual change degrees of data of brightness gradual change degree between row or this row neighbouring sample point;The sample area of where each row or each column is not deposited In stain, the brightness gradual change degrees of data is maintained at the numerical intervals [- C of zero crossings1,C0] in;When the brightness degree Data jump is to numerical intervals [- C1,C0] outside when, determine the brightness gradual change degrees of data for abnormal data ,-C1And C0It is dirt Point detection threshold value;
Detection unit 63, for judging described line by line or column by column according to the brightness gradual change degrees of data of often row or each column Image, to detect that the camera module whether there is stain.
The specific executive mode of each unit in apparatus of the present invention embodiment, may refer to camera module stain of the present invention The particular content of detection means embodiment, will not be repeated here.
In sum, the detection method and device of the camera module stain that the present invention is provided, to camera to be detected The brightness data that module is just shooting the image of photo to flat-white light source is carried out from left to right line by line or from up to down by column Sampling, the unit luma samples value according to every row or each column obtained for characterizing between one's own profession or this row neighbouring sample point brightness gradually The brightness gradual change degrees of data of change degree, due to when there is stain in the sample area of every row or each column, the brightness gradual change at stain Degrees of data therefore can rapidly and accurately be sentenced different from the brightness gradual change degrees of data in surrounding normal region according to brightness gradual change degrees of data The camera module to be detected of breaking whether there is stain, and stain position is determined when there is stain.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the scope of the present invention.It is all Any modification, equivalent substitution and improvements made within the spirit and principles in the present invention etc., are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of method of camera module dust detection, it is characterised in that methods described includes:
Obtain the brightness data that camera module to be detected is just shooting the image of photo to flat-white light source;
With predetermined sampling unit and sampling step length line by line or by column to the brightness data sampling of described image, obtain the row or be somebody's turn to do The unit luma samples value of each sampling unit of row;
Unit luma samples value according to every row or each column determines to characterize brightness gradual change degree between one's own profession or this row neighbouring sample point Brightness gradual change degrees of data;When the sample area of where each row or each column does not exist stain, the brightness gradual change degrees of data keeps In the numerical intervals [- C of zero crossings1,C0] in;When the brightness degree data jump to numerical intervals [- C1,C0] outside When, the brightness gradual change degrees of data is determined for abnormal data ,-C1And C0It is dust detection threshold value;
The brightness gradual change degrees of data according to every row or each column judges described image line by line or column by column, to detect the shooting Head mould group whether there is stain.
2. method according to claim 1, it is characterised in that it is described with predetermined sampling unit and sampling step length line by line or The brightness data to described image is sampled by column, obtains the unit of each sampling unit of the row or each sampling unit of the row Luma samples value includes:
Using the square area of pixel L*L as sampling unit, with L/2 as sampling step length;
Since the upper left corner of described image, the origin coordinates of sampling is (L/2, L/2), from left to right line by line or from up to down by Row ground is sampled, wherein, when carrying out next line or next column and sampling, by the initial of corresponding lastrow or previous column sampling It is first that the initial coordinate or next column sampled as next line after the ordinate increase L/2 or abscissa increase L/2 of coordinate are sampled Beginning coordinate;
Obtain every time sampling L*L pixel brightness value, and using the brightness value of the L*L pixel cube and as The unit luma samples value of the sampling unit sampled every time.
3. method according to claim 1, it is characterised in that the unit of the basis often row or each column adopts luma samples value It is determined that the brightness degree data for characterizing brightness gradual change degree between one's own profession or this row neighbouring sample point include:
Assuming that when the sampling of the i-th row/column is carried out to described image, M unit luma samples value is obtained successively, wherein n-th unit Luma samples value is Yn
Following computing is done to the M unit luma samples value:
The brightness calculated between adjacent two sampled point of the i-th row/column deviates percentage Than obtaining M-1 brightness and deviateing percent data Sn, wherein W is the width of image;
Percent data S is deviateed to the M-1 brightnessnFollowing computing is done again:
Determine the i-th row/column phase Brightness gradual change degree between adjacent three sampled points, obtains M-2 brightness gradual change degrees of data Qn
4. method according to claim 1, it is characterised in that when the brightness degree data jump to numerical intervals [- C1,C0] outside when, determine the brightness gradual change degrees of data for abnormal data, including:
When stain occurs, and sampling unit is in stain left hand edge or top edge, the brightness degree data jump to being less than- C1Negative peak;, in stain right hand edge or lower edge, the brightness degree data jump is to more than C for sampling unit0Posivtive spike Value.
5. method according to claim 1, it is characterised in that the brightness gradual change number of degrees of the basis often row or each column According to being judged line by line or column by column, to detect that the camera module includes with the presence or absence of stain:
In all brightness gradual change degrees of data of every row or each column, if it is individual small to occur K in continuous J brightness gradual change degrees of data In-C1Or more than C0Abnormal data, then the sample area for judging the K abnormal data is stain region, the camera There is stain in module, otherwise, the camera module does not exist stain, and wherein K >=0.6J, J enter according to different stain models Row correlation values statistics determines.
6. a kind of detection means of camera module stain, it is characterised in that described device includes:
Unit luma samples value acquiring unit, for predetermined sampling unit and sampling step length line by line or by column to by be checked The camera module of survey is just shooting the brightness data sampling of the image that photo is obtained to flat-white light source, obtains the row or the row Unit luma samples value;
Brightness degree data capture unit, for the unit luma samples value determination sign one's own profession according to often row or each column or originally The brightness gradual change degrees of data of brightness gradual change degree between row neighbouring sample point;The sample area of where each row or each column does not exist stain When, the brightness gradual change degrees of data is maintained at the numerical intervals [- C of zero crossings1,C0] in;When the brightness gradual change degrees of data is jumped Change to numerical intervals [- C1,C0] outside when, determine the brightness gradual change degrees of data for abnormal data ,-C1And C0It is dust detection Threshold value;
Detection unit, for judging described image line by line or column by column according to the brightness gradual change degrees of data of often row or each column, To detect that the camera module whether there is stain.
7. device according to claim 6, it is characterised in that the unit luma samples value acquiring unit is further used In,
Using the square area of pixel L*L as sampling unit, with L/2 as sampling step length;
Since the upper left corner of described image, the origin coordinates of sampling is (L/2, L/2), from left to right line by line or from up to down Sampled column by column, wherein, when carrying out next line or next column and sampling, by corresponding lastrow or previous column sample just What the initial coordinate or next column sampled as next line after the ordinate increase L/2 or abscissa increase L/2 of beginning coordinate were sampled Initial coordinate;
Obtain every time sampling L*L pixel brightness value, and using the brightness value of the L*L pixel cube and as The unit luma samples value of the sampling unit sampled every time.
8. device according to claim 6, it is characterised in that the brightness degree data capture unit is further used In,
Assuming that when the sampling of the i-th row/column is carried out to described image, M unit luma samples value is obtained successively, wherein n-th unit Luma samples value is Yn
Following computing is done to the M unit luma samples value:
The brightness calculated between adjacent two sampled point of the i-th row/column deviates percentage Than obtaining M-1 brightness and deviateing percent data Sn, wherein W is the width of image;
Percent data S is deviateed to the M-1 brightnessnFollowing computing is done again:
Determine the i-th row/column phase Brightness gradual change degree between adjacent three sampled points, obtains M-2 brightness gradual change degrees of data Qn
9. device according to claim 6, it is characterised in that the brightness that the brightness degree data capture unit determines Degree data include:
When stain occurs, and sampling unit is in stain left hand edge or top edge, the brightness degree data jump to being less than- C1Negative peak;, in stain right hand edge or lower edge, the brightness degree data jump is to more than C for sampling unit0Posivtive spike Value.
10. device according to claim 6, it is characterised in that the detection unit is further used for,
In all brightness gradual change degrees of data of every row or each column, if occurring K in continuous J brightness gradual change degrees of data absolutely C is more than to value0Abnormal data, then the sample area for judging the K abnormal data is stain region, the camera module There is stain, otherwise, the camera module does not exist stain;Wherein K >=0.6J, J carry out phase according to different stain models Numerical statistic is closed to determine.
CN201611141723.9A 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection Active CN106791807B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611141723.9A CN106791807B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611141723.9A CN106791807B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection
CN201410679535.6A CN104539937B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201410679535.6A Division CN104539937B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection

Publications (2)

Publication Number Publication Date
CN106791807A true CN106791807A (en) 2017-05-31
CN106791807B CN106791807B (en) 2018-10-26

Family

ID=52855395

Family Applications (2)

Application Number Title Priority Date Filing Date
CN201611141723.9A Active CN106791807B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection
CN201410679535.6A Active CN104539937B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201410679535.6A Active CN104539937B (en) 2014-11-24 2014-11-24 A kind of method and apparatus of camera module dust detection

Country Status (1)

Country Link
CN (2) CN106791807B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118498A (en) * 2018-08-22 2019-01-01 科大讯飞股份有限公司 A kind of camera head stain detection method, device, equipment and storage medium
CN111325715A (en) * 2020-01-21 2020-06-23 上海悦易网络信息技术有限公司 Camera color spot detection method and device
CN111866501A (en) * 2019-12-20 2020-10-30 昆山丘钛微电子科技有限公司 Camera module detection method and device, electronic equipment and medium
CN109472772B (en) * 2018-09-29 2020-12-01 歌尔光学科技有限公司 Image stain detection method, device and equipment
CN112529872A (en) * 2020-12-11 2021-03-19 昆山丘钛光电科技有限公司 Detection method and device of camera module

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105491372A (en) * 2015-11-24 2016-04-13 努比亚技术有限公司 Mobile terminal and information processing method
CN106231297B (en) * 2016-08-29 2019-03-19 深圳天珑无线科技有限公司 The detection method and device of camera
CN106412573B (en) * 2016-10-26 2019-02-15 歌尔科技有限公司 A kind of method and apparatus of detector lens stain
CN106791804B (en) * 2016-11-23 2018-07-03 歌尔股份有限公司 For the smear detecting method and device of camera module
CN106973290A (en) * 2017-05-18 2017-07-21 信利光电股份有限公司 A kind of camera module stain method of testing and device
CN108668080B (en) * 2018-06-22 2020-09-08 北京小米移动软件有限公司 Method and device for prompting degree of dirt of lens and electronic equipment
CN110855976B (en) * 2019-10-08 2022-03-11 南京云计趟信息技术有限公司 Camera abnormity detection method and device and terminal equipment
CN111923599B (en) * 2020-09-18 2021-02-26 季华实验室 Method and equipment for calculating step length of spray head module, storage medium and ink-jet printer
CN111970506B (en) * 2020-10-20 2020-12-29 常州市瑞泰光电有限公司 Lens dirt detection method, device and equipment

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100558943B1 (en) * 2004-01-14 2006-03-10 삼성전자주식회사 method for testing flat panel display
CN100573315C (en) * 2007-04-04 2009-12-23 鸿富锦精密工业(深圳)有限公司 Camera module stain test macro and method
CN101329281B (en) * 2007-06-20 2011-08-10 佛山普立华科技有限公司 System and method for testing image sensing wafer stain and
CN102413354B (en) * 2011-10-05 2014-04-30 深圳市联德合微电子有限公司 Automatic optical detection method, device and system of mobile phone camera module
CN103179428A (en) * 2011-12-23 2013-06-26 鸿富锦精密工业(深圳)有限公司 System and method for testing camera module stains
KR101929001B1 (en) * 2012-02-03 2018-12-14 삼성디스플레이 주식회사 Method of compensating stain, method of driving display panel having the method of compensating stain and display apparatus for performing the method of driving display panel
US8797429B2 (en) * 2012-03-05 2014-08-05 Apple Inc. Camera blemish defects detection
CN104093016B (en) * 2014-06-12 2016-04-13 华南理工大学 A kind of dirty detection method of camera module and system
CN104135660B (en) * 2014-08-14 2016-05-04 广东光阵光电科技有限公司 A kind of dirty detection method of camera module and detection system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109118498A (en) * 2018-08-22 2019-01-01 科大讯飞股份有限公司 A kind of camera head stain detection method, device, equipment and storage medium
CN109118498B (en) * 2018-08-22 2021-04-30 科大讯飞股份有限公司 Camera stain detection method, device, equipment and storage medium
CN109472772B (en) * 2018-09-29 2020-12-01 歌尔光学科技有限公司 Image stain detection method, device and equipment
CN111866501A (en) * 2019-12-20 2020-10-30 昆山丘钛微电子科技有限公司 Camera module detection method and device, electronic equipment and medium
CN111325715A (en) * 2020-01-21 2020-06-23 上海悦易网络信息技术有限公司 Camera color spot detection method and device
CN112529872A (en) * 2020-12-11 2021-03-19 昆山丘钛光电科技有限公司 Detection method and device of camera module

Also Published As

Publication number Publication date
CN106791807B (en) 2018-10-26
CN104539937B (en) 2017-03-29
CN104539937A (en) 2015-04-22

Similar Documents

Publication Publication Date Title
CN104539937B (en) A kind of method and apparatus of camera module dust detection
CN102307274B (en) Motion detection method based on edge detection and frame difference
CN106127778B (en) It is a kind of for projecting the line detection method of interactive system
CN106054421B (en) A kind of detection method and device of liquid crystal display panel defect
CN112352149A (en) System and method for automatically analyzing air samples
US10133937B2 (en) Crowd monitoring system
CN103096121B (en) A kind of camera movement detection method and device
CN108009556B (en) River floating object detection method based on fixed-point image analysis
CN108257185A (en) More checkerboard angle point detection process and camera marking method
CN106991418B (en) Winged insect detection method and device and terminal
CN109711322A (en) A kind of people's vehicle separation method based on RFCN
CN104867145B (en) IC element welding point defect detection methods based on VIBE models
CN105141923B (en) A kind of video concentration method and device
CN104749801B (en) High Precision Automatic optical detecting method and system
CN106550221A (en) Monitoring camera device and regional movement detection method used by same
CN105427346A (en) Motion target tracking method and system
CN106651837A (en) White glass plate surface edge breakage defect detecting method
CN104766310B (en) light source detection system and detection method
JP2014082957A (en) Cell counting apparatus and cell counting program
CN102914549A (en) Optical image matching detection method aiming at satellite-borne surface exposed printed circuit board (PCB) soldering joint quality
CN104916078A (en) Intermittent-rainfall-induced accumulation-type slope landslide monitoring model and stability detection method
CN113362274B (en) Rainfall monitoring and calculating method
Lin et al. A new prediction method for edge detection based on human visual feature
CN113706468A (en) Glass defect detection method based on BP neural network
CN113643206A (en) Cow breathing condition detection method

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201014

Address after: 261031 north of Yuqing street, east of Dongming Road, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Patentee after: GoerTek Optical Technology Co.,Ltd.

Address before: 266104 Laoshan Qingdao District North House Street investment service center room, Room 308, Shandong

Patentee before: GOERTEK TECHNOLOGY Co.,Ltd.