CN105427324B - The magneto-optic image defects detection method searched for automatically based on binary-state threshold - Google Patents

The magneto-optic image defects detection method searched for automatically based on binary-state threshold Download PDF

Info

Publication number
CN105427324B
CN105427324B CN201510888490.8A CN201510888490A CN105427324B CN 105427324 B CN105427324 B CN 105427324B CN 201510888490 A CN201510888490 A CN 201510888490A CN 105427324 B CN105427324 B CN 105427324B
Authority
CN
China
Prior art keywords
pixel
magneto
spot
optic
image
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.)
Expired - Fee Related
Application number
CN201510888490.8A
Other languages
Chinese (zh)
Other versions
CN105427324A (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.)
University of Electronic Science and Technology of China
Original Assignee
University of Electronic Science and Technology of China
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 University of Electronic Science and Technology of China filed Critical University of Electronic Science and Technology of China
Priority to CN201510888490.8A priority Critical patent/CN105427324B/en
Publication of CN105427324A publication Critical patent/CN105427324A/en
Application granted granted Critical
Publication of CN105427324B publication Critical patent/CN105427324B/en
Expired - Fee Related 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/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • 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/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of magneto-optic image defects detection method searched for automatically based on binary-state threshold, first mean filter is carried out to obtaining magneto-optic gray-scale map, then binary-state threshold is searched for automatically, the pixel filling scan method of " pouring water " formula has been used in search procedure, filling area under different packed heights is calculated, fitting obtains change curve of the filling area relative to packed height, search obtains packed height in curve corresponding to filling area growth rate maximum as optimal binaryzation threshold values, then binary conversion treatment is carried out to the magneto optic images, recycle and spot is obtained to binary picture progress contour detecting, calculate the area of each spot, by filtering out interference of the method exclusive PCR hot spot of fleck to defect, so as to detect to obtain defect.Then the present invention filters out interference, so as to which rapidly and accurately extraction obtains clearly defect information by searching for optimal binary-state threshold automatically using area.

Description

