CN109118498A - A kind of camera head stain detection method, device, equipment and storage medium - Google Patents

A kind of camera head stain detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN109118498A
CN109118498A CN201810958638.4A CN201810958638A CN109118498A CN 109118498 A CN109118498 A CN 109118498A CN 201810958638 A CN201810958638 A CN 201810958638A CN 109118498 A CN109118498 A CN 109118498A
Authority
CN
China
Prior art keywords
target image
stain
target
image
dust detection
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
CN201810958638.4A
Other languages
Chinese (zh)
Other versions
CN109118498B (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.)
iFlytek Co Ltd
Original Assignee
iFlytek 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 iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN201810958638.4A priority Critical patent/CN109118498B/en
Publication of CN109118498A publication Critical patent/CN109118498A/en
Application granted granted Critical
Publication of CN109118498B publication Critical patent/CN109118498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/97Determining parameters from multiple pictures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Abstract

This application provides a kind of camera head stain detection method, device, equipment and storage medium, method include: obtain target scene under target image sequence, target image sequence include target image and target image before or after N frame image;The corresponding statistical nature of target image is determined based on target image sequence, and the stain occlusion area in target image is determined based on statistical nature;By the dust detection model pre-established, stain occlusion area is detected from target image;It is merged by the stain occlusion area determined based on statistical nature and by the stain occlusion area that dust detection model inspection goes out, obtains the final dust detection result of target image.Camera head stain detection method, device, equipment and storage medium provided by the present application, it can be achieved that under moving scene stain real-time detection, also, dust detection accuracy rate is higher, detection calculations burden it is smaller, i.e., detection effect is preferable.

Description

