CN110361400A - A kind of bubble detecting method and electronic equipment of cast iron part - Google Patents

A kind of bubble detecting method and electronic equipment of cast iron part Download PDF

Info

Publication number
CN110361400A
CN110361400A CN201910587426.4A CN201910587426A CN110361400A CN 110361400 A CN110361400 A CN 110361400A CN 201910587426 A CN201910587426 A CN 201910587426A CN 110361400 A CN110361400 A CN 110361400A
Authority
CN
China
Prior art keywords
image
connected domain
cast iron
bubble
iron part
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
CN201910587426.4A
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.)
Innovation Qizhi (hefei) Technology Co Ltd
Original Assignee
Innovation Qizhi (hefei) Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Innovation Qizhi (hefei) Technology Co Ltd filed Critical Innovation Qizhi (hefei) Technology Co Ltd
Priority to CN201910587426.4A priority Critical patent/CN110361400A/en
Publication of CN110361400A publication Critical patent/CN110361400A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/02Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
    • G01N23/04Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and forming images of the material
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • 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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/03Investigating materials by wave or particle radiation by transmission
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/10Different kinds of radiation or particles
    • G01N2223/101Different kinds of radiation or particles electromagnetic radiation
    • G01N2223/1016X-ray
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N2223/00Investigating materials by wave or particle radiation
    • G01N2223/40Imaging
    • G01N2223/401Imaging image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10116X-ray image
    • 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/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Biochemistry (AREA)
  • Analytical Chemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Chemical & Material Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Analysing Materials By The Use Of Radiation (AREA)

Abstract

The present invention relates to the defect detecting technique field of component, in particular to the bubble detecting method and electronic equipment of a kind of cast iron part.Bubble detection is carried out for the radioscopic image to cast iron part, includes the following steps: S1, input radioscopic image, the radioscopic image is pre-processed to obtain pretreatment image;S2, connected domain detection is carried out to the pretreatment image to obtain the edge connected domain and prospect connected domain of the pretreatment image;S3, the edge connected domain acquisition and prospect connected domain ask union and/or intersection with the bubble area in the determination radioscopic image.By seeking edge connected domain and prospect connected domain to the radioscopic image about cast iron part, the bubble of the cast iron part is determined by union and/or intersection, can improve the detection accuracy to cast iron part quality well.

Description