The magneto-optic image defects detection method searched for automatically based on binary-state threshold
Technical field
The invention belongs to magneto-optic imaging non-destructive defect detecting technique field, more specifically, is related to one kind and is based on two-value Change the magneto-optic image defects detection method that threshold value is searched for automatically.
Background technology
The detection of the focus that surface and subsurface defect are always studied now, particularly subsurface defect.Present nothing Damage detection mode has ultrasonic method, electromagnetic eddy method, ray method and infrared thermography etc., these methods in certain degree all Defect can be detected, but testing goal is all extremely difficult to for small defect, these methods.Magneto-optic is imaged as new development Non-destructive testing technology, there is accuracy of detection height, it is sensitive to defect, particularly there are good Detection results to subsurface defect.Separately It is outer one it is outstanding the characteristics of be that its testing result is used directly for observing, be very easy to visual energy of the personnel to defect Power.
At present, magneto-optic image checking is in primary developing stage, and most of research is entered both for the characteristics of image itself Row visualization and the forced working of defect.But for how magnetic domain hot spot caused by processing detection process and detection caused by light Drain off and disturb few researchs always.Due to the image effect almost mould one with defect caused by magnetic domain hot spot and light stream interference Sample, special algorithm is thus needed to filter out the interference of these spots.It is more existing to filter out the filtering that mode is Pixel-level mostly Method and the filtering method based on pattern-recognition, because interference spot size is big for hundred times of pixel, and without fixed shape, This make it that both approaches are difficult directly to filter out them.
The content of the invention
It is an object of the invention to overcome the deficiencies of the prior art and provide a kind of magnetic searched for automatically based on binary-state threshold Photoimaging defect inspection method, optimal binary-state threshold is searched for automatically, so as to realize defects detection exactly.
For achieving the above object, the magneto-optic image defects detection method that the present invention is searched for automatically based on binary-state threshold Comprise the following steps:
S1:The magneto optic images of test specimen are obtained using magneto-optic imaging device, gray processing is carried out and handles to obtain magneto-optic gray-scale map;
S2:Mean filter is carried out to magneto-optic gray-scale map, obtains filtered image I;
S3:Binary-state threshold is searched for, it is comprised the following steps that:
S3.1:Search for the maximum obtained in image I in all pixels point pixel value and be designated as G, maximum filler pixels are set Value K=λ G, λ are the constant more than 1;
S3.2:Order filling number t=1, initialization packed height value h1
S3.3:According to height value htImage I is filled, matrix Φ after being filled, its formula is as follows:
Φ=ht·H-Ω
Wherein, Ω is image I pixel matrix, and H is and Ω size identical unit matrixs;
S3.4:Each pixel in matrix Φ is scanned, obtains the pixel that element value in matrix Φ is more than or equal to 0 Quantity, pixel quantity is saved as into filling area S (t);
S3.5:If ht< K, into step S3.6, otherwise into step S3.7;
S3.6:Make t=t+1, ht=ht-1+ Δ h, Δ h represent packed height step-length, return to step S3.3;
S3.7:According to each packed height htCarried out curve fitting with corresponding filling area S (t), obtain filling area Relative to the change curve X of packed height;
S3.8:Search obtains the packed height in curve X corresponding to filling area growth rate maximumMake binaryzation threshold Value Expression rounds up;
S4:Binaryzation is carried out to image I according to the step S3 binary-state threshold T for searching for obtain, obtains magneto-optic binary picture Picture;
S5:Contour detecting is carried out to magneto-optic binary image, obtains the profile of each spot;
S6:The area R for each spot that calculation procedure S5 is obtainedq, q=1,2 ..., Q, Q expression amount of speckle;
S7:By the area R of each spotqBy being arranged from small to large, normalizing is carried out in section [1, Q] to area value Change, q-th of area value after note normalization is γq;The poor Δ γ of two neighboring area value is calculated successivelyq′q′+1q′, q ' =1,2 ..., Q-1, once Δ γq′> τ, τ represents default threshold value, by γq′And its all areas block before is accordingly to be regarded as doing Disturb, backfilled spot corresponding to interference using global gray-scale map in magneto-optic gray level image, the magneto-optic gray-scale map after backfill As defects detection result figure.
The magneto-optic image defects detection method that the present invention is searched for automatically based on binary-state threshold, first to obtaining magneto-optic gray-scale map Mean filter is carried out, binary-state threshold is then searched for automatically, has used the pixel filling of " pouring water " formula to scan in search procedure Method, the filling area under different packed heights is calculated, fitting obtains change of the filling area relative to packed height Curve, search obtain packed height in curve corresponding to filling area growth rate maximum as optimal binaryzation threshold values, Then binary conversion treatment is carried out to the magneto optic images, recycles and spot is obtained to binary picture progress contour detecting, calculate each spot The area of point, by filtering out interference of the method exclusive PCR hot spot of fleck to defect, so as to detect to obtain defect.
Then the present invention filters out interference, so as to rapidly and accurately by searching for optimal binary-state threshold automatically using area Extraction obtains clearly defect information.
Brief description of the drawings
Fig. 1 is the pixel value schematic diagram of rejected region;
Fig. 2 is the embodiment for the magneto-optic image defects detection method that the present invention is searched for automatically based on binary-state threshold Flow chart;
Fig. 3 is the automatic search routine figure of " pouring water " formula binary-state threshold;
Fig. 4 is change curve exemplary plot of the obtained filling area of fitting relative to packed height;
Fig. 5 is spot profile testing method flow chart in the present embodiment;
Fig. 6 is speck area calculation flow chart in the present embodiment;
Fig. 7 is test specimen picture used in the present embodiment;
Fig. 8 is the magneto-optic gray-scale map of test specimen shown in Fig. 7;
Fig. 9 is the image after magneto-optic gray-scale map mean filter;
Figure 10 is filling area curve and single order, Second derivative curves;
Figure 11 is magneto-optic binary image;
Figure 12 is defects detection result figure;
Figure 13 is the magneto-optic binary picture of defects detection result;
Figure 14 is magneto-optic gray-scale map comparison diagram after original magneto-optic gray-scale map and filling;
Figure 15 is the magneto-optic gray-scale map result of six kinds of conventional filtering reinforcement methods.
Embodiment
The embodiment of the present invention is described below in conjunction with the accompanying drawings, so as to those skilled in the art preferably Understand the present invention.Requiring particular attention is that in the following description, when known function and the detailed description of design perhaps When can desalinate the main contents of the present invention, these descriptions will be ignored herein.
Embodiment
In order to which technical scheme is better described, the principle of the present invention is briefly described first.
In magneto-optic gray level image, the pixel value of those suspected defects part is less than non-defective part, but defect does not have in itself Fixed depth and shape, slave pattern identify to be difficult to accomplish clearly to detect defect.Therefore, used in defects detection of the present invention Image object is the magneto optic images after binaryzation.By binaryzation the edge of defect and positional information can be made largely complete Portion is shown.Further according to the characteristic of image, it is filtered by different algorithms, so as to obtain the image of defect.By with Upper analysis is understood, in magneto-optic detection, image binaryzation is particularly important.So image binaryzation when use the selection of threshold value Often most important, prior art is all empirically determined threshold values in many cases, to the photo of original the magneto optic images Quality has very big requirement and limitation.
Fig. 1 is the pixel value schematic diagram of rejected region.As shown in figure 1, because the pixel value of defect part is smaller, therefore Rejected region pixel value gradually increases inside-out.Therefore when carrying out filling from low to high to gray level image, not Same height, the area of filling is different.It is not only of different sizes, and area growth rate is also different.On defect side At edge, area growth rate, which has one, significantly to be increased, and is fallen after rise again afterwards, and a kind of change of serpentine shape is presented.According to Upper principle can search for obtaining binary-state threshold.
Fig. 2 is the embodiment for the magneto-optic image defects detection method that the present invention is searched for automatically based on binary-state threshold Flow chart.As shown in Fig. 2 the present invention includes following step based on the magneto-optic image defects detection method that binary-state threshold is searched for automatically Suddenly:
S201:Obtain magneto-optic gray-scale map:
The magneto optic images of test specimen are obtained using magneto-optic imaging device, gray processing is carried out and handles to obtain magneto-optic gray-scale map.
S202:Mean filter:
Mean filter is carried out to magneto-optic gray-scale map, obtains filtered image I.Filter window in filtering is not easy to set Put too small, the general length of side is more than 5 pixels.It is too small that part bad pixel can be caused not filter out, cause filling below to be united Meter figure fluctuation is larger, reduces the search precision of binary-state threshold.
S203:Binary-state threshold is searched for automatically:
Due to every time detection when illumination and material difference, the pixel value of the magneto optic images it is of different sizes, it is necessary to two-value It is different to change threshold values, therefore the present invention proposes a kind of binary-state threshold automatic search method of " pouring water " formula, to adapt to Different images.Fig. 3 is the automatic search routine figure of " pouring water " formula binary-state threshold.As shown in figure 3, " pouring water " formula binary-state threshold is certainly Dynamic searching method comprises the following steps:
S301:Maximum filler pixels value is set:
Search for the maximum obtained in image I in all pixels point pixel value and be designated as G, maximum filler pixels value K=λ are set G, λ are the constant more than 1, and λ=1.2 are set in the present embodiment.The effect of maximum filler pixels value is the process in filling scanning It is middle to ensure to finish entire image filling.
S302:Initialization filling sweep parameter:
Order filling number t=1, initialization packed height value h1。h1Starting pixel value is filled for setting, can be according to reality Border is needed to set, and h is set in the present embodiment1=1.
S303:Blank map picture:
According to height value htImage I is filled, matrix Φ after being filled, that is, completes following formula operation:
Φ=ht·H-Ω
Wherein, Ω is image I pixel matrix, and H is and Ω size identical unit matrixs.After resulting filling In matrix Φ, the Pixel Information for being filled part is contained.
S304:Statistics is filled pixel quantity:
Each pixel in matrix Φ is scanned, obtains the pixel quantity that element value in matrix Φ is more than or equal to 0, Pixel quantity is saved as into filling area S (t).When pixel in matrix Φ element value be more than or equal to 0, illustrate to fill out at this In filling, the pixel is successfully filled, and element value is less than 0 pixel, then illustrates that current packed height is also failed to original Pixel value covers.This is equivalent to, using fault location as depression, then pour water, filling area S (t) is equivalent to by the face of water submerged Product.
S305:Judge whether ht< K, if it is, into step S306, otherwise into step S307.
S306:Make t=t+1, ht=ht-1+ Δ h, Δ h expression packed height step-length, is arranged as required to, return to step S303。
S307:Curve matching:
Understand that optimal binary-state threshold is made corresponding to filling area growth rate maximum according to principle explanation before Packed height, and obtained by the process before using be packed height and corresponding filling area discrete data point, therefore Need according to each packed height htCarried out curve fitting with corresponding filling area S (t), obtain filling area relative to filling The change curve X of height.The method of curve matching has a lot, and specific method can select according to being actually needed.In order that It is accurately calculated, reduces agitation error, the present embodiment uses the approximating method based on cubic spline interpolation.
Fig. 4 is change curve exemplary plot of the obtained filling area of fitting relative to packed height.As shown in figure 4, horizontal seat Packed height is designated as, ordinate is filling area.Filling scanning can be divided into by 5 stages by Fig. 4, be to scheming after filtering first Dim spot as in is poured, followed by background is poured, and after transitional region, that is, is carried out to real defect position Pouring, occur the most fast region of area growth rate at this moment, be then leveled off delaying, most image is filled at last.Initially filled out setting Fill height value h1When, the first two region can be skipped, since transitional region, can so reduce amount of calculation.
S308:Search for binary-state threshold:
Search obtains the packed height in curve X corresponding to filling area growth rate maximumMake binary-state threshold Expression rounds up, and it is the packed height searched because of the curve X obtained according to fitting to roundMay It is not integer value.
Because in the filling process, magneto-optic picture background color is also required to be filled in itself, and due to photon and sensor The measurement error of itself, background colour can be caused also to have the different gray value of height.So in initial filling procedure, when filling out Fill before the bottommost that height reaches flaw height value, the changing tendency of a serpentine shape also occurs in curve X, several in background Filling is finished between the minimum pixel value in defect part, it may appear that a relatively flat region, the region are referred to as " transition region ".After the region, local this of maximum slope can be assumed that as at optimal threshold values in curve X change.It is based on Analyze above, the present embodiment proposes following searching method:
First derivative curve X is tried to achieve to change curve X1With Second derivative curves X2.With step-length σ to Second derivative curves X2 Scan for, if the second dervative X of ith search2(i) > 0, X2(i-1) < 0, then think that now i corresponds to first derivative Curve X1In minimum value, continue search for, if the second dervative X of jth time search2(j) < 0, X2(j-1) > 0, then think Now i corresponds to first derivative curve X1In maximum, then packed height corresponding during jth time search is that filling area increases Packed height corresponding to long rate maximum
S204:Image binaryzation:
Search for obtain binary-state threshold T to image I progress binaryzations according to step S203, obtain magneto-optic binary image.
S205:Spot contour detecting:
Contour detecting is carried out to magneto-optic binary image, obtains the contour images of each spot.
Fig. 5 is spot profile testing method flow chart in the present embodiment.As shown in figure 5, spot contour detecting is including following Step:
S501:Magneto-optic binary image medium filtering:
Because independent pixel point can not form the spot block of a closure, it is considered as pixel bad point, so first to magneto-optic two Value image does median filter process, to filter out independent pixel point.Filter window is unsuitable excessive, takes [3,3]~[10,10] to be Preferably, because too conference makes spot object excessively smooth, defect information precision reduces, too small and can not make that spot block can not be formed Part is cut.
S502:Edge check:
Use " canny " operator that the profile of magneto-optic binary image is calculated, obtain the edge of magneto-optic binary image Image L, edge image L size are consistent with magneto-optic binary image, remember that its size is M × N, edge pixels point in edge image Value be 1, the value of non-edge pixels point is 0.
S503:Row sequence number p=1 is made, makes spot sequence number q=1.
S504:Scan non-zero pixels point:
Pth row pixel in edge image L is scanned, in pixel point set ApThe middle seat for recording each non-zero pixels Mark.
S505:Judge whether ApFor sky, if it is, into step S506, otherwise into step S508.
S506:Judge whether p < N, if it is, into step S507, otherwise spot contour detecting terminates.
S507:Make p=p+1, return to step S504.
S508:Initialize the pixel queue O of q-th of spotqFor sky.
S509:Determine spot profile starting point:
By pixel point set ApIn first pixel as OqIn first pixel Oq(1), that is, by ApIn first non-zero Profile starting point of the pixel as q-th of spot.
S510:Make pixel sequence number f=2 in spot.
S511:Determine next contour pixel:
Remember Oq(f-1) coordinate is (m, n), in magneto-optic binaryzation edge image L successively according to direction just on, upper right is right, Bottom right, just under, lower-left, positive left and upper left is traveled through, that is, travel through pixel (m-1, n), (m-1, n+1), (m, n+1), (m+1, N+1), (m+1, n), (m+1, n-1), (m-1, n-1), once finding non-zero pixels, then judge the pixel whether in pixel team Arrange OqIn, if it is, search is next, otherwise non-zero pixels coordinate is assigned in pixel queue OqF-th of pixel Oq(f)。
S512:Judge whether Oq(f)=Oq(1), if it is not, into step S513, otherwise into step S514.
S513:Make f=f+1, return to step S511.
S514:In pixel queue OqMiddle deletion Oq(f), it is seen that now the Contour searching of q-th of spot finishes, and its is all Pixel point coordinates is all recorded in pixel queue OqIn.
S515:Update magneto-optic binary image:
After the Contour searching of q-th of spot, because the profile between spot can not have intersection, it is therefore desirable in magneto-optic In binaryzation edge image L, by pixel queue OqThe pixel value of middle all pixels coordinate is set to 0.
S516:Make q=q+1, return to step S504.
S206:Calculate each speck area:
The area of each spot in calculation procedure S205.Fig. 6 is speck area calculation flow chart in the present embodiment.Such as Fig. 6 It is shown, speck area calculate the step of include:
S601:Draw spot profile diagram:
The each spot profile obtained according to step S205, drafting obtain spot profile diagram.Its detailed process is:Initialization With the magneto optic images size identical all black picture, pixel value corresponding to pixel in profile queue is then set to 1, you can obtain Spot profile diagram.
S602:Make spot sequence number q=1.
S603:Search for spot boundary coordinate:
According to the pixel queue O of q-th of spotq, search for and obtain the maximum x of abscissa in each pixelmax, minimum value xmin, and the maximum y of ordinatemax, minimum value ymin
S604:Make row sequence number p '=xmin, q-th of speck area Rq=0.
S605:Scanning pth ' row include pixel:
Search obtains belonging to pixel queue O in pth ' rowqIn pixel, be ranked up from big to small by ordinate.Note is searched The pixel quantity that rope obtains is H, pixel quantity V of the spot included in the rowp' calculated according to below equation:
Wherein,Expression rounds downwards.Because spot is a closed contour, therefore the intersection point of scan line and profile is Have into having what is, therefore the wire-frame image vegetarian refreshments typically searched is even number, but be in particular cases strange there is also some It is several, because odd number wire-frame image vegetarian refreshments there are a variety of situations, used for simplicity, in the present embodiment and cast out last wire-frame image The mode (rounding H/2 downwards) of vegetarian refreshments estimates pixel quantity that the row are included.Due to there is odd number contour pixel The possibility very little of point, therefore this estimation mode can't bring substantial influence to final area result.
S606:Area accumulation:
Make the area R of q-th of spotq=Rq+Vp′
S607:Judge whether p ' < xmax, if it is, into step S608, otherwise into step S609.
S608:Make p '=p '+1, return to step S605.
S609:Judge whether that q < Q, Q represent the amount of speckle that step S205 is obtained, if it is, into step S610, it is no Then the spotted areal calculation of institute terminates.
S610:Make q=q+1, return to step S603.
S207:Defects detection:
By step S206, the area of each spot can be obtained, is arranged from small to large according to area.Due to existing Background profile, its area is maximum, therefore last spot is background block, and penultimate starts to lack to be doubtful in the magneto optic images Fall into spot.Because defect area can be more than in general magnetic domain spot block or pixel perturbations spot, so if to adjacent after sequence It is poor that the area of two spots is made, and in the presence of defective, has the part that an area increases suddenly, i.e. detectable accordingly to be lacked Fall into.Its specific method is:
By the area R of each spotqBy being arranged from small to large, area value is normalized in section [1, Q], Q-th of area value after note normalization is γq.The poor Δ γ of two neighboring area value is calculated successivelyq′q′+1q′, q '= 1,2 ..., Q-1, once Δ γq′> τ, τ represent default threshold value, then the γq′+1To γQ-1Corresponding spot is defect, γQ For background, by γq′And its all areas block before is accordingly to be regarded as disturbing, and adopts spot corresponding to interference in magneto-optic gray level image Backfilled with global gray-scale map, the magneto-optic gray-scale map after backfill is defects detection result figure.In general, in order to preferably Defect and interference are distinguished, threshold tau >=1 is set, 1 is set in the present embodiment.
It can be seen that due to γQCorresponding spot is background, and when test specimen does not have defect, institute's spottiness is the interference such as magnetic domain, It is evident that Δ γQ-1QQ-1It is bigger, therefore background can be excluded, to γ1To γQ-1Corresponding spot Backfilled;When test specimen is defective, it is assumed that the area value corresponding to defect isSo exist Judge to disturb, so as to by γ1ExtremelyCorresponding interference spot is backfilled, and retains defect and background.
In order to which the technique effect of the present invention is better described, experimental verification has been carried out using a specific test specimen.Fig. 7 is Test specimen picture used in the present embodiment.As shown in fig. 7, test specimen uses silicon steel sheet, the wherein wide 1mm of defect in the present embodiment, it is deep 0.2mm.Fig. 8 is the magneto-optic gray-scale map of test specimen shown in Fig. 7.As shown in figure 8, defect can be reflected in magneto-optic gray-scale map, but it is all Also many black splotches are enclosed, are the recall rates that defect is disturbed caused by the influence of magnetic domain etc..Magneto-optic gray-scale map is carried out equal Value filtering.Fig. 9 is the image after magneto-optic gray-scale map mean filter.Then binary-state threshold is searched for automatically.Figure 10 is filling area Curve and single order, Second derivative curves.As shown in Figure 10, in the first derivative of filling area, first after minimum value Maximum is optimal threshold values position, and the place that filling area growth rate is maximum, is just a peak value of second dervative, from And search binary-state threshold.Then binaryzation can be carried out to magneto-optic gray-scale map.Figure 11 is magneto-optic binary image.To magneto-optic Binary image carries out contour detecting and obtains spot, then calculates the area of each spot, filters out interference by area, realizes and lack Fall into detection.Figure 12 is defects detection result figure., will be dry in magneto-optic binary image in order to preferably show defects detection result The pixel pixel value that spot corresponding to disturbing is included is arranged to 0.Figure 13 is the magneto-optic binary picture of defects detection result.Such as figure Shown in 12 and 13, defect information is extracted well, and the influence of magnetic domain spot has been reduced to minimum level.Figure 14 is former Magneto-optic gray-scale map comparison diagram after beginning magneto-optic gray-scale map and filling.As shown in figure 14, magnetic domain can be excluded substantially using the present invention Interference, obtains accurate defects detection result.
In addition, in order to illustrate beneficial effects of the present invention, defects detection is carried out using six kinds of conventional filtering reinforcement methods Contrast on effect.Figure 15 is the magneto-optic gray-scale map result of six kinds of conventional filtering reinforcement methods.Comparison diagram 14 and Figure 15 can be seen Go out, although six kinds of conventional filtering reinforcement methods can reduce the interference of magnetic domain to a certain extent, its effect well below The present invention.It can be seen that relative to prior art, the present invention can more accurately extract defect image.
Although the illustrative embodiment of the present invention is described above, in order to the technology of the art Personnel understand the present invention, it should be apparent that the invention is not restricted to the scope of embodiment, to the common skill of the art For art personnel, if various change in the spirit and scope of the present invention that appended claim limits and determines, these Change is it will be apparent that all utilize the innovation and creation of present inventive concept in the row of protection.