A kind of camera head stain detection method, device, equipment and storage medium
Technical field
This application involves information detection technology field more particularly to a kind of camera head stain detection method, device, equipment and Storage medium.
Background technique
Camera head stain detection under moving scene is all applied in many areas, for example, automobile assistant driving is led Domain, unmanned plane field etc., the acquisition process of image are all an important links, such as these fields Stain on fruit camera is not found in time, will seriously affect real-time or the later period image procossing.Therefore, in moving scene Under, the problem of stain for how quickly and accurately detecting on camera is urgent need to resolve.
Summary of the invention
In view of this, this application provides a kind of camera head stain detection method, device, equipment and storage medium, to Quickly and accurately detect the stain on camera, its technical solution is as follows:
A kind of camera head stain detection method, comprising:
The target image sequence under target scene is obtained, the target image sequence includes target image and the target figure N frame image before or after picture, wherein N is the integer more than or equal to 1;
The corresponding statistical nature of the target image is determined based on the target image sequence, and is based on the statistical nature Determine the stain occlusion area in the target image;
By the dust detection model pre-established, stain occlusion area is detected from the target image;
Go out by the stain occlusion area determined based on the statistical nature and by the dust detection model inspection Stain occlusion area is merged, and the final dust detection result of the target image is obtained.
It is wherein, described that the corresponding statistical nature of the target image is determined based on the target image sequence, comprising:
The time domain mean value of the target image sequence is calculated, mean value statistical chart is obtained, it is corresponding as the target image Target mean statistical chart;
And/or the time domain variance of the target image sequence is calculated, variance statistic figure is obtained, as the target image Corresponding target variance statistical chart;
By the target mean statistical chart or the target variance statistical chart or by the target mean statistical chart and described The fusion statistical chart that target variance statistical chart obtains after being merged is as the corresponding statistical nature of the target image.
It is wherein, described that the corresponding statistical nature of the target image is determined based on the target image sequence, further includes:
The all pixels point in the mean value statistical chart is normalized by preset normalization mode, is returned One changes mean value statistical chart, as the target mean statistical chart;
And/or place is normalized to all pixels point in the variance image by the preset normalization mode Reason obtains normalization variance statistic figure, as the target variance statistical chart.
Wherein, the stain occlusion area determined based on the statistical nature in the target image, comprising:
Binaryzation is carried out to object statistics figure based on the binarization threshold of setting, obtains image as the mesh after binaryzation The corresponding dust detection result figure of logo image;
Wherein, the object statistics figure is the target mean statistical chart or the target variance statistical chart or described melts Close statistical chart;It is first object that stain occlusion area in the target image, which is with pixel value in the dust detection result figure, The corresponding region in region of the pixel composition of value.
Wherein, the stain occlusion area determined based on the statistical nature in the target image, further includes:
The corresponding dust detection knot of each frame image in an at least frame image before or after obtaining the target image Fruit figure;
By at least one before or after the corresponding dust detection result figure of the target image, the target image The corresponding dust detection result figure of each frame image is merged in frame image, and fused image is final as the target image Corresponding dust detection result figure.
Wherein, described will be before or after the corresponding dust detection result figure of the target image, the target image An at least frame image in the corresponding dust detection result figure of each frame image merged, comprising:
By at least one before or after the corresponding dust detection result figure of the target image, the target image The corresponding dust detection result figure of each frame image carries out logical AND operation in frame image.
Wherein, the dust detection model by pre-establishing, detects stain blocked area from the target image Domain, comprising:
The target image is inputted to the dust detection model pre-established, obtains the dust detection model output Stain occlusion area segmentation figure;
Wherein, the dust detection model is using the stain shielded image under the target scene as training sample, to institute The each pixel for stating stain occlusion area in stain shielded image is labeled, using third target value to each of other regions What the annotation results that pixel uses the 4th target value to be labeled were trained for sample label;
Wherein, it is described that the stain occlusion area in the target image, which is with pixel value in the stain region segmentation figure, The corresponding region in region of the pixel composition of third target value.
Wherein, the stain occlusion area that will be determined based on the statistical nature and pass through the dust detection model The stain occlusion area detected is merged, and the final dust detection result of the target image is obtained, comprising:
The corresponding dust detection result figure of the target image and the stain region segmentation figure are subjected to logical AND operation, The result of the logical AND operation dust detection result final as the target image.
A kind of camera head stain detection device, comprising: image sequence obtains module, first detection module, the second detection mould Block and testing result Fusion Module;
Described image retrieval module, for obtaining the target image sequence under target scene, the target image sequence Column include the N frame image before or after target image and the target image, wherein N is the integer more than or equal to 1;
The first detection module, for determining that the corresponding statistics of the target image is special based on the target image sequence It levies, and determines the stain occlusion area in the target image based on the statistical nature;
Second detection module is detected from the target image for the dust detection model by pre-establishing Stain occlusion area out;
The testing result Fusion Module, stain occlusion area for will be determined based on the statistical nature and is passed through The stain occlusion area that the dust detection model inspection goes out is merged, and the final dust detection knot of the target image is obtained Fruit.
Wherein, the first detection module includes: statistical nature determining module;
The statistical nature determining module obtains equal Data-Statistics for calculating the time domain mean value of the target image sequence Figure, as the corresponding target mean statistical chart of the target image;And/or the time domain variance of the target image sequence is calculated, Variance statistic figure is obtained, as the corresponding target variance statistical chart of the target image;By the target mean statistical chart or institute It states target variance statistical chart or what is obtained after being merged the target mean statistical chart and the target variance statistical chart melts Statistical chart is closed as the corresponding statistical nature of the target image.
Wherein, the statistical nature determining module is also used to by preset normalization mode in the mean value statistical chart All pixels point be normalized, obtain normalization average value statistical chart, as the target mean statistical chart;And/or The all pixels point in the variance image is normalized by the preset normalization mode, obtains normalization side Poor statistical chart, as the target variance statistical chart.
Wherein, the first detection module includes: stain occlusion area determining module;
The stain occlusion area determining module carries out two-value to object statistics figure for the binarization threshold based on setting Change, obtains image as the corresponding dust detection result figure of the target image after binaryzation;
Wherein, the object statistics figure is the target mean statistical chart or the target variance statistical chart or described melts Close statistical chart;It is first object that stain occlusion area in the target image, which is with pixel value in the dust detection result figure, The corresponding region in region of the pixel composition of value.
Wherein, the stain occlusion area determining module is also used to obtain before or after the target image extremely The corresponding dust detection result figure of each frame image in a few frame image;By the corresponding dust detection result figure of the target image, The corresponding dust detection result figure of each frame image is melted in an at least frame image before or after the target image It closes, fused image is as the final corresponding dust detection result figure of the target image.
Wherein, second detection module is examined specifically for the stain for pre-establishing target image input Model is surveyed, the stain occlusion area segmentation figure of the dust detection model output is obtained;
Wherein, the dust detection model is using the stain shielded image under the target scene as training sample, to institute The each pixel for stating stain occlusion area in stain shielded image is labeled, using third target value to each of other regions What the annotation results that pixel uses the 4th target value to be labeled were trained for sample label;
Wherein, it is described that the stain occlusion area in the target image, which is with pixel value in the stain region segmentation figure, The corresponding region in region of the pixel composition of third target value.
A kind of camera head stain detection device, comprising: memory and processor;
The memory, for storing program;
The processor, for executing described program, described program is specifically used for:
The target image sequence under target scene is obtained, the target image sequence includes target image and the target figure N frame image before or after picture, wherein N is the integer more than or equal to 1;
The corresponding statistical nature of the target image is determined based on the target image sequence, and is based on the statistical nature Determine the stain occlusion area in the target image;
By the dust detection model pre-established, stain occlusion area is detected from the target image;
Go out by the stain occlusion area determined based on the statistical nature and by the dust detection model inspection Stain occlusion area is merged, and the final dust detection result of the target image is obtained.
A kind of readable storage medium storing program for executing is stored thereon with computer program, real when the computer program is executed by processor Each step of the existing camera head stain detection method.
Via above scheme it is found that camera head stain detection method, device, equipment and storage medium provided by the present application, After obtaining at least target image sequence of a frame image before or after including target image and target image first, so Dust detection is carried out to target image respectively using two kinds of detection modes afterwards, first, after using target image sequence, using being based on Stain occlusion area in the detection method detection target image of image statistics, second, passing through the dust detection mould pre-established Type detects stain occlusion area from target image, finally, the testing result obtained based on above two detection mode is carried out Fusion obtains the final dust detection result of target image.The application pass through by based on image statistics detection method be based on The detection method of dust detection model combines, and can be realized and detects stain effectively in real time under moving scene, and due to examining The time domain relevance between the image sequence of camera shooting is considered, has avoided and single-frame images is carried out to detect brought erroneous detection Or missing inspection, there is preferable detection effect.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is the flow diagram of camera head stain detection method provided by the embodiments of the present application;
Fig. 2 is provided in camera head stain detection method for the embodiment of the present application, by the corresponding dust detection knot of target image The corresponding dust detection result figure of each frame image is melted in fruit figure, at least frame image before or after target image It closes, obtains an exemplary schematic diagram of the final corresponding dust detection result figure of target image;
Fig. 3 is provided in camera head stain detection method for the embodiment of the present application, by the corresponding dust detection knot of target image Fruit figure is merged with stain region segmentation figure, obtains an exemplary schematic diagram of the final dust detection result of target image;
Fig. 4 is the structural schematic diagram of camera head stain detection device provided by the embodiments of the present application;
Fig. 5 is the structural schematic diagram of camera head stain detection device provided by the embodiments of the present application.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
Inventor has found during realizing the invention: some camera head stain detection sides exist in the prior art Case, there are mainly two types of these camera head stain detection schemes:
First, the detection scheme based on specific background, i.e., cover shooting for entire camera using specific background board Region image pixel intensity phase as long as shooting one or more image under the background board, is analyzed due to the controllability of background board For the difference value of background board, and judgment threshold is set, difference value is greater than the judgment threshold of setting i.e. it is believed that the camera area Domain is contaminated or blocks.
Second, detection scheme neural network based, the program belongs to the task of image segmentation type, and the program is by single frames Or multiple image inputs trained neural network, neural network carries out point pixel-by-pixel to image and classifies, and judges that the pixel is The no pixel for pollution, to obtain camera Polluted area segmentation result.
Although the dust detection of camera can be achieved in above two detection scheme, there are problems, particular problems It is as follows:
Detection scheme based on specific background is the progress camera head stain detection before camera actually uses, and in reality In the use process of border, it can not accomplish Real-time and Dynamic Detection, it is helpless to the real-time stain being likely to occur in dynamic scene.Separately Outside, the detection scheme based on specific background mostly be single-frame images or multiframe independent image are detected, and in natural scene solely The dust detection of vertical image itself has great limitation, for example, the stone of one piece of black and camera lens itself in static scene Stain it is extremely similar, therefore, to single-frame images or multiframe independent image carry out detection be likely to result in apparent erroneous detection or leakage Inspection.
Detection scheme neural network based, needs the training data of a large amount of generic scenarios, and the stain of cam lens Blocking itself has the characteristics that background diversity, form brightness scrambling, therefore, it is difficult to obtain the instruction with enough generalizations Practice data, in the case where training data lacks, testing result is difficult to have enough confidence levels.In addition, being based on neural network Detection scheme there is also the detection scheme based on single-frame images and based on the detection scheme of multiple image, based on single-frame images Detection scheme, the problem of equally existing erroneous detection or missing inspection, and the detection scheme based on multiple image, need to consider front and back multiframe figure Picture, this all brings certain challenge to the real-time computing of network complexity and equipment, is difficult to apply in actual scene.
In view of existing detection scheme there are the problem of, this application provides a kind of camera head stain detection methods, please refer to Fig. 1 shows the flow diagram of the camera head stain detection method, may include:
Step S101: the target image sequence under target scene is obtained.
Wherein, the N frame image before or after target image sequence includes target image and target image, N be greater than Integer equal to 1.
It should be noted that N frame image before or after target image can for before target image and/or it Continuous N frame image afterwards can also be the N frame sampled from the continuous multiple frames image before or after target image Image.
Step S102: the corresponding statistical nature of target image is determined based on target image sequence, and true based on statistical nature The stain occlusion area to set the goal in image.
The purpose of this step is using target image sequence, detects target figure using the detection method based on image statistics Stain occlusion area as in.
In view of the time domain relevance of the image sequence of camera shooting, the present embodiment determines the time domain of target image sequence Statistical nature using the Time-domain Statistics feature of target image sequence as the corresponding Time-domain Statistics feature of target image, and then is based on The Time-domain Statistics feature determines the stain occlusion area in target image.
Step S103: by the dust detection model pre-established, stain occlusion area is detected from target image.
Wherein, dust detection model is using the stain shielded image under target scene as training sample, with stain shielded image In the corresponding classification of each pixel be that sample label is trained to obtain, the corresponding classification of pixel is used to indicate corresponding picture Whether vegetarian refreshments position, which has a stain, blocks.
There may be by erroneous detection in the stain occlusion area detected in view of detection method of the use based on image statistics For the pixel of stain or region (for example, keep opposing stationary automobile in Driving Scene, may in the detection of step S102 Can be stain by erroneous detection), and the purpose of this step is to remove the erroneous detection in the dust detection result obtained based on step S102 As a result.
It should be noted that the present embodiment do not limit step S102 and step S103 execute sequence, step can be first carried out Rapid S102, then step S103 is executed, step S103 can also be first carried out, then execute step S102, can also be performed simultaneously step S102 With step S103, as long as belonging to the protection scope of the application comprising step S102 and step S103.
Step S104: go out by the stain occlusion area determined based on statistical nature and by dust detection model inspection Stain occlusion area is merged, and the final dust detection result of target image is obtained.
Camera head stain detection method provided by the embodiments of the present application, obtain first comprising target image and target image it After the preceding and/or at least target image sequence of a frame image later, then target image is carried out using two kinds of detection modes Dust detection, first, using target image sequence, using the stain in the detection method detection target image based on image statistics Occlusion area, second, detecting stain occlusion area from target image using the detection method based on dust detection model, most Afterwards, the testing result of two kinds of detection modes is merged, obtains the final dust detection result of target image.Due to considering Time domain relevance between the image sequence of camera shooting, therefore avoid and single-frame images is carried out to detect brought erroneous detection Or missing inspection, since the detection method based on dust detection model is mainly to remove in the detection method detection based on image statistics Erroneous detection, therefore, dust detection model do not need high accuracy, since dust detection model does not need high accuracy, Therefore, a large amount of training data is not needed when training dust detection model, i.e., camera head stain inspection provided by the embodiments of the present application In the case where not needing a large amount of training datas the real-time detection of stain under moving scene can be realized, also, dirty in survey method Point Detection accuracy is higher, detection calculations burden is smaller, i.e., detection effect is preferable.
In another embodiment of the application, to above-mentioned steps S102: determining target image pair based on target image sequence The statistical nature answered, and determine that the stain occlusion area in target image is introduced based on statistical nature.
In dynamic scene, in vehicle-mounted camera or the scene of unmanned plane camera shooting, camera is shot continuous Frame image can change with scene changes and constantly, when stain occlusion area occur in camera lens, since stain has one Fixed opacity, pixel mean value can be relatively small within a certain period of time in the region.Based on this, in a kind of possible implementation In, determine that the process of the corresponding statistical nature of target image may include: calculating target image sequence based on target image sequence Time domain mean value, obtain mean value statistical chart target mean statistical chart is made as target image corresponding target mean statistical chart For the corresponding statistical nature of target image.
Illustratively, target image sequence includes time series t0~tNInterior N+1 frame image, target image tNMoment Image, then calculate the time domain mean value of target image sequence process calculate on the image same position i.e. each (x, Y) at coordinate pixel I (x, y) in time series t0~tNInterior mean valueSpecifically, mean valueIt can be based on following formula It calculates:
Wherein,For tNThe image at moment, as target image,For t0The image at moment,For target image N frame image before.It should be noted thatCan beContinuous N frame image before, or fromBefore Continuous multiple frames image in the N frame image sampled.
Pixel I (x, y) is calculated at each (x, y) coordinate in time series t0~tN-1Interior mean valueJust it obtains One width is to tNThe mean value statistical chart I at momentave, by mean value statistical chart IaveAs target imageCorresponding target mean system Meter figure.
In order to eliminate the situation that bring luminance mean value is not of uniform size under different luminance backgrounds, in alternatively possible realization In mode, mean value statistical chart I is being obtainedaveIt afterwards, can be to mean value statistical chart IaveIn all pixels point be normalized, will It normalizes to preset range, in the present embodiment, can with but be not limited to mean value statistical chart IaveIn all pixels point return One changes into (0,1) range, so that normalization average value image is obtained, it is corresponding using the normalization average value statistical chart as target image Target mean statistical chart.It specifically, can be based on following formula to mean value statistical chart IaveIt is normalized:
In dynamic scene, when there is stain occlusion area in camera lens, due to stain block filtration with And stain self-position is constant, variance statistic amount also can be relatively small whithin a period of time for the stain occlusion area.Based on this, In alternatively possible implementation, determine that the process of the corresponding statistical nature of target image can wrap based on target image sequence It includes: calculating the time domain variance of target image sequence, variance statistic figure is obtained, as the corresponding target variance statistic of target image Figure, using target variance statistical chart as the corresponding statistical nature of target image.
Illustratively, target image sequence includes time series t0~tNInterior N+1 frame image, target image tNMoment Image, then calculate the time domain variance of target image sequence process calculate on the image same position i.e. each (x, Y) at coordinate pixel I (x, y) in time series t0~tNInterior varianceSpecifically, varianceIt can be based on following formula It calculates:
Wherein,For tNThe image at moment, as target image, It0For t0The image at moment,For target image N frame image before, it should be noted thatCan beContinuous N frame image before, or fromBefore Continuous multiple frames image in the N frame image sampled,It is pixel I (x, y) at (x, y) coordinate in time series t0~ tNInterior mean value.
Calculate each (x, y) coordinate everywhere pixel I (x, y) in time series t0~tNInterior varianceJust it obtains A width was obtained to tNThe variance statistic figure I at momentvar, by variance statistical chart IvarAs target imageCorresponding target variance Statistical chart.
In order to eliminate the situation that bring brightness variance is not of uniform size under different luminance backgrounds, in alternatively possible realization In mode, variance statistic figure I is being obtainedvarIt afterwards, can be to variance statistical chart IvarIn all pixels point be normalized, will It normalizes to preset range, in the present embodiment, can with but be not limited to variance statistic figure IvarIn all pixels point return One changes into (0,1) range, so that normalization variance image is obtained, it is corresponding using the normalization variance statistic figure as target image Target variance statistical chart.It specifically, can be based on following formula to variance statistical chart IvarIt is normalized:
It should be noted that above two implementation respectively using target mean statistical chart, target variance statistical chart as The corresponding statistical nature of target image in another more preferably implementation, can incite somebody to action to improve dust detection accuracy rate Target mean statistical chart is merged with target variance statistical chart, and the fusion statistical chart of acquisition is as the corresponding statistics of target image Feature.
In one possible implementation, target mean statistical chart and target variance statistical chart can be carried out based on following formula Fusion:
Ifuse=α I'ave+βI'var (5)
Wherein, I'aveIndicate target mean statistical chart, I'varIndicate that target variance statistical chart, α are target mean statistical chart Corresponding weight factor, β are the corresponding weight factor of target variance statistical chart, and α and β can be set based on actual application scenarios It is fixed, for example α=0.1, β=0.9 can be set.
It should be noted that the present embodiment is not to the specific side of fusion of target mean statistical chart and target variance statistical chart Formula is defined, and can be above-mentioned amalgamation mode, or other amalgamation modes, as long as to target mean statistical chart with Target variance statistical chart, which carries out fusion, shall fall in the protection scope of this application.
After obtaining the corresponding statistical nature of target image using aforesaid way, target can be determined based on the statistical nature Stain occlusion area in image.
In one possible implementation, the process of the stain occlusion area in target image is determined based on statistical nature It may include: that the binarization threshold based on setting carries out binaryzation to object statistics figure, obtain image as target after binaryzation The corresponding dust detection result figure of image.Wherein, object statistics figure can be above-mentioned target mean statistical chart, or on The target variance statistical chart stated, preferably above-mentioned fusion statistical chart.
It should be noted that it is first that the stain occlusion area in target image, which is with pixel value in dust detection result figure, The corresponding region in region of the pixel composition of target value.
Assuming that object statistics figure is Itarget, the binarization threshold set then can be to object statistics figure by following formula as γ ItargetCarry out binaryzation:
Wherein, the value of γ can be set according to practical situations, for example can set γ as 0.05.
After carrying out binaryzation to object statistics figure by formula (6), obtaining binary image can be used as the corresponding dirt of target image Testing result figure is put, the region for the pixel composition that pixel value is 1 in dust detection result figure is doubtful stain region, pixel value Region for 0 pixel composition is non-stain region, i.e., is 1 in target image, with pixel value in dust detection result figure The corresponding region in region of pixel composition is stain occlusion area.
It should be noted that foregoing present merge target mean statistical chart and target variance statistical chart with determination A kind of possible implementation of the corresponding dust detection result figure of target image, i.e., first by target mean statistical chart and target side Poor statistical chart is based on above-mentioned formula (5) and is merged, and obtains fusion statistical chart, then carries out binaryzation, two-value to fusion statistical chart The image obtained after change is as the corresponding dust detection result figure of target image.Other than above-mentioned implementation, there are also other Implementation first can carry out two to target mean statistical chart by the first threshold of setting in alternatively possible implementation Value, obtains the corresponding binary image of target mean statistical chart, and by the second threshold of setting to target variance statistical chart into Row binaryzation obtains the corresponding binary image of target variance statistical chart, then by the corresponding binaryzation of target mean statistical chart Image and the corresponding binary image of target variance statistical chart carry out logical AND operation, the binary image that logical AND operates As the corresponding dust detection result figure of target image.As long as it should be noted that by target mean statistical chart and target side Poor statistical chart fusion is to determine that the corresponding dust detection result figure of target image belongs to the protection scope of the application.
In view of the stain being attached on camera has stability whithin a period of time, it is assumed that the corresponding mesh of target image The pixel value for marking some pixel position in statistical chart is 1, if in at least frame image before or after target image The pixel value of the pixel position is 1 in the corresponding object statistics figure of each frame image, then can determine the pixel in target image The probability that point position is blocked by stain is larger.Based on this, in order to improve dust detection accuracy rate, in alternatively possible realization side In formula, the corresponding dust detection result figure of each frame image in at least frame image before or after target image can be obtained; By each frame image in at least frame image before or after the corresponding dust detection result figure of target image, target image Corresponding dust detection result figure is merged, and fused image is as the final corresponding dust detection result of target image Figure.
In one possible implementation, by the corresponding dust detection result figure of target image, before target image and/ Or the corresponding dust detection result figure of each frame image is merged in an at least frame image later, comprising: by target image pair The corresponding stain inspection of each frame image in an at least frame image before or after the dust detection result figure answered, target image It surveys result figure and carries out logical AND operation, the result of logical AND operation is as the final corresponding dust detection result figure of target image. It should be noted that the corresponding dust detection result of each frame image in an at least frame image before or after target image It is determined by the way of the corresponding dust detection result figure of determining target image provided by the present application.
Illustratively, the multiple image before target image is obtained, for example target image continuous k-1 frame figure before can be obtained Picture, then finally corresponding dust detection result figure can be determined target image by following formula:
Wherein, Ismudge|tk-1For tk-1The corresponding dust detection result figure of the image, that is, target image at moment, Ismudge|t0 For t0The corresponding dust detection result figure of the image at moment, Ismudge| t1 t1The corresponding dust detection result figure of the image at moment, And so on, Ismudge|t0~Ismudge|tk-2The corresponding stain of each frame image in continuous k-1 frame image as before target image Testing result figure,For fused dust detection result figure, i.e. the final corresponding dust detection result of target image Figure.
The present embodiment not to before or after the corresponding dust detection result figure of target image, target image at least The specific amalgamation mode that the corresponding dust detection result figure of each frame image is merged in one frame image is defined, and can be Above-mentioned amalgamation mode, or other amalgamation modes, for example, the fusion method to add up based on image can be used, it is specifically, first It first will be before the corresponding dust detection result figure of target image and target image and/each frame image pair in an at least frame image later The dust detection result figure answered carries out cumulative fusion, obtains cumulative blending image, then, based on cumulative blending image and carries out tired The quantity of the image added seeks mean value image, and then, it is poor that cumulative blending image and mean value image are made, and obtains error image, most Afterwards, by error image binaryzation, image that binaryzation obtains is as the final corresponding dust detection result figure of target image.It needs Illustrate, as long as to an at least frame figure before or after the corresponding dust detection result figure of target image, target image The corresponding dust detection result figure of each frame image, which carries out fusion, as in shall fall in the protection scope of this application.
Referring to Fig. 2, showing continuous multiple frames figure before the corresponding dust detection result figure of target image, target image The corresponding dust detection result figure of each frame image is merged as in, obtains target image finally corresponding dust detection result figure An exemplary schematic diagram.
In target image, withThe corresponding pixel position maximum probability in pixel position that middle pixel value is 1 has Stain blocks, withThe corresponding pixel position in pixel position that middle pixel value is 0 does not have stain to block.
The above process gives using target image sequence, detects target image using the detection method based on image statistics In the realization process of stain occlusion area that is, by the above process obtain the corresponding dust detection result figure of target image, The case where there are erroneous detections in view of the detection method based on image statistics, for example, vehicle-mounted camera will appear in moving scene There is the case where vehicle follows at rear, and in the case that rear follows vehicle color relatively depth and relative position remains unchanged, is easy quilt Erroneous detection blocks for stain, is based on this, and this application provides the detection scheme based on dust detection model, i.e., by pre-establishing Dust detection model detects stain occlusion area from target image.
Specifically, detecting the mistake of stain occlusion area from target image by the dust detection model pre-established Journey may include: that target image is inputted the dust detection model pre-established, and the stain for obtaining the output of dust detection model hides Keep off region segmentation figure.
Wherein, dust detection model is using the stain shielded image under target scene as training sample, to stain Occlusion Map Each pixel of stain occlusion area is labeled using third target value, uses the 4th to each pixel in other regions as in The annotation results that target value is labeled are what sample label was trained.It should be noted that third target value can be The identical value with above-mentioned first object value, or other values, the 4th target value can be identical as above-mentioned second target value Value, or other values.
In the stain occlusion area segmentation figure of dust detection model output, pixel value is that the pixel of third target value forms Region be stain region, other regions are non-stain region, i.e., stain occlusion area in target image is and stain region Pixel value is the corresponding region in region of the pixel composition of third target value in segmentation figure.
It should be noted that the dust detection model in the present embodiment is a two Classification Neural models, utilize The stain shielded image training that pixel class label is labeled under target scene obtains, above-mentioned first object value and the second target value For the pixel class label of two classifications, it is used to characterize two classifications.In one possible implementation, third target value can Think 1, the 4th target value can be represented to have a stain and be blocked for 0, i.e., 1, and 0, which represents no stain, blocks.
It should be noted that the process nature that dust detection model detects stain occlusion area from target image is from mesh It is partitioned into stain occlusion area in logo image, obtains the process of stain occlusion area segmentation figure.The segmentation of stain occlusion area belongs to Image, semantic divides scope, and currently used deep learning image, semantic segmentation framework is based on full convolutional neural networks (fully Convolution network, FCNs), be based on this, neural network model in the application can with but be not limited to full convolution mind Through network model.The input of full convolutional neural networks model is piece image, full convolutional neural networks model after training, The pixel can be labeled as corresponding classification, full convolutional neural networks according to the semantic feature of pixel each on input picture It is also piece image, i.e. stain occlusion area segmentation figure that model, which finally exports,.
In this application, the cost function of optimization aim can be cross entropy cost function when training neural network model (cross-entropy cost function) it is as follows to intersect entropy loss formula:
In above formula, y indicates the classification predicted of neural network model, p be neural network model a certain data point for The prediction probability of classification 1, correspondingly, 1-p indicate that this, herein can be by prediction probability p for the prediction probability of classification 0 It is rewritten as pRForm:
By pRIt is updated in above-mentioned intersection entropy loss formula (8), available revised intersection entropy loss formula:
CE (p, y)=- ln (pR) (10)
From above-mentioned formula it will be seen that when the prediction result that neural network model exports after training is counted with true According to class label it is more close, i.e. pRValue closer to 1 when, cross entropy loss function is closer to 0, network segmentation result at this time Better.The target of neural network model training is exactly to minimize cost function.
In this application, due to final dust detection the result is that statistic mixed-state result and neural network model testing result Fusion, not fully depend on neural network model, the effect of neural network model mainly removes some in statistic mixed-state In erroneous detection as a result, therefore, there is no need to high accuracy, also there is no need to a large amount of training datas, lack in training data In the case where can equally be trained.
After completing to neural network model training, target image is inputted into the trained neural network model, it should Model can carry out (0,1) two to each pixel in target image and classify, and obtain stain corresponding with target image blocked area Regional partition figure, wherein the region of 1 pixel composition is classified as in stain occlusion area segmentation figure as neural network model judgement Stain region, be classified as 0 pixel composition region be neural network model determine non-stain region, i.e., normal area Domain.
Dust detection model in the embodiment of the present application is detected for target image, i.e., only examines to single-frame images It surveys, does not account for the information of before and after frames image, its advantage lies in being able to substantially reduce computational complexity, ensure that the real-time of detection Property, but it is there is also disadvantage, disadvantage be may partial region contrast is small, that textural characteristics are weak be classified as stain screening Region is kept off, erroneous detection would tend to occur in this way, is based on this, the application exports dust detection model, the corresponding dirt of target image Point occlusion area segmentation figure and the corresponding dust detection result figure of target image of the detection method acquisition based on image statistics into Row fusion.It in one possible implementation, can be by the corresponding dust detection result figure of target image and stain region segmentation Figure carries out logical AND operation, the result of the logical AND operation dust detection result final as target image.
The present embodiment does not limit the specific fusion side merged to dust detection result figure with stain region segmentation figure Above-mentioned amalgamation mode can be used in formula, and other amalgamation modes can also be used, for example, can be first by dust detection result figure and stain area Regional partition figure is added fusion, obtains and is added blending image, then seeks the equal of dust detection result figure and stain region segmentation figure Value obtains mean value image, then, will add up blending image and mean value image makees poor, acquisition error image, finally by error image Binaryzation, the image that binaryzation the obtains dust detection result final as target image.As long as it should be noted that by dirty Point testing result figure merge shall fall in the protection scope of this application with stain region segmentation figure.
Referring to Fig. 3, showing the corresponding dust detection result figure 301 and stain region segmentation Figure 30 2 of target image After carrying out logical AND operation, an exemplary schematic diagram of the final dust detection result 303 of target image is obtained.Target image is most In whole dust detection result, the point average brightness that pixel value is 1 is relatively low, average variance is relatively small, long-time stable In the presence of, and textural characteristics are weaker, the region of such point composition is stain occlusion area.Camera provided by the embodiments of the present application Smear detecting method, it can be achieved that under moving scene stain real-time detection, and false detection rate, omission factor are lower, detection calculations are negative Load is smaller, and detection effect is preferable.
Corresponding with above-mentioned camera head stain detection method, the embodiment of the present application also provides a kind of detections of camera head stain Device, referring to Fig. 4, show the structural schematic diagram of the device, the apparatus may include: image sequences to obtain module 401, the One detection module 402, the second detection module 403 and testing result Fusion Module 404.
Image sequence obtains module 401, for obtaining the target image sequence under target scene, the target image sequence Including the N frame image before or after target image and the target image, wherein N is the integer more than or equal to 1.
First detection module 402, for determining that the corresponding statistics of the target image is special based on the target image sequence It levies, and determines the stain occlusion area in the target image based on the statistical nature.
Second detection module 403 is detected from the target image for the dust detection model by pre-establishing Stain occlusion area.
Testing result Fusion Module 404, stain occlusion area for will be determined based on the statistical nature and is passed through The stain occlusion area that the dust detection model inspection goes out is merged, and the final dust detection knot of the target image is obtained Fruit.
Camera head stain detection device provided by the embodiments of the present application, obtain first comprising target image and target image it After the preceding and/or at least target image sequence of a frame image later, then target image is carried out using two kinds of detection modes Dust detection, first, using target image sequence, using the stain in the detection method detection target image based on image statistics Occlusion area, second, detecting stain occlusion area from target image using the detection method based on dust detection model, most Afterwards, the testing result of two kinds of detection modes is merged, obtains the final dust detection result of target image.Due to considering Time domain relevance between the image sequence of camera shooting, therefore avoid and single-frame images is carried out to detect brought erroneous detection Or missing inspection, since the detection method based on dust detection model is mainly to remove in the detection method detection based on image statistics Erroneous detection, therefore, dust detection model do not need high accuracy, since dust detection model does not need high accuracy, Therefore, a large amount of training data is not needed when training dust detection model, i.e., camera head stain inspection provided by the embodiments of the present application Device is surveyed, in the case where not needing a large amount of training datas, the real-time detection of stain under moving scene can be realized, also, dirty Point Detection accuracy is higher, detection calculations burden is smaller, i.e., detection effect is preferable.
In one possible implementation, the first detection in camera head stain detection device provided by the above embodiment Module 402 includes: statistical nature determining module and stain occlusion area determining module.
The statistical nature determining module obtains equal Data-Statistics for calculating the time domain mean value of the target image sequence Figure, as the corresponding target mean statistical chart of the target image;And/or the time domain variance of the target image sequence is calculated, Variance statistic figure is obtained, as the corresponding target variance statistical chart of the target image;By the target mean statistical chart or institute It states target variance statistical chart or what is obtained after being merged the target mean statistical chart and the target variance statistical chart melts It closes statistical chart and is determined as the corresponding statistical nature of the target image.
Preferably, the statistical nature determining module is also used to by preset normalization mode to the mean value statistical chart In all pixels point be normalized, obtain normalization average value image, as the target mean statistical chart;And/or The all pixels point in the variance image is normalized by the preset normalization mode, obtains normalization side Difference image, as the target variance statistical chart.
In one possible implementation, stain occlusion area determining module, for the binarization threshold based on setting Binaryzation is carried out to object statistics figure, obtains image as the corresponding dust detection result figure of the target image after binaryzation.
Wherein, the object statistics figure is the target mean statistical chart or the target variance statistical chart or described melts Close statistical chart;It is first object that stain occlusion area in the target image, which is with pixel value in the dust detection result figure, The corresponding region in region of the pixel composition of value.
Preferably, stain occlusion area determining module is also used to obtain at least one before or after the target image The corresponding dust detection result figure of each frame image in frame image;By the corresponding dust detection result figure of the target image, described The corresponding dust detection result figure of each frame image is merged in an at least frame image before or after target image, is merged Image afterwards is as the final corresponding dust detection result figure of the target image.
Further, stain occlusion area determining module is by the corresponding dust detection result figure of the target image, institute When the corresponding dust detection result figure of each frame image is merged in an at least frame image before or after stating target image, Specifically for by an at least frame before or after the corresponding dust detection result figure of the target image, the target image The corresponding dust detection result figure of each frame image carries out logical AND operation in image.
In one possible implementation, described second in camera head stain detection device provided by the above embodiment Detection module 403 obtains the stain specifically for the target image is inputted the dust detection model pre-established The stain occlusion area segmentation figure of detection model output.
Wherein, the dust detection model is using the stain shielded image under the target scene as training sample, to institute The each pixel for stating stain occlusion area in stain shielded image is labeled, using the first object value to other regions What the annotation results that each pixel uses the second target value to be labeled were trained for sample label.
Wherein, it is described that the stain occlusion area in the target image, which is with pixel value in the stain region segmentation figure, The corresponding region in region of the pixel composition of first object value.
In one possible implementation, testing result Fusion Module 404 is specifically used for the target image is corresponding Dust detection result figure and the stain region segmentation figure carry out logical AND operation, logical AND operation result as the mesh The final dust detection result of logo image.
The embodiment of the invention also provides a kind of camera head stain detection devices, referring to Fig. 5, showing camera dirt The structural schematic diagram of point detection device, may include: memory 501 and processor 502.
Memory 501, for storing program;
Processor 502, for executing described program, described program is specifically used for:
The target image sequence under target scene is obtained, the target image sequence includes target image and the target figure N frame image before or after picture, wherein N is the integer more than or equal to 1;
The corresponding statistical nature of the target image is determined based on the target image sequence, and is based on the statistical nature Determine the stain occlusion area in the target image;
By the dust detection model pre-established, stain occlusion area is detected from the target image;
Go out by the stain occlusion area determined based on the statistical nature and by the dust detection model inspection Stain occlusion area is merged, and the final dust detection result of the target image is obtained.
Camera head stain detection device can also include: bus, communication interface 503, input equipment 504 and output equipment 505。
Processor 502, memory 501, communication interface 503, input equipment 504 and output equipment 505 are mutual by bus Connection.Wherein:
Bus may include an access, transmit information between computer system all parts.
Processor 502 can be general processor, such as general central processor (CPU), microprocessor etc., be also possible to Application-specific integrated circuit (application-specific integrated circuit, ASIC), or one or more use In the integrated circuit that control the present invention program program executes.It can also be digital signal processor (DSP), specific integrated circuit (ASIC), ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components.
Processor 502 may include primary processor, may also include baseband chip, modem etc..
The program for executing technical solution of the present invention is preserved in memory 501, can also preserve operating system and other Key business.Specifically, program may include program code, and program code includes computer operation instruction.More specifically, it stores Device 501 may include read-only memory (read-only memory, ROM), the other types that can store static information and instruction Static storage device, random access memory (randomaccess memory, RAM), can store information and instruction other The dynamic memory of type, magnetic disk storage, flash etc..
Input equipment 504 may include the device for receiving the data and information of user's input, such as camera, light pen, touch Screen etc..
Output equipment 505 may include allowing output information to the device, such as display screen, loudspeaker etc. of user.
Communication interface 503 may include using the device of any transceiver one kind, so as to logical with other equipment or communication network Letter, such as Ethernet, wireless access network (RAN), WLAN (WLAN) etc..
Processor 502 executes the program stored in memory 501, and calls other equipment, can be used for realizing this hair Each step of camera head stain detection method provided by bright embodiment.
The embodiment of the invention also provides a kind of readable storage medium storing program for executing, are stored thereon with computer program, the computer When program is executed by processor, each step for the camera head stain detection method that above-described embodiment is supplied to is realized.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other The difference of embodiment, the same or similar parts in each embodiment may refer to each other.
In several embodiments provided herein, it should be understood that disclosed method, apparatus and equipment, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be by some communication interfaces, between device or unit Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.In addition, the functional units in various embodiments of the present invention may be integrated into one processing unit, it is also possible to each Unit physically exists alone, and can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (14)

