CN108171705A - The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars - Google Patents

The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars Download PDF

Info

Publication number
CN108171705A
CN108171705A CN201810056180.3A CN201810056180A CN108171705A CN 108171705 A CN108171705 A CN 108171705A CN 201810056180 A CN201810056180 A CN 201810056180A CN 108171705 A CN108171705 A CN 108171705A
Authority
CN
China
Prior art keywords
pixel
image
background model
background
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810056180.3A
Other languages
Chinese (zh)
Inventor
刘磊
赵如雪
宋佳晓
李业飞
陈旭
张壮
姜山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN201810056180.3A priority Critical patent/CN108171705A/en
Publication of CN108171705A publication Critical patent/CN108171705A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • 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/20172Image enhancement details
    • G06T2207/20182Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of foreign bodies detection algorithms of liquid in Clear glass bottles and jars, Steerable filter enhancing processing first is carried out to video image, Clear glass bottles and jars profile is gone out using " Hough " change detection again, algorithm detection zone is contracted to liquid detecting area, each pixel for liquid detecting region establishes a background model, calculate the similarity of current pixel point and background model, it is if similar, then it is classified as background, otherwise it is prospect, calculates the connected region area of prospect, if connected region area is less than given threshold, background is then classified as, is otherwise prospect.The present invention can be detected the foreign matter in nontransparent liquid.

Description