Claims (6)

1. a kind of magneto-optic image defects detection method searched for automatically based on binary-state threshold, it is characterised in that including following step Suddenly:
S1:The magneto optic images of test specimen are obtained using magneto-optic imaging device, gray processing is carried out and handles to obtain magneto-optic gray-scale map;
S2:Mean filter is carried out to magneto-optic gray-scale map, obtains filtered image I;
S3:Binary-state threshold is searched for, it is comprised the following steps that:
S3.1:Search for the maximum obtained in image I in all pixels point pixel value and be designated as G, maximum filler pixels value K=is set λ G, λ are the constant more than 1;
S3.2:Order filling number t=1, initialization packed height value h1
S3.3:According to height value htImage I is filled, matrix Φ after being filled, its formula is as follows:
Φ=ht·H-Ω
Wherein, Ω is image I pixel matrix, and H is and Ω size identical unit matrixs;
S3.4:Each pixel in matrix Φ is scanned, obtains the pixel number that element value in matrix Φ is more than or equal to 0 Amount, filling area S (t) is saved as by pixel quantity;
S3.5:If ht< K, into step S3.6, otherwise into step S3.7;
S3.6:Make t=t+1, ht=ht-1+ Δ h, Δ h represent packed height step-length, return to step S3.3;
S3.7:According to each packed height htCarried out curve fitting with corresponding filling area S (t), obtain filling area relative to The change curve X of packed height;
S3.8:Search obtains the packed height in curve X corresponding to filling area growth rate maximumMake binary-state threshold Expression rounds up;
S4:Binaryzation is carried out to image I according to the step S3 binary-state threshold T for searching for obtain, obtains magneto-optic binary image;
S5:Contour detecting is carried out to magneto-optic binary image, obtains the profile of each spot;
S6:The area R for each spot that calculation procedure S5 is obtainedq, q=1,2 ..., Q, Q expression amount of speckle;
S7:By the area R of each spotqBy being arranged from small to large, area value is normalized in section [1, Q], remembered Q-th of area value after normalization is γq;The poor Δ γ of two neighboring area value is calculated successivelyq′q′+1q′, q '=1, 2 ..., Q-1, once Δ γq′> τ, τ represents default threshold value, by γq′And its all areas block before is accordingly to be regarded as disturbing, Spot corresponding to interference is backfilled using global gray-scale map in magneto-optic gray level image, the magneto-optic gray-scale map after backfill is to lack Fall into testing result figure.
2. defect inspection method according to claim 1, it is characterised in that filtered in the step S2 during mean filter The length of side of ripple window is more than or equal to 5 pixels.
3. defect inspection method according to claim 1, it is characterised in that in the step S3.7, curve matching uses Approximating method based on cubic spline interpolation.
4. defect inspection method according to claim 1, it is characterised in that in the step S5, contour detecting it is specific Method is:
S5.1:Magneto-optic binary image does median filter process;
S5.2:Use " canny " operator that the profile of magneto-optic binary image is calculated, obtain the edge of magneto-optic binary image Image L, remember that its size is M × N, the value of edge pixels point is 1 in edge image, and the value of non-edge pixels point is 0;
S5.3:Row sequence number p=1 is made, makes spot sequence number q=1;
S5.4:Pth row pixel in edge image L is scanned, in pixel point set ApThe middle seat for recording each non-zero pixels Mark;
S5.5:If ApFor sky, into step S5.6, otherwise into step S5.7;
S5.6:If p < N, making p=p+1, return to step S5.4, otherwise spot contour detecting terminates;
S5.7:Initialize the pixel queue O of q-th of spotqFor sky;
S5.8:By pixel point set ApIn first pixel as OqIn first pixel Oq(1);Make pixel sequence number f=2 in spot;
S5.9:Remember Oq(f-1) coordinate is (m, n), traversal pixel (m-1, n), (m-1, n+1), (m, n+1), (m+1, n+1), (m + 1, n), (m+1, n-1), (m-1, n-1), once find non-zero pixels, then judge the pixel whether in pixel queue OqIn, If it is, search is next, otherwise non-zero pixels coordinate is assigned in pixel queue OqF-th of pixel Oq(f);
S5.10:Judge whether Oq(f)=Oq(1), if it is not, making f=f+1, return to step S5.9, otherwise in pixel queue Oq Middle deletion Oq(f), in edge image L, by pixel queue OqThe pixel value of middle all pixels coordinate is set to 0, makes q=q+1, returns Return step S5.4.
5. defect inspection method according to claim 4, it is characterised in that filtered in the step S5.1, during medium filtering Ripple window side size range is [3,10].
6. defect inspection method according to claim 1, it is characterised in that in the step S6, what speck area calculated Method is:
S6.1:According to each spot profile, drafting obtains spot profile diagram;
S6.2:Make spot sequence number q=1;
S6.3:According to the pixel queue O of q-th of spotq, search for and obtain the maximum x of abscissa in each pixelmax, minimum value xmin
S6.4:Make row sequence number p '=xmin, q-th of speck area Rq=0;
S6.5:Search obtains belonging to pixel queue O in pth ' rowqIn pixel, be ranked up from big to small by ordinate;Note is searched The pixel quantity that rope obtains is H, pixel quantity V of the spot included in the rowp′Calculated according to below equation:
Wherein,Expression rounds downwards;
S6.6:Make the area R of q-th of spotq=Rq+Vp′
S6.7:If p ' < xmax, p '=p '+1, return to step S6.5 are made, otherwise into step S6.8;
S6.8:If q < Q, Q expression amount of speckle, makes q=q+1, return to step S6.3, otherwise the spotted areal calculation of institute Terminate.
CN201510888490.8A 2015-12-07 2015-12-07 The magneto-optic image defects detection method searched for automatically based on binary-state threshold Expired - Fee Related CN105427324B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510888490.8A CN105427324B (en) 2015-12-07 2015-12-07 The magneto-optic image defects detection method searched for automatically based on binary-state threshold

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510888490.8A CN105427324B (en) 2015-12-07 2015-12-07 The magneto-optic image defects detection method searched for automatically based on binary-state threshold