1. a kind of camera head stain detection method characterized by comprising
Obtain the target image sequence under target scene, the target image sequence include target image and the target image it Preceding and/or N frame image later, wherein N is the integer more than or equal to 1;
The corresponding statistical nature of the target image is determined based on the target image sequence, and is determined based on the statistical nature Stain occlusion area in the target image;
By the dust detection model pre-established, stain occlusion area is detected from the target image;
By the stain occlusion area determined based on the statistical nature and the stain gone out by the dust detection model inspection Occlusion area is merged, and the final dust detection result of the target image is obtained.
2. camera head stain detection method according to claim 1, which is characterized in that described to be based on the target image sequence Column determine the corresponding statistical nature of the target image, comprising:
The time domain mean value of the target image sequence is calculated, mean value statistical chart is obtained, as the corresponding target of the target image Mean value statistical chart;
And/or the time domain variance of the target image sequence is calculated, and variance statistic figure is obtained, it is corresponding as the target image Target variance statistical chart;
By the target mean statistical chart or the target variance statistical chart or by the target mean statistical chart and the mesh The fusion statistical chart that mark variance statistic figure obtains after being merged is as the corresponding statistical nature of the target image.
3. camera head stain detection method according to claim 2, which is characterized in that described true based on the statistical nature Stain occlusion area in the fixed target image, comprising:
Binaryzation is carried out to object statistics figure based on the binarization threshold of setting, obtains image as the target figure after binaryzation As corresponding dust detection result figure;
Wherein, the object statistics figure is the target mean statistical chart or the target variance statistical chart or fusion system Meter figure;It is first object value that stain occlusion area in the target image, which is with pixel value in the dust detection result figure, The corresponding region in region of pixel composition.
4. camera head stain detection method according to claim 3, which is characterized in that described true based on the statistical nature Stain occlusion area in the fixed target image, further includes:
The corresponding dust detection result of each frame image in an at least frame image before or after obtaining the target image Figure;
By at least frame figure before or after the corresponding dust detection result figure of the target image, the target image The corresponding dust detection result figure of each frame image is merged as in, and fused image is finally corresponded to as the target image Dust detection result figure.
5. camera head stain detection method according to claim 4, which is characterized in that described that the target image is corresponding Dust detection result figure, the corresponding dust detection result figure of an at least frame image before or after the target image It is merged, comprising:
By at least frame figure before or after the corresponding dust detection result figure of the target image, the target image The corresponding dust detection result figure of each frame image carries out logical AND operation as in.
6. camera head stain detection method according to claim 4 or 5, which is characterized in that described by pre-establishing Dust detection model detects stain occlusion area from the target image, comprising:
The target image is inputted to the dust detection model pre-established, obtains the dirt of the dust detection model output Point occlusion area segmentation figure;
Wherein, the dust detection model is using the stain shielded image under the target scene as training sample, to the dirt Each pixel of stain occlusion area is labeled, using third target value to each pixel in other regions in point shielded image What the annotation results for using the 4th target value to be labeled were trained for sample label;
Wherein, it is the third that the stain occlusion area in the target image, which is with pixel value in the stain region segmentation figure, The corresponding region in region of the pixel composition of target value.
7. target image sequence according to claim 6, it is described to hide the stain determined based on the statistical nature It keeps off region and is merged by the stain occlusion area that the dust detection model inspection goes out, it is final to obtain the target image Dust detection result, comprising:
The corresponding dust detection result figure of the target image and the stain region segmentation figure are subjected to logical AND operation, logic The dust detection result final as the target image with the result of operation.
8. a kind of camera head stain detection device characterized by comprising image sequence obtains module, first detection module, the Two detection modules and testing result Fusion Module;
Described image retrieval module, for obtaining the target image sequence under target scene, the target image sequence packet Include the N frame image before or after target image and the target image, wherein N is the integer more than or equal to 1;
The first detection module, for determining the corresponding statistical nature of the target image based on the target image sequence, And the stain occlusion area in the target image is determined based on the statistical nature;
Second detection module detects dirt from the target image for the dust detection model by pre-establishing Point occlusion area;
The testing result Fusion Module, for that based on the stain occlusion area that the statistical nature is determined and will pass through described The stain occlusion area that dust detection model inspection goes out is merged, and the final dust detection result of the target image is obtained.
9. camera head stain detection device according to claim 8, which is characterized in that the first detection module includes: Statistical nature determining module;
The statistical nature determining module obtains mean value statistical chart, makees for calculating the time domain mean value of the target image sequence For the corresponding target mean statistical chart of the target image;And/or the time domain variance of the target image sequence is calculated, it obtains Variance statistic figure, as the corresponding target variance statistical chart of the target image;By the target mean statistical chart or the mesh The fusion system marking variance statistic figure or being obtained after being merged the target mean statistical chart and the target variance statistical chart Meter figure is as the corresponding statistical nature of the target image.
10. camera head stain detection device according to claim 9, which is characterized in that the first detection module includes: Stain occlusion area determining module;
The stain occlusion area determining module carries out binaryzation to object statistics figure for the binarization threshold based on setting, Image is obtained after binaryzation as the corresponding dust detection result figure of the target image;
Wherein, the object statistics figure is the target mean statistical chart or the target variance statistical chart or fusion system Meter figure;It is first object value that stain occlusion area in the target image, which is with pixel value in the dust detection result figure, The corresponding region in region of pixel composition.
11. camera head stain detection device according to claim 10, which is characterized in that the stain occlusion area determines Module, the corresponding stain inspection of each frame image in at least frame image before or after being also used to obtain the target image Result figure is surveyed, by least one before or after the corresponding dust detection result figure of the target image, the target image The corresponding dust detection result figure of each frame image is merged in frame image, and fused image is final as the target image Corresponding dust detection result figure.
12. camera head stain detection device described in 0 or 11 according to claim 1, which is characterized in that the second detection mould Block obtains the dust detection model specifically for the target image is inputted the dust detection model pre-established The stain occlusion area segmentation figure of output;
Wherein, the dust detection model is using the stain shielded image under the target scene as training sample, to the dirt Each pixel of stain occlusion area is labeled, using third target value to each pixel in other regions in point shielded image What the annotation results for using the 4th target value to be labeled were trained for sample label;
Wherein, it is the third that the stain occlusion area in the target image, which is with pixel value in the stain region segmentation figure, The corresponding region in region of the pixel composition of target value.
13. a kind of camera head stain detection device characterized by comprising memory and processor;
The memory, for storing program;
The processor, for executing described program, described program is specifically used for:
Obtain the target image sequence under target scene, the target image sequence include target image and the target image it Preceding and/or N frame image later, wherein N is the integer more than or equal to 1;
The corresponding statistical nature of the target image is determined based on the target image sequence, and is determined based on the statistical nature Stain occlusion area in the target image;
By the dust detection model pre-established, stain occlusion area is detected from the target image;
By the stain occlusion area determined based on the statistical nature and the stain gone out by the dust detection model inspection Occlusion area is merged, and the final dust detection result of the target image is obtained.
14. a kind of readable storage medium storing program for executing, is stored thereon with computer program, which is characterized in that the computer program is processed When device executes, each step of the camera head stain detection method as described in any one of claims 1 to 7 is realized.
CN201810958638.4A 2018-08-22 2018-08-22 Camera stain detection method, device, equipment and storage medium Active CN109118498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810958638.4A CN109118498B (en) 2018-08-22 2018-08-22 Camera stain detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810958638.4A CN109118498B (en) 2018-08-22 2018-08-22 Camera stain detection method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109118498A true CN109118498A (en) 2019-01-01
CN109118498B CN109118498B (en) 2021-04-30