The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars
Technical field
The present invention relates to a kind of image processing techniques, the foreign bodies detection algorithm of liquid in particularly a kind of Clear glass bottles and jars.
Background technology
In Clear glass bottles and jars in the intelligent detection equipment of nontransparent fluid product, most crucial detection technique is based on machine The product defects identification of vision and detection technique, wherein preferable image enhancement processing is the base of foreign bodies detection in subsequent liquid Plinth.
At present, the preferable image enhancement technique of enhancing effect has following four:Histogram equalization, help secretly Dow process, Retinex_MSR and Steerable filter method.
(1) histogram equalization be by Cumulative Distribution Function convert based on Histogram Modification Methods, it can generate one The uniform image of width grey level distribution probability, the image after histogram equalization have larger information content.With regard to contrast dynamic For range image less than normal, which, which is based on very shirtsleeve operation, can effectively enrich gray level, therefore as image Automatically the effective means enhanced.
(2) dark channel prior algorithm has preferable effect, but processing time is long, needs for the processing of single image defogging Very big storage resources and computing resource.Therefore, the shortcoming of the algorithm is that real-time is poor, and through dark channel prior algorithm The image handled can be darker than original image, also needs that image is exposed processing to treated, again increases the complexity of algorithm Degree.
(3) Retinex_MSR algorithms are superimposed in simple terms by multiple SSR algorithms, using several different big Linear weighted function normalization has just obtained MSR algorithms again after small scale parameter filtering, and the essence of the two is actually identical. MSR algorithms can adaptively adjust the size of scale parameter according to different images, have good adaptive ability, realize preferable Color effect while keep the preferable detailed information of image.MSR algorithms have color constancy more better than SSR algorithm, The features such as dynamic range compression.And when handling coloured image, often there is the phenomenon that insufficient color saturation, halation in MSR algorithms.
(4) Steerable filter is a kind of image filtering technology, schemes G (be oriented to and scheme) by a guiding, (defeated to target image I Enter image) it is filtered so that last output image is generally similar to target image I, but texture part and guiding It is similar to scheme G.When it is same image that guiding figure G is with input figure I, it is oriented to the effect of figure filtering and the effect of bilateral filtering Similar, but unlike that bilateral filtering, the filtering of guiding figure can be readily devised an optimization unrelated with filter radius Algorithm.When input figure I is an initial mask image, the effect of guiding figure filtering, which is similar to, scratches nomography.Steerable filter Typical case is to protect edge image smoothly and scratch figure, and preferable enhancing effect is also achieved in the enhancing of image defogging.
Invention content
The purpose of the present invention is to provide a kind of foreign bodies detection algorithm of liquid in Clear glass bottles and jars, to saturating in vial Foreign matter in prescribed liquid or nontransparent liquid is detected.
Realize the object of the invention technical solution be:Include the following steps:
Step 1, image is acquired to Clear glass bottles and jars, obtains the RGB image containing moving target, and to image successively Carry out gray scale and Steerable filter processing;
Step 2, Hough transform is carried out to the image that step 1 obtains;
Step 3, the pixel gray value in the image that extraction step 2 obtains in preceding N frames image in Clear glass bottles and jars region, Establish the initial background model M (x) for pixel in Clear glass bottles and jars region;
Step 4, each pixel of each frame image after N+1 frames start and the similarity of background model are calculated, if It is similar, then background is classified as, goes to step 5;Otherwise it is prospect, goes to step 6;
Step 5, for the similar pixel of each frame image after N+1 frames,The similar pixel of probability updating corresponds to The sample of background model,The similar pixel F × F neighborhoods of probability updating in certain pixel correspond to the sample of background model, Go to step 6;
Step 6, it by calculating the connected region area of each frame image after N+1 frames, excludes small in liquid detecting region In the tiny noise jamming of threshold value;
Step 7, step 4 is repeated to step 6, up to all N+1 to nth frame image detection are completed.
Compared with prior art, the present invention haing the following advantages (1) for foreign bodies detection in more muddy liquid, introducing is led Image enhancement is carried out to filtering, enhances gradation of image contrast, highlights the useful information in figure, improve the follow-up place of image Reason ability is more advantageous to detection and extraction to foreign matter;(2) for the random noise point outside liquid detecting region, by " Hough " Transformation is introduced into VIBE algorithms, and by carrying out straight-line detection to vial profile, detection zone is contracted to liquid in vial Body region not only reduces the operand of algorithm, improves the speed of service of algorithm, also effectively eliminates outside liquid detecting region Background area existing for noise jamming;(3) for the tiny noise spot in liquid detecting region, by setting connected region area Threshold value will be set to background dot less than the connected region of the area threshold.
The invention will be further described with reference to the accompanying drawings of the specification.
Description of the drawings
Fig. 1 is the method for the present invention flow chart.
Fig. 2 is histogram equalization, Steerable filter, Retinex_MSR algorithms and helps Dow process secretly to foreign matters different in clear water Enhancing effect comparison diagram, wherein the gray-scale map of (a1) primitive frame image;(b1) the enhancing effect figure (c1) of histogram equalization The enhancing effect figure of Steerable filter;(d1) the enhancing effect figure of Retinex_MSR algorithms;(e1) enhancing effect of Dow process is helped secretly Figure.
Fig. 3 for histogram equalization, Steerable filter, Retinex_MSR algorithms and help secretly Dow process in slightly troubled liquor not With the enhancing effect comparison diagram of foreign matter, wherein the gray-scale map of (a1) primitive frame image;(b1) enhancing effect of histogram equalization Scheme the enhancing effect figure of (c1) Steerable filter;(d1) the enhancing effect figure of Retinex_MSR algorithms;(e1) enhancing of Dow process is helped secretly Design sketch.
Fig. 4 for histogram equalization, Steerable filter, Retinex_MSR algorithms and help secretly Dow process to compared in troubled liquor not With foreign matter enhancing effect comparison diagram wherein, the gray-scale map of (a1) primitive frame image;(b1) enhancing effect of histogram equalization Scheme the enhancing effect figure of (c1) Steerable filter;(d1) the enhancing effect figure of Retinex_MSR algorithms;(e1) enhancing of Dow process is helped secretly Design sketch.
Fig. 5 is the foreign bodies detection effect contrast figure of connected region before and after the processing, wherein (a) be not using connected region processing Foreign bodies detection design sketch;(b) the foreign bodies detection design sketch handled using connected region.
Specific embodiment
With reference to Fig. 1, the foreign bodies detection algorithm of liquid, includes the following steps in a kind of Clear glass bottles and jars:
Step 1, image is acquired to Clear glass bottles and jars, obtains the RGB image containing moving target, and to image successively Carry out gray scale and Steerable filter processing;
Step 2, Hough transform is carried out to the image that step 1 obtains;
Step 3, the pixel gray value in the image that extraction step 2 obtains in preceding N frames image in Clear glass bottles and jars region, Establish the initial background model M (x) for pixel in Clear glass bottles and jars region;
Step 4, each pixel of each frame image after N+1 frames start and the similarity of background model are calculated, if It is similar, then background is classified as, goes to step 5;Otherwise it is prospect, goes to step 6;
Step 5, for the similar pixel of each frame image after N+1 frames,The similar pixel of probability updating corresponds to The sample of background model,The similar pixel F × F neighborhoods of probability updating in certain pixel correspond to the sample of background model, Go to step 6;
Step 6, it by calculating the connected region area of each frame image after N+1 frames, excludes small in liquid detecting region In the tiny noise jamming of threshold value;
Step 7, step 4 is repeated to step 6, up to all N+1 to nth frame image detection are completed.
In step 1, gray level image carries out image enhancement step using Steerable filter and is exemplified below:Using images themselves to lead Xiang Tu, windows radius are sized to 16, and regularization coefficient is set as 0.4^2, the Steerable filter figure of output and the line being oriented between figure Property coefficient is respectively 5 and 1.
" Hough " transformation is carried out in step 2, the detection zone of algorithm is reduced, improves the speed of service of algorithm and exclude liquid Noise jamming step outside body detection zone is exemplified below:The peak number to be found of setting is 5 when " Hough " is converted, and sets peak Be worth threshold size for " ceil (0.3*max (H (:))) ", " H " is obtained " Hough " matrix, only more than the point of the threshold value Being considered as may peak point.The line segment that combined distance is taken the straight line detected to be less than 5 abandons all length and is less than 7 The method of line segment filters out the profile line segment of Clear glass bottles and jars, records the position of contour line section.To step 2 in enhanced image Pixel judge it whether in Clear glass bottles and jars contour area, if certain pixel outside Clear glass bottles and jars contour area, For background, it is otherwise prospect, goes to step 3, the detection zone of algorithm is narrowed down in Clear glass bottles and jars contour area, reduces and calculate The operand of method.
Background model M (x)={ P in step 31,P2,...,PN, wherein, P1,P2,...,PNSample for background model This.This example N takes 20, and 20 samples are shared in background model M (x).
Similar deterministic process in step 4 is:
Step 4.1, since N+1 frames, for a certain pixel x of present frame, gray value is P (x), in European color Defined in space one centered on P (x), R be radius circle SRThe gray value and the corresponding back of the body of (P (x)) to current frame pixel point x Sample in scape model compares, wherein, R be Model Matching threshold value, SR(P (x)) represents all samples for being less than R with P (x) distances This set;
Step 4.2, if some sample value of background model is in circle SRIn (P (x)), then it represents that pixel x and the sample Matching, i.e., with # { SR(P(x))∩{P1,P2,...PNThe similarity of P (x) and background model M (x) described;This example R takes 20;
Step 4.3, given threshold #min, if # { SR(P(x))∩{P1,P2,...PN< #min, then pixel x with Background model M (x) is mismatched, and judges the point for foreground point;Otherwise, it is judged as background dot;This example #min takes 3.
In step 5, the update of background model is the key that moving object detection algorithm, mainly background model is fitted Answer the continuous variation of background, such as the variation of illumination, the change of background object etc..The similar pixel of probability updating corresponds to the back of the body The detailed process of the sample of scape model is:With the gray value of the similar pixel of present frame replace withProbability is from background model The gray value of corresponding pixel in the sample selected in M (x).The similar pixel F × F neighborhoods of probability updating in certain picture The detailed process that vegetarian refreshments corresponds to the sample of background model is:Probability replaced with the gray value of the similar pixel of present frame In its F × F neighborhoods in the corresponding background model of some pixel respective point pixel gray value.
In step 6, connected region area threshold is 50, and connected region area in testing result is less than to the foreground zone of threshold value Domain background is shown, is otherwise judged as foreground target.
Embodiment
Visible light video is acquired first with Visible-light CCD, it will be in video input to computer;It is carried to detect the present invention The foreign matter detecting method effect of liquid in a kind of Clear glass bottles and jars gone out, now passes through MATLABR2014a developing algorithm simulation models The Steerable filter algorithm for image enhancement introduced in the present invention and histogram equalization, Retinex_MSR algorithms and dark is first The enhancing effect of checking method is compared.It is 352*288 to choose size respectively, frame rate be 25 frames/second clear water in it is black Color scrap gum sport video 1;Ecru eraser chips sport video 2 in clear water;White bits sport video 3 in clear water;In clear water thoroughly Bright chips of glass sport video 4;Black rubber considers sport video 5 to be worth doing slightly in troubled liquor;Ecru eraser chips are transported slightly in troubled liquor Dynamic video 6;White bits sport video 7 slightly in troubled liquor;Transparent glass considers sport video 8 to be worth doing slightly in troubled liquor;Compared with turbid solution Black rubber considers sport video 9 to be worth doing in body;Compared with ecru eraser chips sport video 10 in troubled liquor;Compared with white bits in troubled liquor Sport video 11;Sport video 12 is considered to be worth doing compared with transparent glass in troubled liquor;
For every frame image gray processing first of original video source, histogram equalization is respectively adopted to the image of gray processing Change, Steerable filter, Retinex_MSR algorithms and dark channel prior algorithm carry out image enhancement processing.
Foreign matter in Fig. 2, Fig. 3, Fig. 4 in first row image is considered to be worth doing for black rubber, and the foreign matter in secondary series image is cream colour Color eraser chips, the foreign matter in third row image are white paper scrap, and the foreign matter in the 4th row image is transparent glass bits.
As can be seen from Figure 2, the gray-scale map for scheming the former video frame images shown in (a1) is dark, and the identification of foreign matter is very low, figure (b1) overall brightness of the image after histogram equalization improves, and gray scale is stretched, and the tonal gradation included in image is more Abundant, the information that image includes increases, and the foreign matter of detection and the grey-scale contrast of neighborhood territory pixel increase, but effect and unknown It is aobvious;Scheme (c1) enhancing effect after Steerable filter, the grey-scale contrast in image significantly increases, foreign matter and the neighborhood picture of detection The gray difference of element is apparent, and enhancing effect is preferable;The effect that figure (d1) is enhanced using Retinex_MSR algorithms, image entirety Brightness improves, but image entirety is more fuzzy, and enhancing effect is poor.Figure (e1) is to carry out image enhancement using Steerable filter Effect, enhanced image overall gray value declines, dark compared with original image, and the effect that highlights of foreign matter is not obvious, and increases It is strong ineffective.
From figure 3, it can be seen that figure (a1) is the gray-scale map of the slightly primitive frame image of troubled liquor, since liquid turbidity increases Add, human eye is difficult identification foreign matter.(b1) is schemed for slightly troubled liquor frame image effect after histogram equalization, is significantly deposited in image In " exposure " phenomenon of large area, ecru eraser chips, white paper scrap and transparent glass foreign matter, inspection have been blocked in white exposure area It is poor to survey effect.In addition, " exposure " of large area may cause noise spot in final detection figure to increase;(c1) is schemed through Steerable filter Enhancing effect afterwards, the grey-scale contrast in image significantly increase, and the foreign matter of detection and the gray difference of neighborhood territory pixel are apparent, increase Potent fruit is preferable;The effect that figure (d1) is enhanced using Retinex_MSR algorithms, the brightness of image entirety improves, but image is whole It is more fuzzy, enhancing effect is poor.Figure (e1) is using the effect for helping Dow process progress image enhancement secretly, foreign matter and field pixel Grey-scale contrast have increased slightly, but enhanced image overall intensity is dark compared with original image, foreign matter profile is not obvious, enhancing effect Fruit is bad.
Scheme as can be seen from Figure 4, (a1) is the gray-scale map of the primitive frame image compared with troubled liquor, due to liquid turbidity again Increase, human eye can not almost recognize foreign matter.(b1) is schemed for figure (a1) effect after histogram equalization, it can be seen that is gone out in image Now apparent large area " exposure " and " bulk " phenomenon, it is virtually impossible to detect and tell foreign matter, detection result is very poor.In addition, " exposure " and " bulk " of large area may cause noise spot in final detection figure to increase;Scheme the enhancing of (c1) after Steerable filter Effect, image overall intensity is relatively low, compares primitive frame gradation of image figure, can distinguish foreign matter position, but detection result is bad;Figure (d1) effect enhanced using Retinex_MSR algorithms, the brightness of image entirety are improved, but image entirety is very fuzzy, can not Foreign matter is distinguished, enhancing effect is very poor.It is the enhancing effect figure for helping Dow process secretly to scheme (e1), and overall intensity is dark compared with original image, almost without Method differentiates foreign matter, and enhancing effect is poor.
To compare the speed of service of different enhancing algorithms, increase clocking capability in former algorithm, detect that different enhancings are calculated The operation of method takes.
1 algorithm of histogram equalization of table handles a frame image and takes (s)
Black rubber is considered to be worth doing Ecru eraser chips White paper scrap Transparent glass
Clear water 0.1067 0.1079 0.1101 0.1084
Slightly muddy milk power solution 0.1069 0.1062 0.1059 0.1067
More muddy milk power solution 0.1058 0.1061 0.1061 0.1060
2 Steerable filter algorithm process of table, one frame image takes (s)
Black rubber is considered to be worth doing Ecru eraser chips White paper scrap Transparent glass
Clear water 0.1272 0.1314 0.1301 0.1278
Slightly muddy milk power solution 0.1260 0.1263 0.1267 0.1272
More muddy milk power solution 0.1278 0.1292 0.1269 0.1323
3 Retinex_MSR algorithm process of table, one frame image takes (s)
Black rubber is considered to be worth doing Ecru eraser chips White paper scrap Transparent glass
Clear water 0.1645 0.1689 0.1651 0.1643
Slightly muddy milk power solution 0.1740 0.1665 0.1678 0.1791
More muddy milk power solution 0.1671 0.1656 0.1691 0.1656
4 dark algorithm process of table, one frame image takes (s)
Black rubber is considered to be worth doing Ecru eraser chips White paper scrap Transparent glass
Clear water 0.3181 0.3161 0.3184 0.3284
Slightly muddy milk power solution 0.3253 0.3184 0.3157 0.3185
More muddy milk power solution 0.3145 0.3176 0.3165 0.3185
Data in contrast table 1,2,3 and 4 can be seen that in four kinds enhance algorithm, helps Dow process secretly and handles a frame image Longest is taken, and treatment effect is poor;Steerable filter is long compared with the time of one frame image of histogram equalization processing, compares Retinex_ The time of one frame image of MSR algorithm process is short, and histogram equalization and Retinex_MSR algorithms are for the primitive frame of troubled liquor The enhancing effect of image is good not as good as the enhancing effect of Steerable filter.Consider, this paper selective guides are filtered to primitive frame image Carry out enhancing processing, but for the enhancing compared with troubled liquor, treated that image is integrally dark for enhancing.
In order to verify the effect for calculating connected region area to removing tiny noise, it is respectively adopted and is added without calculating connected region The algorithm that domain area and addition calculate connected region area carries out simulation process to above-mentioned video.
Fig. 5 is the foreign bodies detection effect contrast figure of connected region before and after the processing:(a) not using the foreign matter of connected region processing Detection result figure;(b) the foreign bodies detection design sketch handled using connected region;
From fig. 5, it can be seen that figure (a) is as a result, the interference due to noise not using the foreign bodies detection of connected region processing There is the smaller noise spot of connected region area, detection result are caused to decline in foreign matter edge in testing result, liquid detecting region, In the frame image even occurred in no foreign matter, a small number of noise spots are mistaken for foreign matter target, accuracy of detection is caused to decline.Figure (b) it is using the foreign matter effect detected after the judgement of connected region area, it can be seen that the noise spot at foreign matter edge is gone completely It removes, the detection profile of foreign matter is more clear;The smaller noise spot of other connected region areas in liquid detecting region is removed Effect is also preferable;For the frame image that no foreign matter occurs, using, without foreground point, reducing and miss in connected region treated image Sentence rate, improve accuracy of detection.
In order to by the foreign matter detecting method of liquid in traditional VIBE algorithms and a kind of Clear glass bottles and jars proposed by the present invention Detection result carries out detailed comparisons, we have carried out simulation process to above-mentioned video respectively with two kinds of algorithms.
The foreign bodies detection effect of 5 tradition VIBE algorithms of table
As can be seen from Table 5, VIBE algorithms can detect four kinds of foreign matters in clear water, but for transparent glass in clear water Detection result is poor, the area very little of the chips of glass detected;For in slightly troubled liquor, the detection results of four kinds of foreign matters compared with Difference considers shape smaller black rubber bits and transparent glass to be worth doing, and VIBE algorithms are nearly no detectable;For more muddy milk powder solution Four kinds of foreign matters in body, the overwhelming majority can't detect.It can be seen that the muddy degree due to liquid is different, detection result is caused Decline to some extent, therefore, before foreign bodies detection is carried out, image need to be pre-processed, reduce troubled liquor to foreign matter Fuzzy Influence, enhance picture contrast, and then improve detection result.
Table 6 is the foreign bodies detection effect of this paper VIBE algorithms
As can be seen from Table 6, compared with the effect of former VIBE algorithms detection foreign matter, the integrity degree for detecting foreign matter significantly carries Height, former algorithm consider the black rubber in slightly troubled liquor to be worth doing, and transparent glass foreign matter can not detected, and this paper algorithms can be preferable Detect such foreign matter;Further for compared with the foreign matter in troubled liquor, former VIBE algorithms can not almost detect all kinds of foreign matters, This paper algorithms can detect that black rubber is considered to be worth doing, ecru eraser chips and white paper scrap, but for transparent glass foreign matter, the inspection of this paper It is poor to survey effect.

Claims (8)

1. the foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars, which is characterized in that include the following steps:
Step 1, image is acquired to Clear glass bottles and jars, obtains the RGB image containing moving target, and image is carried out successively Gray scale and Steerable filter processing;
Step 2, Hough transform is carried out to the image that step 1 obtains;
Step 3, the pixel gray value in the image that extraction step 2 obtains in preceding N frames image in Clear glass bottles and jars region is established For the initial background model M (x) of pixel in Clear glass bottles and jars region;
Step 4, each pixel of each frame image after N+1 frames start and the similarity of background model are calculated, if similar, Background is then classified as, goes to step 5;Otherwise it is prospect, goes to step 6;
Step 5, for the similar pixel of each frame image after N+1 frames,The similar pixel of probability updating corresponds to background mould The sample of type,The similar pixel F × F neighborhoods of probability updating in certain pixel correspond to the sample of background model, go to step 6;
Step 6, it by calculating the connected region area of each frame image after N+1 frames, excludes in liquid detecting region less than threshold The tiny noise jamming of value;
Step 7, step 4 is repeated to step 6, up to all N+1 to nth frame image detection are completed.
2. according to the method described in claim 1, it is characterized in that, background model M (x)={ P in step 31,P2,..., PN,
Wherein, P1,P2,...,PNSample for background model.
3. according to the method described in claim 1, it is characterized in that, the similar deterministic process in step 4 is:
Step 4.1, since N+1 frames, for a certain pixel x of present frame, gray value is P (x), in European color space Defined in one centered on P (x), R be radius circle SRThe gray value and corresponding background mould of (P (x)) to current frame pixel point x Sample in type compares, wherein, R be Model Matching threshold value, SR(P (x)) represents all samples for being less than R with P (x) distances Set;
Step 4.2, if some sample value of background model is in circle SRIn (P (x)), then it represents that pixel x and the sample matches, Use # { SR(P(x))∩{P1,P2,...PNThe similarity of P (x) and background model M (x) described;
Step 4.3, given threshold #min, if # { SR(P(x))∩{P1,P2,...PN< #min, then pixel x and background mould Type M (x) is mismatched, and judges the point for foreground point;Otherwise, it is judged as background dot.
4. according to the method described in claim 1, it is characterized in that,The similar pixel of probability updating corresponds to background model The detailed process of sample is:
With the gray value of the similar pixel of present frame replace withIt is corresponding in the sample that probability is selected from background model M (x) Pixel gray value.
5. according to the method described in claim 1, it is characterized in that,The similar pixel F × F neighborhoods of probability updating in certain The detailed process that pixel corresponds to the sample of background model is:
Probability replace the corresponding back of the body of some pixel in its F × F neighborhoods with the gray value of the similar pixel of present frame The gray value of respective point pixel in scape model.
6. according to the method described in claim 1, it is characterized in that, the method that Steerable filter is handled in step 1 includes:
16 are sized to using images themselves as figure, windows radius is oriented to, regularization coefficient is set as 0.4^2, the Steerable filter of output Linear coefficient between figure and guiding figure is respectively 5 and 1.
7. according to the method described in claim 1, it is characterized in that, the peak value to be found is set in step 2 during Hough transform Mesh is 5, setting peak threshold size for ceil (0.3*max (H (:))), it is possible peak point that the point more than the threshold value, which is,.
8. according to the method described in claim 1, it is characterized in that, in step 6, connected region area threshold is 50.
CN201810056180.3A 2018-01-20 2018-01-20 The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars Pending CN108171705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810056180.3A CN108171705A (en) 2018-01-20 2018-01-20 The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810056180.3A CN108171705A (en) 2018-01-20 2018-01-20 The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars

Publications (1)

Publication Number Publication Date
CN108171705A true CN108171705A (en) 2018-06-15

Family

ID=62514954

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810056180.3A Pending CN108171705A (en) 2018-01-20 2018-01-20 The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars

Country Status (1)

Country Link
CN (1) CN108171705A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615610A (en) * 2018-11-13 2019-04-12 浙江师范大学 A kind of medical band-aid flaw detection method based on YOLO v2-tiny
CN112529877A (en) * 2020-12-15 2021-03-19 中国联合网络通信集团有限公司 Method and device for detecting impurities in bottled liquid
CN116823835A (en) * 2023-08-30 2023-09-29 山东省永星食品饮料有限公司 Bottled water impurity detection method based on machine vision

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105784722A (en) * 2016-04-29 2016-07-20 中南大学 Method and system of detecting visible foreign matters in medicine liquid bottles on flow line
US20160352995A1 (en) * 2015-05-26 2016-12-01 SK Hynix Inc. Apparatus for generating image and method thereof
CN107220950A (en) * 2017-05-31 2017-09-29 常州工学院 A kind of Underwater Target Detection image enchancing method of adaptive dark channel prior

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160352995A1 (en) * 2015-05-26 2016-12-01 SK Hynix Inc. Apparatus for generating image and method thereof
CN105784722A (en) * 2016-04-29 2016-07-20 中南大学 Method and system of detecting visible foreign matters in medicine liquid bottles on flow line
CN107220950A (en) * 2017-05-31 2017-09-29 常州工学院 A kind of Underwater Target Detection image enchancing method of adaptive dark channel prior

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
OLIVIER BARNICH 等: "ViBe: A Universal Background Subtraction Algorithm for Video Sequences", 《IEEE TRANSACTIONS ON IMAGE PROCESSING》 *
陶雄: "液体制剂中异物检测的机器智能识别", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615610A (en) * 2018-11-13 2019-04-12 浙江师范大学 A kind of medical band-aid flaw detection method based on YOLO v2-tiny
CN109615610B (en) * 2018-11-13 2023-06-06 浙江师范大学 Medical band-aid flaw detection method based on YOLO v2-tiny
CN112529877A (en) * 2020-12-15 2021-03-19 中国联合网络通信集团有限公司 Method and device for detecting impurities in bottled liquid
CN116823835A (en) * 2023-08-30 2023-09-29 山东省永星食品饮料有限公司 Bottled water impurity detection method based on machine vision
CN116823835B (en) * 2023-08-30 2023-11-10 山东省永星食品饮料有限公司 Bottled water impurity detection method based on machine vision

Similar Documents

Publication Publication Date Title
CN115082683B (en) Injection molding defect detection method based on image processing
CN115375676A (en) Stainless steel product quality detection method based on image recognition
US9251614B1 (en) Background removal for document images
CN111915704A (en) Apple hierarchical identification method based on deep learning
CN111161222B (en) Printing roller defect detection method based on visual saliency
CN108171705A (en) The foreign bodies detection algorithm of liquid in a kind of Clear glass bottles and jars
CN111145105B (en) Image rapid defogging method and device, terminal and storage medium
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN111754538B (en) Threshold segmentation method for USB surface defect detection
CN116309191B (en) Intelligent gas inspection display method based on image enhancement
Shaikh et al. A novel approach for automatic number plate recognition
CN113221881B (en) Multi-level smart phone screen defect detection method
CN114708325A (en) Method for quickly positioning rubber production problem based on rubber blooming defect
CN113256624A (en) Continuous casting round billet defect detection method and device, electronic equipment and readable storage medium
CN114926407A (en) Steel surface defect detection system based on deep learning
CN110866915A (en) Circular inkstone quality detection method based on metric learning
CN114549441A (en) Sucker defect detection method based on image processing
CN111815563B (en) Retina optic disc segmentation method combining U-Net and region growing PCNN
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN114018946B (en) OpenCV-based high-reflectivity bottle cap defect detection method
CN114092682A (en) Small hardware fitting defect detection algorithm based on machine learning
CN108805854B (en) Method for rapidly counting tablets and detecting completeness of tablets in complex environment
CN113537037A (en) Pavement disease identification method, system, electronic device and storage medium
CN111210405A (en) Volatile organic compound leakage detection method based on infrared imaging
CN117197064A (en) Automatic non-contact eye red degree analysis 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