Publications (2)

Publication Number Publication Date
CN105427324A CN105427324A (en) 2016-03-23
CN105427324B true CN105427324B (en) 2018-03-09

Family

ID=55505504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510888490.8A Expired - Fee Related CN105427324B (en) 2015-12-07 2015-12-07 The magneto-optic image defects detection method searched for automatically based on binary-state threshold

Country Status (1)

Country Link
CN (1) CN105427324B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111315A (en) * 2019-04-26 2019-08-09 五邑大学 A kind of periphery detection method, device and storage medium based on CIS

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600604B (en) * 2016-11-14 2019-06-14 电子科技大学 A kind of threshold values optimization method of magneto-optic image defects detection method
CN107180428B (en) * 2017-06-09 2019-08-20 电子科技大学 A kind of the magneto optic images Enhancement Method based on optical flow algorithm
CN107688812B (en) * 2017-08-25 2020-04-21 重庆慧都科技有限公司 Food production date ink-jet font repairing method based on machine vision
CN107993225B (en) * 2017-11-28 2020-06-23 电子科技大学 Defect identification method for magneto-optical eddy current imaging detection
CN110857920A (en) * 2018-08-24 2020-03-03 东华大学 Method for detecting poor forming defect of coiled filament
CN111354009B (en) * 2020-02-27 2022-10-28 西安交通大学 Method for extracting shape of laser additive manufacturing molten pool
CN112285339B (en) * 2020-09-25 2024-02-06 安徽润谷科技有限公司 Marking method for fluorescent immunochromatography visual detection
CN114283170B (en) * 2021-12-24 2024-05-03 北京元客视界科技有限公司 Light spot extraction method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256157A (en) * 2008-03-26 2008-09-03 广州中国科学院工业技术研究院 Method and apparatus for testing surface defect
CN102509300A (en) * 2011-11-18 2012-06-20 深圳市宝捷信科技有限公司 Defect detection method and system
CN103698393A (en) * 2013-12-03 2014-04-02 广东工业大学 Magneto-optical imaging nondestructive detection method of weld defects
CN104616275A (en) * 2013-11-04 2015-05-13 北京兆维电子(集团)有限责任公司 Defect detecting method and defect detecting device
EP2913795A1 (en) * 2012-10-25 2015-09-02 Mitsubishi Electric Corporation Image processing device and image processing method
CN104950039A (en) * 2015-06-23 2015-09-30 西安交通大学 Ferromagnetic pipeline quantitative lossless evaluating method based on nonlinear magnetic saturation pulsed eddy current

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101256157A (en) * 2008-03-26 2008-09-03 广州中国科学院工业技术研究院 Method and apparatus for testing surface defect
CN102509300A (en) * 2011-11-18 2012-06-20 深圳市宝捷信科技有限公司 Defect detection method and system
EP2913795A1 (en) * 2012-10-25 2015-09-02 Mitsubishi Electric Corporation Image processing device and image processing method
CN104616275A (en) * 2013-11-04 2015-05-13 北京兆维电子(集团)有限责任公司 Defect detecting method and defect detecting device
CN103698393A (en) * 2013-12-03 2014-04-02 广东工业大学 Magneto-optical imaging nondestructive detection method of weld defects
CN104950039A (en) * 2015-06-23 2015-09-30 西安交通大学 Ferromagnetic pipeline quantitative lossless evaluating method based on nonlinear magnetic saturation pulsed eddy current

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
探测亚表面缺陷的磁-光显微成像检测技术研究;程玉华;《中国博士学位论文全文数据库 工程科技I辑》;20080415;全文 *
电涡流脉冲热成像无损检测技术研究;白利兵;《中国博士学位论文全文数据库 工程科技I辑》;20140615;全文 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110111315A (en) * 2019-04-26 2019-08-09 五邑大学 A kind of periphery detection method, device and storage medium based on CIS
CN110111315B (en) * 2019-04-26 2021-01-26 五邑大学 Cylinder surface detection method and device based on CIS and storage medium