Family

ID=64853488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810958638.4A Active CN109118498B (en) 2018-08-22 2018-08-22 Camera stain detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109118498B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110321888A (en) * 2019-03-18 2019-10-11 华中科技大学 A kind of spaceborne infrared small target detection method based on FPGA
CN110532875A (en) * 2019-07-26 2019-12-03 纵目科技(上海)股份有限公司 Night mode camera lens pays the detection system, terminal and storage medium of object
CN110532876A (en) * 2019-07-26 2019-12-03 纵目科技(上海)股份有限公司 Night mode camera lens pays detection method, system, terminal and the storage medium of object
CN110544211A (en) * 2019-07-26 2019-12-06 纵目科技(上海)股份有限公司 method, system, terminal and storage medium for detecting lens attachment
CN110572636A (en) * 2019-07-23 2019-12-13 RealMe重庆移动通信有限公司 camera contamination detection method and device, storage medium and electronic equipment
CN111563869A (en) * 2019-01-25 2020-08-21 宁波舜宇光电信息有限公司 Stain testing method for quality inspection of camera module
CN111738973A (en) * 2019-03-22 2020-10-02 宁波舜宇光电信息有限公司 Stain testing method, device and system for quality inspection of camera module and storage medium
CN111860120A (en) * 2020-06-03 2020-10-30 江西江铃集团新能源汽车有限公司 Automatic shielding detection method and device for vehicle-mounted camera
CN111932596A (en) * 2020-09-27 2020-11-13 深圳佑驾创新科技有限公司 Method, device and equipment for detecting camera occlusion area and storage medium
CN112183158A (en) * 2019-07-03 2021-01-05 九阳股份有限公司 Grain type identification method of grain cooking equipment and grain cooking equipment
CN112270326A (en) * 2020-11-18 2021-01-26 珠海大横琴科技发展有限公司 Detection optimization method and device for ship sheltering and electronic equipment
WO2022198508A1 (en) * 2021-03-24 2022-09-29 深圳市大疆创新科技有限公司 Lens abnormality prompt method and apparatus, movable platform, and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012243072A (en) * 2011-05-19 2012-12-10 Semiconductor Components Industries Llc Capacitance type touch sensor
CN104143185A (en) * 2014-06-25 2014-11-12 东软集团股份有限公司 Blemish zone detecting method
CN106412573A (en) * 2016-10-26 2017-02-15 歌尔科技有限公司 Method and device for detecting lens stain
CN106791807A (en) * 2014-11-24 2017-05-31 歌尔科技有限公司 A kind of method and apparatus of camera module dust detection
CN108346149A (en) * 2018-03-02 2018-07-31 北京郁金香伙伴科技有限公司 image detection, processing method, device and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012243072A (en) * 2011-05-19 2012-12-10 Semiconductor Components Industries Llc Capacitance type touch sensor
CN104143185A (en) * 2014-06-25 2014-11-12 东软集团股份有限公司 Blemish zone detecting method
CN106791807A (en) * 2014-11-24 2017-05-31 歌尔科技有限公司 A kind of method and apparatus of camera module dust detection
CN106412573A (en) * 2016-10-26 2017-02-15 歌尔科技有限公司 Method and device for detecting lens stain
CN108346149A (en) * 2018-03-02 2018-07-31 北京郁金香伙伴科技有限公司 image detection, processing method, device and terminal

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
A. YAMASHITA,ETAL: "《Removal of adherent noises from image sequences by spatio-temporal image processing》", 《2008 IEEE INTERNATIONAL CONFERENCE ON ROBOTICS AND AUTOMATION》 *
HUANYU WANG,ETAL: "《Detection and removal of adherent noises in video from a moving camera》", 《2012 IEEE INTERNATIONAL CONFERENCE ON SYSTEMS, MAN, AND CYBERNETICS (SMC)》 *
侯春雨: "《基于边缘散焦模型的污点检测算法的研究》", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
张健等: "《基于时序多帧投影的空间目标检测算法》", 《激光与红外》 *
朱源才等: "《基于图像化多帧积累滤波的慢小目标探测方法》", 《系统工程与电子技术》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563869B (en) * 2019-01-25 2023-07-21 宁波舜宇光电信息有限公司 Stain test method for quality inspection of camera module
CN111563869A (en) * 2019-01-25 2020-08-21 宁波舜宇光电信息有限公司 Stain testing method for quality inspection of camera module
CN110321888B (en) * 2019-03-18 2021-11-19 华中科技大学 FPGA-based satellite-borne infrared small target detection method
CN110321888A (en) * 2019-03-18 2019-10-11 华中科技大学 A kind of spaceborne infrared small target detection method based on FPGA
CN111738973A (en) * 2019-03-22 2020-10-02 宁波舜宇光电信息有限公司 Stain testing method, device and system for quality inspection of camera module and storage medium
CN111738973B (en) * 2019-03-22 2023-08-15 宁波舜宇光电信息有限公司 Stain test method, device and system for quality inspection of camera module and storage medium
CN112183158A (en) * 2019-07-03 2021-01-05 九阳股份有限公司 Grain type identification method of grain cooking equipment and grain cooking equipment
CN110572636A (en) * 2019-07-23 2019-12-13 RealMe重庆移动通信有限公司 camera contamination detection method and device, storage medium and electronic equipment
CN110544211A (en) * 2019-07-26 2019-12-06 纵目科技(上海)股份有限公司 method, system, terminal and storage medium for detecting lens attachment
CN110544211B (en) * 2019-07-26 2024-02-09 纵目科技(上海)股份有限公司 Method, system, terminal and storage medium for detecting lens attached object
CN110532876A (en) * 2019-07-26 2019-12-03 纵目科技(上海)股份有限公司 Night mode camera lens pays detection method, system, terminal and the storage medium of object
CN110532875A (en) * 2019-07-26 2019-12-03 纵目科技(上海)股份有限公司 Night mode camera lens pays the detection system, terminal and storage medium of object
CN111860120A (en) * 2020-06-03 2020-10-30 江西江铃集团新能源汽车有限公司 Automatic shielding detection method and device for vehicle-mounted camera
CN111860120B (en) * 2020-06-03 2023-11-17 江西江铃集团新能源汽车有限公司 Automatic shielding detection method and device for vehicle-mounted camera
CN111932596A (en) * 2020-09-27 2020-11-13 深圳佑驾创新科技有限公司 Method, device and equipment for detecting camera occlusion area and storage medium
CN112270326B (en) * 2020-11-18 2022-03-22 珠海大横琴科技发展有限公司 Detection optimization method and device for ship sheltering and electronic equipment
CN112270326A (en) * 2020-11-18 2021-01-26 珠海大横琴科技发展有限公司 Detection optimization method and device for ship sheltering and electronic equipment
WO2022198508A1 (en) * 2021-03-24 2022-09-29 深圳市大疆创新科技有限公司 Lens abnormality prompt method and apparatus, movable platform, and readable storage medium