A kind of bubble detecting method and electronic equipment of cast iron part
[technical field]
The present invention relates to the defect detecting technique field of component, in particular to a kind of bubble detecting method of cast iron part And electronic equipment.
[background technique]
Common method one of of the X-ray detection technology as industrial nondestructive testing, in the quality testing evaluation of component It occupies an important position.Strength retrogression of the X-ray when penetrating checking matter each section is different, so as to for detecting measured object The defect of body.Bubble is often easy to appear during cast iron part is molding, bubble is the cavity generated by gas effect, General rounded or oval light tone image, image edge is more smooth, no corner angle, there is apparent circumference, and bubble will affect member The conductive capability of device.The general contrast of x-ray image is low, gray scale is low, noise is big and the random of bubble arbitrary shape divides Cloth increases bubble extracting difficulty.
The most background of image of existing flaw detection research processing is single, but cast iron usually has various structures, is overlapped mutually, Light and shade structural context is formed, has great interference to bubble detection, leads to bubble detection inaccuracy, therefore to cast iron part quality Assessment accuracy it is low.
[summary of the invention]
For the defect for overcoming the bubble detecting method verification and measurement ratio of current cast iron part low, the present invention provides a kind of cast iron part Bubble detecting method and electronic equipment.
In order to solve the above-mentioned technical problem a kind of bubble detecting method of cast iron part is provided, for the X to cast iron part Ray image carries out bubble detection, includes the following steps: S1, input radioscopic image, pre-processes to the radioscopic image To obtain pretreatment image;S2, connected domain detection is carried out to the pretreatment image to obtain the edge of the pretreatment image Connected domain and prospect connected domain;S3, the edge connected domain acquisition and prospect connected domain ask union and/or intersection described in determination Bubble area in radioscopic image.
Preferably, the bubble detecting method of cast iron part further comprises the steps of: in the step S3, the edge connected domain With the bubble area that the union that prospect connected domain acquires is in the radioscopic image.
Preferably, if there are holes in the intersection obtained in the step S3, described hole is filled.
Preferably, connected domain detection is carried out to obtain the X ray picture to the pretreatment image in the step S2 Further include following steps before the edge connected domain of picture: S21, the pretreatment image degree of comparing being stretched;S22, to institute State the pretreatment image progress edge detection after contrast stretching;S23, to the pretreatment image after the edge detection into Row binary conversion treatment is to obtain binary image;S24, edge connection is carried out to the binary image.
Preferably, the edge connected domain obtained in the step S2 and the prospect connected domain are sought common ground and/or union It before further include that the screening of connected domain shape is carried out to the edge connected domain obtained in the step S2.
Preferably, connected domain detection is carried out to obtain the X ray picture to the pretreatment image in the step S2 Further include following steps before the prospect connected domain of picture: operation S21 ', being carried out out to the pretreatment image;S22 ', to described Pretreatment image and the pretreatment image opened after operating make the difference to obtain with bladdery foreground picture;S23 ', to described The foreground picture obtained in step S22 ' carries out binary conversion treatment.
Preferably, by the edge connected domain and the prospect connected domain that obtain in the step S24 ' seek common ground with union it Before further include that the screening of prospect connected domain shape is carried out to the prospect connected domain obtained in the step S24 '.
Preferably, connected domain detection is carried out to obtain the X ray picture to the pretreatment image in the step S2 Further include following steps before the prospect connected domain of picture: step S23 " carries out the prospect of binary conversion treatment to the step S23 ' Figure executes closed operation, and the step S23 " is after the step S23 '.
Preferably, it further includes to described before step S1 that pretreatment described in the step S1, which is gaussian filtering process, Cast iron part carries out X-ray shooting to obtain radioscopic image.
The present invention in order to solve the above-mentioned technical problem also provide a kind of electronic equipment, the electronic equipment include: one or Multiple processors;Storage device, for storing one or more programs, when one or more of programs are by one or more A processor executes, so that one or more of processors realize method as described above.
It compared with the existing technology, can be effective due to passing through edge detection during the bubble of detection of complex cast iron part Processing light and shade transitional region bubble, but be unable to complete the filling of bubble area, however, contrast metric can handle it is single The bubble of homogeneous background, but the bubble of light and shade transitional region cannot be handled, therefore by the X ray picture about cast iron part As seeking and the corresponding edge connected domain of edge feature and prospect connected domain corresponding with contrast metric, by union and/or Intersection determines the bubble of the cast iron part, and the cast iron part x-ray detection image with labyrinth can be effectively treated well Bubble test problems.
Using the intersection of edge connected domain and prospect connected domain as the bubble area of cast iron part, further increase to bubble The accuracy that region determines.
It can be well by the bubble image further expansion of low contrast by being stretched to pretreatment image degree of comparing Its contrast.
Edge connection, the energy feelings weaker there are intensity due to partial region with good raising are carried out to the image after binaryzation Condition lower edge the case where there are areas of disconnection.
Electronic equipment provided by the invention has beneficial effect identical with the bubble detecting method of the cast iron part.
[Detailed description of the invention]
Fig. 1 is the flow diagram of the bubble detecting method of the cast iron part provided in first embodiment of the invention;
Fig. 2 is right in executing step S2 in the bubble detecting method of the cast iron part provided in first embodiment of the invention Pretreatment image carries out the step flow diagram before edge connected domain of the connected domain detection to obtain pretreatment image;
Fig. 3 is the details stream of step S22 in the bubble detecting method of the cast iron part provided in first embodiment of the invention Journey schematic diagram;
Fig. 4 is right in executing step S2 in the bubble detecting method of the cast iron part provided in first embodiment of the invention Pretreatment image carries out the step flow diagram before prospect connected domain of the connected domain detection to obtain pretreatment image;
Fig. 5 is right in executing step S2 in the bubble detecting method of the cast iron part provided in first embodiment of the invention The step in variant embodiment before prospect connected domain of the pretreatment image progress connected domain detection to obtain pretreatment image Flow diagram;
Fig. 6 is that the module diagram of electronic equipment is provided in second embodiment of the invention;
Fig. 7 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present invention.
[specific embodiment]
In order to make the purpose of the present invention, technical solution and advantage are more clearly understood, below in conjunction with attached drawing and embodiment, The present invention will be described in further detail.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, It is not intended to limit the present invention.
Referring to Fig. 1, first embodiment of the invention provides a kind of bubble detecting method of cast iron part, for iron-founder The defect of part is detected, and bubble present in cast iron part is predominantly detected.Image is carried out to cast iron part first with X-ray To obtain radioscopic image, the bubble detecting method of the cast iron part includes the following steps: for shooting
S1, input radioscopic image, pre-process to obtain pretreatment image the radioscopic image;
In this step, mainly the X ray image is pre-processed using Gaussian filter algorithm.Due in X-ray A large amount of random noises can be generated in imaging process, therefore to eliminate noise by being filtered.General filtering method is free Between domain filtering and frequency domain filtering.Filter in spatial domain method is simple, and processing speed is fast, is suitble to the real-time demand of industry.X ray picture In be mostly random noise, therefore select Gaussian filter.Smoothing filter is to determine pixel in neighborhood with filtering exposure mask Average gray value goes the value of the substitution each pixel of radioscopic image.The discretization weighted filtering process of gaussian filtering may be expressed as:
In formula: ∑ is expressed as summing function;A is filter module width;B is filter module height;S is in filter module The abscissa of image pixel;L is the ordinate of image pixel in filter module;H is the pixel grey scale at coordinate (s, t).To big It is small that the operation of above-mentioned formula only is executed to x=0,1,2 ..., M-1 and y=0,1,2 ... N-1 for M*N image filtering, it can be complete At the gaussian filtering of image.
Referring to Fig. 1, the bubble detecting method of cast iron part provided by the invention further include:
Step S2, connected domain detection is carried out to obtain the edge connected domain of the pretreatment image to the pretreatment image With prospect connected domain;And
Step S3, ask union and/or intersection with the determination X ray picture edge connected domain of acquisition and prospect connected domain Bubble area as in.
Referring to Fig. 2, carrying out connected domain detection to the pretreatment image in this step to obtain the pretreatment figure Further include following steps before the edge connected domain of picture:
S21, the pretreatment image degree of comparing is stretched;
S22, edge detection is carried out to the pretreatment image after the contrast stretching;
S23, binary conversion treatment is carried out to the pretreatment image after the edge detection to obtain binary image;
S24, edge connection is carried out to the binary image.
In the step s 21, the purpose stretched to the pretreatment image degree of comparing is to enhance bubble and background Contrast.Mainly since radioscopic image contrast itself is with regard to relatively low, furthermore in step sl by gaussian filtering to X Ray image carried out it is pretreated during will lead to bubble edge blurry, it is therefore desirable to sharpen bubble edge, enhance gas The contrast of bubble and background.The method of contrast stretching is generally divided into linear transformation and nonlinear transformation.Linear transformation method has Piecewise linear transform, non-linear transformation method have exponential transform, logarithmic transformation, histogram equalization etc..Wherein, with logarithmic transformation For, it is inclined that the background of low ash degree can be compressed to the relatively high bubble gray scale of more low ash degree, gray value by specific logarithmic transformation Height more easily discriminates bubble with background to stretch overall contrast.Logarithmic transformation function may be expressed as:
G (x)=clog [1+double (f (x))]
In formula: c is a constant;F (x) is the radioscopic image of input;G (x) is output image.
In above-mentioned steps S22, edge detection is carried out to the pretreatment image after the contrast stretching.
In this step, the edge detection of image is the set of some specific pixels in image.The gray scale of image is at these Point has significant change, i.e., obtains biggish value in the gradient of these local images.Image Edge-Detection is often through edge Detective operators such as Sobel operator, Canny operator, laplace operator etc. are realized.Referring to Fig. 3, below using Canny operator as Example is illustrated, and is specifically comprised the following steps:
Step S221, the pretreatment image gray processing after the contrast stretching is handled;
In this step, for coloured picture in an rgb format, the formula of usual gray processing use are as follows: Gray=0.299R+ 0.587G+0.114B。
Step S222, gaussian filtering process is carried out to the gray level image obtained in the step S221;
In this step, reality can be weighted twice respectively with two one-dimensional Gaussian kernels to gray level image gaussian filtering It is existing, that is, first one-dimensional X-direction convolution, obtained result is another later to tie up Y-direction convolution.One can certainly directly be passed through Convolution of two-dimensional Gaussian kernel is realized.
Step S223, gradient value and the direction of the gray level image in the step S222 after gaussian filtering process are calculated;
In this step, usually using edge difference operator, as Rober, Prewitt, Sobel calculating are horizontal and vertical The difference Gx and Gy in direction thus can calculate separately gradient value G and direction θ by following formula.
θ=a tan2 (Gy, Gx).
Step S224, the gray level image after gaussian filtering process in the step S222 is carried out along gradient direction non- Maximum inhibits operation;
In this step, it can mainly be obtained by setting corresponding amplitude and by linear interpolation arithmetic.
Step S225, the selection of dual threshold is carried out to the image after step S224 processing;
In this step, need to set a high threshold and a Low threshold to distinguish edge pixel.If edge pixel Point gradient is greater than high threshold, then is considered as strong edge point, if edge gradient value is less than high threshold, is greater than Low threshold, then marks It is denoted as weak marginal point, and the point for being less than Low threshold is then suppressed.Wherein, the high threshold and the Low threshold be user voluntarily Setting.
Step S226, lag Edge track is carried out to the step S225 image carried out after dual threshold selection;
In general, strong edge point may be considered genuine edge, weak marginal point then may be genuine edge, it is also possible to noise It is accurate as a result, weak marginal point caused by the latter should remove in order to obtain or caused by color change.It has been generally acknowledged that true Weak marginal point caused by edge is connected to strong edge point, and the weak marginal point as caused by noise then will not.So-called lag side Boundary's track algorithm checks the 8 connection neighborhood territory pixels of a weak marginal point, as long as with the presence of strong edge point, then this weak marginal point It is considered as that true edge remains, otherwise should be rejected.
After executing the step S226, the edge detection to pretreatment image is completed, further executes step S23,
Step S23, binary conversion treatment is carried out to obtain binary image to the pretreatment image after the edge detection;
In this step, a threshold value can be set based on empirical value or the characteristics of pretreatment image, with this threshold value come into Row binary conversion treatment, the pixel that all gray scales are more than or equal to threshold value are judged as belonging to the edge of bubble, and gray value is 255 (i.e. relative to be white) indicate that otherwise these pixels are excluded other than object area, gray value be 0 (i.e. relative to For black) it indicates, indicate background or object area in addition.It can be by two functions in OpenCV algorithm to pre- place It manages image and carries out binary conversion treatment, two functions are as follows:
(1) cvThreshold (dst, dst, 230,255, CV_THRE SH_BINARY_INV);
(2) cvAdaptiveThreshold (dst, dst, 255, CV_ ADAPTIVE_THRESH_MEAN_C, CV_THRESH_BINARY, 9, -10).
Referring to Fig. 2, edge connection is carried out in step s 24, to the binary image, this step mainly includes Following steps:
The wherein image 1 that following steps are related to are as follows: the binary image obtained in step S23;
Image 2 are as follows: to acquisition after the pretreatment image gray processing processing after the contrast stretching in step S221 Image;
Step S241, described image 1 is scanned, when encountering a non-zero gray-scale pixels P, tracking is to open with P point The contour line of initial point, until the terminal Q of the line;
Step S242, the 8- adjacent domain of the Q ' point corresponding with the point position Q in described image 1 of image under consideration 2.If The 8- adjacent domain of Q ' point has non-zero pixels R ' to exist, then is included into image 1, and point R ' is used as starting point, repeats first Step, until until image 1 and image 2 can not all continue;
This contour line is labeled as having accessed by step S243 after completing the connection to the contour line comprising P, into And return in step S241, next contour line in image is found, step S241-S243 is repeated, until in the image 1 Then think to complete the edge connection to binary image until again can not find new contour line.
Referring to Fig. 1, in step s 2, connected domain detection is carried out to obtain the pre- place to the pretreatment image The edge connected domain of image is managed, namely connected domain is carried out to the image after binary image edge connection and is detected to obtain The edge connected domain of the pretreatment image.
In this step, the edge connected domain, which refers to, has phase in the image after the connection of binary image edge With the image-region of the adjacent pixel composition of pixel classification information and position, same pixel point classification information can be regarded as picture Element value is identical.
Referring to Fig. 4, executing step S3: the edge connected domain obtained in the step S2 is connected to the prospect Domain seeks common ground and/or union further includes before step S25:
Step S25, the screening of connected domain shape is carried out to the edge connected domain obtained in the step S2.
In this step, since the shape of bubble is substantially round or ellipse, and its area is generally smaller, because This, the screening for carrying out shape and area to connected domain can well exclude the noise region for being not belonging to bubble, with Improve the accuracy detected to bubble.It is understood that the area due to bubble is generally all smaller, it can pass through The form of given threshold will not belong to the noise range of the larger area of bubble or the lesser noise range of area excludes.
Referring to Fig. 4, connected domain detection is carried out in above-mentioned steps S2, to the pretreatment image to obtain the pre- place Manage the edge connected domain and prospect connected domain of image.
Connected domain detection is carried out to the pretreatment image in this step to connect with the prospect for obtaining the pretreatment image Further include following steps before logical domain:
S21 ', operation is carried out out to the pretreatment image;
S22 ', the pretreatment image and the pretreatment image opened after operating are made the difference to obtain with bladdery Foreground picture;
S23 ', binary conversion treatment is carried out to the foreground picture obtained in the step S22 '.
In step S21 ', gray processing processing first is carried out to obtain gray level image, to the ash to the pretreatment image Degree image carries out out operation.Gray processing processing is carried out to obtain gray level image, mistake to the pretreatment image in this step Journey is identical with the operation in above-mentioned steps S221, and details are not described herein.In this step, it is first rotten in morphology for opening operation Expansive working after erosion has the function of dotted, the small block distortion of removal, is equivalent to and has been filtered out in gray level image after handling here All bubbles, obtained clean Background.
Opening operation in this step is realized by imopen function, and call format is as follows:
IM2=imopen (IM, SE);
IM2=imopen (IM, NH00D);
Wherein, IM is binary picture or compression binary picture, is the uint32 type array of a 2-D, In the present embodiment, corresponds to pretreatment image and carry out the gray level image obtained after gray processing processing.If it is a secondary pressure Contracting binary picture, it is desirable to provide the dimension of the row of original uncompressed image.
Wherein, SE is the structural elements ferritic or structural element volume array that function strel is returned, wherein SE= Strel (shape, parameters).
NH00D is the array of one 0 and 1 composition.
In step S22 ', the pretreatment image and the pretreatment image opened after operating are made the difference to obtain band Bladdery foreground picture;
Main in this step seek difference function by image: AbsDiff is realized.
Above-mentioned step during binary conversion treatment is carried out in step S23 ', to the foreground picture obtained in the step S22 ' Rapid S23 is identical, and details are not described herein.
Before carrying out connected domain detection to the pretreatment image in the step S2 to obtain the pretreatment image Scape connected domain, which that is to say, carries out the detection of prospect connected domain to the binaryzation foreground picture for executing the step S23 ' acquisition later, described Prospect connected domain, which refers to, has phase in carrying out the image after binary conversion treatment to the foreground picture obtained in the step S22 ' With the image-region of the adjacent pixel composition of pixel classification information and position, same pixel point classification information can be regarded as picture Element value is identical.
The edge connected domain obtained in the step S2 is sought common ground with the prospect connected domain and/or union is also wrapped before It includes and the screening of connected domain shape is carried out to the prospect connected domain obtained in the step S2.Due to being obtained in foreground picture in background subtraction, Marginal error is inevitably introduced, so to weed out, therefore selects interior hole count, three indexs of circularity and area carry out it Screening.It is understood that since bubble interior intensity is uniformly single, so the interior hole count of connected domain is 0, therefore by connected domain In interior hole count be not that 0 connected domain screens out.Similarly, since bubble is generally circular or oval, i.e., its circularity is preferable, because This, the bad connected domain of circularity is screened out.It will also be appreciated that the area of bubble is usually smaller, setting one can be passed through A threshold value, the connected domain except threshold value is screened out, and bubble area can be represented as well by obtaining remaining connected domain in this way.
Referring to Fig. 5, carrying out connected domain detection to the pretreatment image in the step S2 to obtain the pre- place Further include following steps before managing the prospect connected domain of image: step S23 " carries out binary conversion treatment to the step S23 ' Foreground picture executes closed operation, and the step S23 " is after the step S23 '.Closed operation is the expansion post-etching in morphology Operation, main purpose is to connect the weaker bubble of contrast.
Closed operation is realized by imclose function in this step.Its call format is as follows:
IM2=imclose (IM, SE);
IM2=imclose (IM, NH00D);
Wherein, IM is binary picture or compression binary picture, is the uint32 type array of a 2-D, In the present embodiment, correspond to obtain after carrying out binary conversion treatment to the foreground picture obtained in the step S22 ' in step S23 ' The image obtained.If it is width compression binary picture, it is desirable to provide the dimension of the row of original uncompressed image.
SE is the structural elements ferritic or structural element volume array that function strel is returned, wherein SE=strel (shape, parameters).
NH00D is the array of one 0 and 1 composition.
Referring to Fig. 1, the bubble detecting method of cast iron part provided by the invention further include:
Step S3, ask union and/or intersection with the determination X ray picture edge connected domain of acquisition and prospect connected domain Bubble as in.
In this step, the union of edge connected domain and prospect connected domain can be sought before this, and the union acquired represents Where bubble area in the cast iron part to be processed.It can be using the region of the union as where bubble area.
It is, of course, also possible to be the intersection for directly seeking edge connected domain and prospect connected domain, using intersection area as bubble Where region.
Preferably, in order to improve to bubble detection accuracy, in the present invention, edge connected domain was sought before this and was connected to prospect The union in domain, then and concentrate seek intersection as where final bubble area.First seek union again and concentrate seek The purpose of intersection is: using intersection as the region for tentatively representing bubble, then again and concentrate and seek region there are intersection Where finally representing bubble, the accuracy of detection can be improved well.Before exporting result, if existing in intersection area Hole, it is also necessary to hole present in the intersection area is filled, then export result again.Wherein, in the present invention, Described hole refers to the aperture for being less than bubble volume present in the bubble area.
In some specific embodiments, the filling to hole be by and concentrate the pixel value in non-perforated to assign To described hole, so that the bubble area uniform gray level that intersection determines is single.
In step, the algorithm and existing polygon of edge connected domain and the intersection of prospect connected domain and/or union are sought It seeks common ground identical with the algorithm of union, does not do excessive explanation herein.
Referring to Fig. 6, the second embodiment of the present invention provides a kind of electronic equipment 100, the electronic equipment 100 includes: One or more processors 101 and storage fill 102 and set, and storage device 102 is for storing one or more programs, when one Or multiple programs are executed by one or more of processors 101, so that one or more of processors 101 realize such as first The bubble detecting method for the cast iron part that embodiment provides.
Below with reference to Fig. 7, it illustrates the terminal device/server computers for being suitable for being used to realize the embodiment of the present application The structural schematic diagram of system 800.Terminal device/server shown in Fig. 7 is only an example, should not be to the embodiment of the present application Function and use scope bring any restrictions.
As shown in fig. 7, computer system 800 includes central processing unit (CPU) 801, it can be read-only according to being stored in Program in memory (ROM) 802 is loaded into the program in random access storage device (RAM) 803 from storage section 808 And execute various movements appropriate and processing.In RAM 803, also it is stored with system 800 and operates required various program sum numbers According to.CPU 801, ROM 802 and RAM 803 are connected with each other by bus 804.Input/output (I/O) interface 805 also connects It is connected to bus 804.
I/O interface 805 is connected to lower component: the importation 806 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 807 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 808 including hard disk etc.; And the communications portion 809 of the network interface card including LAN card, modem etc..Communications portion 809 via such as because The network of spy's net executes communication process.Driver 810 is also connected to I/O interface 805 as needed.Detachable media 811, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 810, in order to read from thereon Computer program be mounted into storage section 808 as needed.
Disclosed embodiment according to the present invention may be implemented as computer software above with reference to the process of flow chart description Program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 809, and/or from detachable media 811 are mounted.When the computer program is executed by central processing unit (CPU) 801, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer readable storage medium either the two any combination.Computer readable storage medium for example can be-but not Be limited to-electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.It calculates The more specific example of machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, portable of one or more conducting wires Formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or The above-mentioned any appropriate combination of person.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof Machine program code, described program design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " such as " language or similar programming language.Program code can Fully to execute, partly be executed on management end computer, as an independent software package on management end computer It executes, partially part executes on the remote computer or completely in remote computer or server on management end computer Upper execution.In situations involving remote computers, remote computer can pass through the network of any kind --- including local Net (LAN) or the domain wide area network (WAN) are connected to management end computer, or, it may be connected to outer computer (such as using because Spy nets service provider to connect by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
It compared with the existing technology, can be effective due to passing through edge detection during the bubble of detection of complex cast iron part Processing light and shade transitional region bubble, but be unable to complete the filling of bubble area, however, contrast metric can handle it is single The bubble of homogeneous background, but the bubble of light and shade transitional region cannot be handled, therefore by the X ray picture about cast iron part As seeking edge connected domain and prospect connected domain, the bubble of the cast iron part is determined by union and/or intersection, energy is well Improve the detection accuracy to cast iron part quality.
Using the intersection of edge connected domain and prospect connected domain as the bubble area of cast iron part, further increase to bubble The accuracy that region determines.
Electronic equipment provided by the invention has beneficial effect identical with the bubble detecting method of the cast iron part.
The foregoing is merely present pre-ferred embodiments, are not intended to limit the invention, it is all principle of the present invention it Any modification made by interior, equivalent replacement and improvement etc. should all be comprising within protection scope of the present invention.

Claims (10)

1. a kind of bubble detecting method of cast iron part, it is characterised in that: carry out bubble for the radioscopic image to cast iron part Detection, includes the following steps:
S1, input radioscopic image, pre-process to obtain pretreatment image the radioscopic image;
S2, connected domain detection is carried out to the pretreatment image to obtain the edge connected domain of the pretreatment image and prospect company Logical domain;And
S3, the edge connected domain acquisition and prospect connected domain ask union and/or intersection with the gas in the determination radioscopic image Bleb district domain.
2. the bubble detecting method of cast iron part as described in claim 1, it is characterised in that: the bubble detection side of cast iron part Method further comprises the steps of: in the step S3, and the union that the edge connected domain and the prospect connected domain acquire is that the X is penetrated Bubble area in line image.
3. the bubble detecting method of cast iron part as claimed in claim 2, it is characterised in that: if obtained in the step S3 There are holes in intersection, then fill to described hole.
4. the bubble detecting method of cast iron part as described in claim 1, it is characterised in that: to described pre- in the step S2 Processing image further includes following steps before carrying out edge connected domain of the connected domain detection to obtain the radioscopic image:
S21, the pretreatment image degree of comparing is stretched;
S22, edge detection is carried out to the pretreatment image after the contrast stretching;
S23, binary conversion treatment is carried out to the pretreatment image after the edge detection to obtain binary image;And
S24, edge connection is carried out to the binary image.
5. the bubble detecting method of cast iron part as claimed in claim 4, it is characterised in that: the side that will be obtained in the step S2 Edge connected domain seeks common ground with the prospect connected domain and/or union further includes before being connected to the edge obtained in the step S2 Domain carries out the screening of connected domain shape.
6. the bubble detecting method of cast iron part as described in claim 1, it is characterised in that: to described pre- in the step S2 Processing image further includes following steps before carrying out prospect connected domain of the connected domain detection to obtain the radioscopic image:
S21 ', operation is carried out out to the pretreatment image;
S22 ', the pretreatment image and the pretreatment image opened after operating are made the difference to obtain with bladdery prospect Figure;
S23 ', binary conversion treatment is carried out to the foreground picture obtained in the step S22 '.
7. the bubble detecting method of cast iron part as claimed in claim 6, it is characterised in that: the side that will be obtained in the step S2 Edge connected domain seeks common ground with the prospect connected domain and/or union further includes before being connected to the prospect obtained in the step S2 Domain carries out the screening of prospect connected domain shape.
8. the bubble detecting method of cast iron part as claimed in claim 7, it is characterised in that: to described pre- in the step S2 Processing image further includes following steps before carrying out prospect connected domain of the connected domain detection to obtain the radioscopic image: step S23 " executes closed operation to the step S23 ' foreground picture for carrying out binary conversion treatment, and the step S23 " is in the step After S23 '.
9. the bubble detecting method of cast iron part as described in claim 1, it is characterised in that: pre-processed described in the step S1 It further include carrying out X-ray shooting to the cast iron part to obtain radioscopic image before step S1 for gaussian filtering process.
10. a kind of electronic equipment, it is characterised in that: the electronic equipment includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now method as claimed in any one of claims 1-9 wherein.
CN201910587426.4A 2019-07-01 2019-07-01 A kind of bubble detecting method and electronic equipment of cast iron part Pending CN110361400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910587426.4A CN110361400A (en) 2019-07-01 2019-07-01 A kind of bubble detecting method and electronic equipment of cast iron part

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910587426.4A CN110361400A (en) 2019-07-01 2019-07-01 A kind of bubble detecting method and electronic equipment of cast iron part

Publications (1)

Publication Number Publication Date
CN110361400A true CN110361400A (en) 2019-10-22

Family

ID=68217784

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910587426.4A Pending CN110361400A (en) 2019-07-01 2019-07-01 A kind of bubble detecting method and electronic equipment of cast iron part

Country Status (1)

Country Link
CN (1) CN110361400A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111476807A (en) * 2020-03-30 2020-07-31 迈克医疗电子有限公司 Edge processing method and device for segmenting image and analysis instrument
TWI718962B (en) * 2020-06-11 2021-02-11 威光自動化科技股份有限公司 Bubble filter in liquid pipe
CN115984267A (en) * 2023-03-20 2023-04-18 青岛鼎信通讯科技有限公司 Injection molding bubble detection method suitable for ultrasonic water meter
CN116645364A (en) * 2023-07-18 2023-08-25 金乡县金沪合金钢有限公司 Alloy steel casting air hole defect detection method based on image data
CN116934745A (en) * 2023-09-14 2023-10-24 创新奇智(浙江)科技有限公司 Quality detection method and detection system for electronic component plugging clip

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003042975A (en) * 2001-07-31 2003-02-13 Toyota Motor Corp Jointing inspection device
EP2151681A1 (en) * 2005-12-16 2010-02-10 CXR Limited X-ray tomography inspection systems
CN101819164A (en) * 2010-05-14 2010-09-01 山东大学 Device and method for detecting impurities after filling of beverage
CN102646278A (en) * 2012-03-16 2012-08-22 华南理工大学 Component package bubble detection method based on X-ray image
CN105579834A (en) * 2013-09-30 2016-05-11 株式会社Ihi Image analysis device and program
CN106780438A (en) * 2016-11-11 2017-05-31 广东电网有限责任公司清远供电局 Defects of insulator detection method and system based on image procossing
CN107505341A (en) * 2017-09-14 2017-12-22 中国科学院苏州生物医学工程技术研究所 A kind of LED chip defect automatic checkout equipment and method based on X ray
CN107727662A (en) * 2017-09-28 2018-02-23 河北工业大学 A kind of cell piece EL black patch detection methods based on algorithm of region growing
CN108827181A (en) * 2018-03-14 2018-11-16 浙江大学山东工业技术研究院 A kind of plate surface detection method of view-based access control model
CN108876768A (en) * 2018-05-30 2018-11-23 杭州舜浩科技有限公司 Light guide plate shadow defect inspection method
CN109272525A (en) * 2018-09-17 2019-01-25 浙江理工大学 A kind of light guide plate white-spot defects detection method
CN109859160A (en) * 2018-12-10 2019-06-07 湖南航天天麓新材料检测有限责任公司 Almag internal defect in cast image-recognizing method based on machine vision

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003042975A (en) * 2001-07-31 2003-02-13 Toyota Motor Corp Jointing inspection device
EP2151681A1 (en) * 2005-12-16 2010-02-10 CXR Limited X-ray tomography inspection systems
CN101819164A (en) * 2010-05-14 2010-09-01 山东大学 Device and method for detecting impurities after filling of beverage
CN102646278A (en) * 2012-03-16 2012-08-22 华南理工大学 Component package bubble detection method based on X-ray image
CN105579834A (en) * 2013-09-30 2016-05-11 株式会社Ihi Image analysis device and program
CN106780438A (en) * 2016-11-11 2017-05-31 广东电网有限责任公司清远供电局 Defects of insulator detection method and system based on image procossing
CN107505341A (en) * 2017-09-14 2017-12-22 中国科学院苏州生物医学工程技术研究所 A kind of LED chip defect automatic checkout equipment and method based on X ray
CN107727662A (en) * 2017-09-28 2018-02-23 河北工业大学 A kind of cell piece EL black patch detection methods based on algorithm of region growing
CN108827181A (en) * 2018-03-14 2018-11-16 浙江大学山东工业技术研究院 A kind of plate surface detection method of view-based access control model
CN108876768A (en) * 2018-05-30 2018-11-23 杭州舜浩科技有限公司 Light guide plate shadow defect inspection method
CN109272525A (en) * 2018-09-17 2019-01-25 浙江理工大学 A kind of light guide plate white-spot defects detection method
CN109859160A (en) * 2018-12-10 2019-06-07 湖南航天天麓新材料检测有限责任公司 Almag internal defect in cast image-recognizing method based on machine vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
高红霞 等: "基于X光检测的元器件任意形状气泡提取方法", 《半导体检测与测试技术》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111476807A (en) * 2020-03-30 2020-07-31 迈克医疗电子有限公司 Edge processing method and device for segmenting image and analysis instrument
TWI718962B (en) * 2020-06-11 2021-02-11 威光自動化科技股份有限公司 Bubble filter in liquid pipe
CN115984267A (en) * 2023-03-20 2023-04-18 青岛鼎信通讯科技有限公司 Injection molding bubble detection method suitable for ultrasonic water meter
CN115984267B (en) * 2023-03-20 2023-07-25 青岛鼎信通讯科技有限公司 Injection molding bubble detection method suitable for ultrasonic water meter
CN116645364A (en) * 2023-07-18 2023-08-25 金乡县金沪合金钢有限公司 Alloy steel casting air hole defect detection method based on image data
CN116645364B (en) * 2023-07-18 2023-10-27 金乡县金沪合金钢有限公司 Alloy steel casting air hole defect detection method based on image data
CN116934745A (en) * 2023-09-14 2023-10-24 创新奇智(浙江)科技有限公司 Quality detection method and detection system for electronic component plugging clip
CN116934745B (en) * 2023-09-14 2023-12-19 创新奇智(浙江)科技有限公司 Quality detection method and detection system for electronic component plugging clip

Similar Documents

Publication Publication Date Title
CN110361400A (en) A kind of bubble detecting method and electronic equipment of cast iron part
CN111080661B (en) Image-based straight line detection method and device and electronic equipment
CN107507173B (en) No-reference definition evaluation method and system for full-slice image
Prabu et al. Design of cognitive image filters for suppression of noise level in medical images
Kanwal et al. Region based adaptive contrast enhancement of medical X-ray images
Zhang et al. Decision-based non-local means filter for removing impulse noise from digital images
CN115908269A (en) Visual defect detection method and device, storage medium and computer equipment
CN107103595A (en) Method, device, storage medium and the equipment of detection image change
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
CN113609984A (en) Pointer instrument reading identification method and device and electronic equipment
CN111260641A (en) Palm ultrasonic imaging system and method based on artificial intelligence
CN113592782A (en) Method and system for extracting X-ray image defects of composite carbon fiber core rod
Ma et al. An automatic detection method of Mura defects for liquid crystal display
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
Guo et al. Unsupervised low-light image enhancement with quality-task-perception loss
CN105791635B (en) Video source modeling denoising method based on GPU and device
CN112446889A (en) Medical video reading method based on ultrasound
CN111311610A (en) Image segmentation method and terminal equipment
CN117314826A (en) Performance detection method of display screen
Xie et al. A mura detection method based on an improved generative adversarial network
Yang et al. Single image dehazing using elliptic curve scattering model
Ashwini et al. Image and video dehazing based on transmission estimation and refinement using Jaya algorithm
Zia et al. Rician noise removal from MR images using novel adapted selective non-local means filter
Tao Enhanced Canny Algorithm for Image Edge Detection in Print Quality Assessment
CN114994098A (en) Foreign matter detection method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191022

RJ01 Rejection of invention patent application after publication