Also Published As

Publication number Publication date
CN105427324A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
CN105427324B (en) The magneto-optic image defects detection method searched for automatically based on binary-state threshold
CN108629775B (en) Thermal state high-speed wire rod surface image processing method
Li et al. Long-distance precision inspection method for bridge cracks with image processing
CN104574393B (en) A kind of three-dimensional pavement crack pattern picture generates system and method
CN109886939B (en) Bridge crack detection method based on tensor voting
JP4675949B2 (en) Method and apparatus for measuring crack width of structures and products using image processing technique
CN108230344B (en) Automatic identification method for tunnel water leakage diseases
CN106530271B (en) A kind of infrared image conspicuousness detection method
CN105547602B (en) A kind of telemeasurement method of subway tunnel section of jurisdiction percolating water
JP7319432B2 (en) LEARNING DATA COLLECTION DEVICE, LEARNING DATA COLLECTION METHOD, AND PROGRAM
CN106643549B (en) A kind of ceramic tile dimension detection method based on machine vision
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN110009618B (en) Shaft part surface quality detection method and device
CN109460753A (en) A method of detection over-water floats
CN111160301B (en) Tunnel disease target intelligent identification and extraction method based on machine vision
CN102297660A (en) Measuring method of shield tunnel lining segment seam open width and apparatus thereof
CN108416771A (en) A kind of metal material corrosion area detection method based on monocular camera
CN104700395A (en) Method and system for detecting appearance crack of structure
CN112734761B (en) Industrial product image boundary contour extraction method
CN103839271B (en) A kind of image texture synthetic method based on optimal coupling
CN107798293A (en) A kind of crack on road detection means
CN114972397A (en) Infrared image defect contour detection method for wind power blade composite material
CN109813725A (en) A kind of large scale glue defect inspection method
WO2021000948A1 (en) Counterweight weight detection method and system, and acquisition method and system, and crane
CN109544513A (en) A kind of steel pipe end surface defect extraction knowledge method for distinguishing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Zhang Jie

Inventor after: Cheng Yuhua

Inventor after: Yin Chun

Inventor after: Tian Lulu

Inventor after: Bai Libing

Inventor after: Huang Xuegang

Inventor after: Chen Kai

Inventor after: Wang Chao

Inventor before: Cheng Yuhua

Inventor before: Yin Chun

Inventor before: Tian Lulu

Inventor before: Bai Libing

Inventor before: Huang Xuegang

Inventor before: Chen Kai

Inventor before: Zhang Jie

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180309

Termination date: 20201207