Also Published As

Publication number Publication date
CN109118498B (en) 2021-04-30

Similar Documents

Publication Publication Date Title
CN109118498A (en) A kind of camera head stain detection method, device, equipment and storage medium
CN104392468B (en) Based on the moving target detecting method for improving visual background extraction
US7742650B2 (en) Object detection in images
CN106504270B (en) Method and device for displaying target object in video
Lu A multiscale spatio-temporal background model for motion detection
US7809167B2 (en) Method and system for processing captured image information in an interactive video display system
US20210110138A1 (en) Target detection method and apparatus, device, and storage medium
CN102165493B (en) Detection of vehicles in an image
CN104298969B (en) Crowd size's statistical method based on color Yu HAAR Fusion Features
CN101211411B (en) Human body detection process and device
CN107392932A (en) Update the method and apparatus of the background model of the background subtraction for image
CN109271886A (en) A kind of the human body behavior analysis method and system of examination of education monitor video
CN108648211A (en) A kind of small target detecting method, device, equipment and medium based on deep learning
CN110298297A (en) Flame identification method and device
CN104867128B (en) Image blurring detection method and device
CN109472193A (en) Method for detecting human face and device
CN111209858B (en) Real-time license plate detection method based on deep convolutional neural network
CN105740751A (en) Object detection and identification method and system
Baldwin et al. Inceptive event time-surfaces for object classification using neuromorphic cameras
CN109166137A (en) For shake Moving Object in Video Sequences detection algorithm
CN106910204A (en) A kind of method and system to the automatic Tracking Recognition of sea ship
Malhi et al. Vision based intelligent traffic management system
CN105405130A (en) Cluster-based license image highlight detection method and device
CN114170570A (en) Pedestrian detection method and system suitable for crowded scene
CN106611165B (en) A kind of automotive window detection method and device based on correlation filtering and color-match

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