CN107564001A - A kind of magnetic sheet unfilled corner detection method based on concave point search - Google Patents

A kind of magnetic sheet unfilled corner detection method based on concave point search Download PDF

Info

Publication number
CN107564001A
CN107564001A CN201710820022.6A CN201710820022A CN107564001A CN 107564001 A CN107564001 A CN 107564001A CN 201710820022 A CN201710820022 A CN 201710820022A CN 107564001 A CN107564001 A CN 107564001A
Authority
CN
China
Prior art keywords
point
concave point
profile
concave
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.)
Granted
Application number
CN201710820022.6A
Other languages
Chinese (zh)
Other versions
CN107564001B (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 CN201710820022.6A priority Critical patent/CN107564001B/en
Publication of CN107564001A publication Critical patent/CN107564001A/en
Application granted granted Critical
Publication of CN107564001B publication Critical patent/CN107564001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

A kind of magnetic sheet unfilled corner detection method based on concave point search of the disclosure of the invention, belongs to digital image processing techniques field, is related to unfilled corner detection method in a kind of magnetic sheet digital picture, especially for a kind of magnetic sheet unfilled corner detection method based on concave point search.The present invention utilizes machine vision, by magnetic material image binaryzation, finding workpiece profile, then finds the concave point in profile and two Defect Edges point corresponding with concave point, eventually finds defect.So as in magnetic material defect inspection process, realize automatic measurement, reach the purpose of low false drop rate and low loss.

Description

A kind of magnetic sheet unfilled corner detection method based on concave point search
Technical field
The invention belongs to digital image processing techniques field, is related to unfilled corner detection method in a kind of magnetic sheet digital picture, special It is not for a kind of magnetic sheet unfilled corner detection method based on concave point search.
Background technology
Modem magnetic materials are widely used in instrument, electrician, Sofe Switch, automatically controlled and the design and manufacture of spaceflight apparatus In.The whole world can all produce substantial amounts of magnetic material part daily.The defects of magnetic material surface, will greatly reduce the performance of magnetic material.Mesh The mode of artificial full inspection is usually taken in the detection apparent to magnetic material in preceding domestic manufacturers.The mode of artificial full inspection is easily tired, inspection Degree of testing the speed is slow, and detection stability is poor, strongly limit the development of industry.
Magnetic material unfilled corner refers to magnetic material in process magnetic edge edge is formed the defects of.Show as on the digital image Magnetic edge edge has lacked one piece (such as Fig. 2).Magnetic material unfilled corner shape, different sizes, this causes accurately to detect unfilled corner simultaneously from image Ensure that low false drop rate and loss have very big difficulty.
The content of the invention
For the shortcomings of detection efficiency during artificial detection magnetic material unfilled corner is low, accuracy rate is low and labor intensity is big, sheet Invention provides a kind of magnetic sheet unfilled corner detection method based on concave point search, can detect most unfilled corner defects.Carry significantly High production efficiency.
The technical scheme of this programme is:A kind of magnetic sheet unfilled corner detection method based on concave point search, this method include:
Step 1:The picture of magnetic material sample is obtained by clapping map device, image is as shown in Figure 2;
Step 2:Gaussian filtering is carried out to the magnetic material image obtained in step 1, removes the Gaussian noise in image;
Step 3:Binary conversion treatment is carried out to the target image obtained in step 2 using fixed threshold method, obtains binary map Picture;As shown in Figure 3;
Step 4:Connected component labeling is carried out to the image in step 3, and counts the number in UNICOM region;
Step 5:To the connected region obtained in step 4, the area and position of centre of gravity of each connected region are calculated;
Step 6:The area and position of centre of gravity of each connected domain obtained according to step 5 screen to connected region, to symbol The connected region of conjunction condition is retained, and the pixel value that ineligible connected region includes all is set to zero, and will be remaining Connected region interception save as a small figure, obtain the bianry image of magnetic material workpiece, as shown in Figure 4;
Step 6-1:The focus point of each connected region is taken, retains center of gravity transverse and longitudinal coordinate in the company in the region of image 1/5 to 4/5 Logical region;
Step 6-2:Remaining connected region area is sorted, the maximum connected region of Retention area.
Step 7:The binary map obtained to step 6 carries out holes filling processing, obtains the bianry image after filling processing, such as Shown in accompanying drawing 5;
Step 8:The bianry image extraction outline obtained to step 7, and outline is drawn, outer profile image is obtained, As shown in Figure 6;
Step 9:Concave point search is carried out to the profile diagram in step 8 with concave point searching algorithm, obtains concave point coordinate;Such as accompanying drawing Shown in Fig. 7;
Step 10:Two Defect Edges point corresponding with the concave point that step 9 is found is found in profile;Such as accompanying drawing Fig. 7 institutes Show;
Step 11:In the binary map that step 7 obtains, using the two Defect Edge points obtained in step 10, straight line is used Connect two marginal points.As shown in accompanying drawing Fig. 8;
Step 12:The binary map obtained to step 11 carries out holes filling processing, obtains the bianry image after filling processing, As shown in accompanying drawing Fig. 9;
Step 13:The binary map that the binary map that step 12 obtains obtains with step 7 is subtracted each other, obtains unfilled corner defect image, As shown in accompanying drawing Figure 10;
Step 14:According to the defects of step 13 image, defect frame is elected in original image, testing result figure such as accompanying drawing Shown in Figure 11;
In shown step 2, gaussian filtering template size is 3*3;
In shown step 3, fixed threshold is set to 29;
In shown step 9, search concave point algorithm comprises the following steps that:
Step 9-1:Take the profile point of one;The 4th forward profile point of current outline point is taken as current outline point Front profile point, take rear profile point of the 4th profile point as current outline point of current outline point rearward;
Step 9-2:The middle point coordinates of the line of front profile point and rear profile point in calculation procedure 9-1, in step 6, meter Calculate the gray value of this coordinate;If 255, then it is not concave point to prove this, then takes next profile point, return to step 9-1;If 0, It is a concave point then to prove this, continues 9-3 steps;
Step 9-3:Current outline point is calculated to the distance of front profile point and rear profile point line;If distance is less than 2, recessed Point is too small, takes next profile point, return to step 9-1;If distance is more than or equal to 2, continue straight line step 9-4;
Step 9-4:Preserve current point and be the alternative point of concave point, and preserve its distance value;Next profile point is taken, returns to step Rapid 9-1;Until having traveled through all profile points;
Step 9-5:All alternative concave points are screened, if alternative concave point is close in profile, take distance It is maximum for actual concave point, delete other points;Finally give concave point coordinate.
In shown step 10, find Defect Edge point algorithm and comprise the following steps that:
Step 10-1:To the concave point found in step 9, forward n-th point and forward n-th point of concave point is found, at the beginning of n Begin as 5, seek the coordinate of two points;
Step 10-2:Seek the distance of concave point 2 points of connection straight lines into step 10-1;
Step 10-3:To n values plus 1,10-2 is repeated;If current distance value is less than previous distance value, stop, protecting Deposit this 2 points be to should concave point the defects of marginal point.
The present invention is a kind of magnetic material unfilled corner detection method based on concave point search.The present invention utilizes machine vision, by right Magnetic material image binaryzation, finds workpiece profile, then finds the concave point in profile and two Defect Edges point corresponding with concave point, most Defect is found eventually.So as in magnetic material defect inspection process, realize automatic measurement, reach low false drop rate and low loss Purpose.
Brief description of the drawings
The magnetic material unfilled corner detection method based on concave point search that Fig. 1 is the present invention sends out flow chart.
Fig. 2 is the magnetic material image artwork collected in step 1 by camera.
Fig. 3 is the binary map obtained in step 3 after fixed threshold binaryzation.
Fig. 4 is the small figure of workpiece obtained in step 6 after connected domain is screened.
Fig. 5 is the figure after holes filling in step 7.
Fig. 6 is to obtain outer profile image in step 8.
Fig. 7 is the image of the concave point and Defect Edge point found in step 9 and step 10.
Fig. 8 is the binary map that connection two edges point obtains in a step 11.
Fig. 9 is the binary map after holes filling in step 12.
Figure 10 is that two images subtract each other obtained result figure in step 13.
Figure 11 is the unfilled corner defect result figure being finally identified to.
Embodiment
Below in conjunction with the accompanying drawings, the online test method of cable in the present invention is described in detail:
Step 1:Magnetic material sample is clapped by Pai Tu mechanisms and schemed, image is as shown in Figure 2;
Step 2:Gaussian filtering is carried out with 3*3 template to the magnetic material image obtained in step 1, removes the Gauss in image Noise;
Step 3:The target image obtained during fixed threshold is used as 29 pairs of steps 2 carries out binary conversion treatment, obtains two-value Image.As shown in accompanying drawing Fig. 3;
Step 4:Connected component labeling is carried out to the image in step 3, and counts the number in UNICOM region;
Step 5:To the connected region obtained in step 4, the area and position of centre of gravity of each connected region are calculated;
Step 6:The area and position of centre of gravity of each connected domain obtained according to step 5 screen to connected region, to symbol The connected region of conjunction condition is retained, and the pixel value that ineligible connected region includes all is set to zero, and will be remaining Connected region interception save as a small figure, the bianry image of magnetic material workpiece is obtained, as shown in accompanying drawing Fig. 4;
Step 6-1:The focus point of each connected region is taken, retains center of gravity transverse and longitudinal coordinate in the company in the region of image 1/5 to 4/5 Logical region;
Step 6-2:Remaining connected region area is sorted, the maximum connected region of Retention area.
Step 7:The binary map obtained to step 6 carries out holes filling processing, obtains the bianry image after filling processing, such as Shown in accompanying drawing Fig. 5;
Step 8:The bianry image extraction outline obtained to step 7, and outline is drawn, outer profile image is obtained, As shown in accompanying drawing Fig. 6;
Step 9:Concave point search is carried out to the profile diagram in step 8 with concave point searching algorithm, obtains concave point coordinate.Such as accompanying drawing Shown in Fig. 7, red point is the concave point found in image;
Step 9-1:Take the profile point of one.The 4th forward profile point of current outline point is taken as current outline point Front profile point, take rear profile point of the 4th profile point as current outline point of current outline point rearward;
Step 9-2:The middle point coordinates of the line of front profile point and rear profile point in calculation procedure 9-1, in step 6, meter Calculate the gray value of this coordinate.If 255, then it is not concave point to prove this, then takes next profile point, return to step 9-1;If 0, It is a concave point then to prove this, continues 9-3 steps;
Step 9-3:Current outline point is calculated to the distance of front profile point and the straight line of rear profile point.If distance is less than 2, Concave point is too small, takes next profile point, return to step 9-1;If distance is more than or equal to 2, continue straight line step 9-4;
Step 9-4:Preserve current point and be the alternative point of concave point, and preserve its distance value;Next profile point is taken, returns to step Rapid 9-1;Until having traveled through all profile points.
Step 9-5:All alternative concave points are screened, if alternative concave point is close in profile, take distance It is maximum for actual concave point, delete other points.Finally give concave point coordinate.
Step 10:Two Defect Edges point corresponding with the concave point that step 9 is found is found in profile.Such as accompanying drawing Fig. 7 institutes Show, green point is the defects of finding marginal point in image;
Step 10-1:To the concave point found in step 9, and (n initially takes 5) that concave point is forward are taken at n-th point at n-th point, Seek the coordinate of two points.
Step 10-2:Seek the distance of concave point 2 points of connection straight lines into step 10-1.
Step 10-3:Take to n values plus 1, repeat 10-2.If current distance value is less than previous distance value, stop, Preserve this 2 points be to should concave point the defects of marginal point.
Step 11:In the binary map that step 7 obtains, using the two Defect Edge points obtained in step 10, straight line is used Connect two marginal points.As shown in accompanying drawing Fig. 8;
Step 12:The binary map obtained to step 11 carries out holes filling processing, obtains the bianry image after filling processing, As shown in accompanying drawing Fig. 9;
Step 13:The binary map that the binary map that step 12 obtains obtains with step 7 is subtracted each other, obtains unfilled corner defect image, As shown in accompanying drawing Figure 10;
Step 14:According to the defects of step 13 image, defect frame is elected in original image, testing result figure such as accompanying drawing Shown in Figure 11.

Claims (4)

1. a kind of magnetic sheet unfilled corner detection method based on concave point search, this method include:
Step 1:The picture of magnetic material sample is obtained by clapping map device;
Step 2:Gaussian filtering is carried out to the magnetic material image obtained in step 1, removes the Gaussian noise in image;
Step 3:Binary conversion treatment is carried out to the target image obtained in step 2 using fixed threshold method, obtains bianry image
Step 4:Connected component labeling is carried out to the image in step 3, and counts the number in UNICOM region;
Step 5:To the connected region obtained in step 4, the area and position of centre of gravity of each connected region are calculated;
Step 6:The area and position of centre of gravity of each connected domain obtained according to step 5 screen to connected region, to meeting bar The connected region of part is retained, and the pixel value that ineligible connected region includes all is set to zero, and by remaining company Logical region interception saves as a small figure, obtains the bianry image of magnetic material workpiece;
Step 6-1:The focus point of each connected region is taken, retains center of gravity transverse and longitudinal coordinate in the connected region in the region of image 1/5 to 4/5 Domain;
Step 6-2:Remaining connected region area is sorted, the maximum connected region of Retention area.
Step 7:The binary map obtained to step 6 carries out holes filling processing, obtains the bianry image after filling processing;
Step 8:The bianry image extraction outline obtained to step 7, and outline is drawn, obtain outer profile image;
Step 9:Concave point search is carried out to the profile diagram in step 8 with concave point searching algorithm, obtains concave point coordinate;
Step 10:Two Defect Edges point corresponding with the concave point that step 9 is found is found in profile;
Step 11:In the binary map that step 7 obtains, using the two Defect Edge points obtained in step 10, connected with straight line Two marginal points;
Step 12:The binary map obtained to step 11 carries out holes filling processing, obtains the bianry image after filling processing;
Step 13:The binary map that the binary map that step 12 obtains obtains with step 7 is subtracted each other, obtains unfilled corner defect image;
Step 14:According to the defects of step 13 image, defect frame is elected in original image.
A kind of 2. magnetic sheet unfilled corner detection method based on concave point search as claimed in claim 1, it is characterised in that the step 2 Middle gaussian filtering template size is 3*3;Fixed threshold is set to 29 in the step 3.
A kind of 3. magnetic sheet unfilled corner detection method based on concave point search as claimed in claim 1, it is characterised in that the step 9 In, search concave point algorithm comprises the following steps that:
Step 9-1:Take the profile point of one;Take the 4th front-wheel of the profile point as current outline point that current outline point is forward It is wide, take rear profile point of the 4th profile point as current outline point of current outline point rearward;
Step 9-2:The middle point coordinates of the line of front profile point and rear profile point, in step 6, calculates this in calculation procedure 9-1 The gray value of coordinate;If 255, then it is not concave point to prove this, then takes next profile point, return to step 9-1;If 0, then demonstrate,prove It is bright this be a concave point, continue 9-3 steps;
Step 9-3:Current outline point is calculated to the distance of front profile point and rear profile point line;If distance is less than 2, concave point is too It is small, take next profile point, return to step 9-1;If distance is more than or equal to 2, continue straight line step 9-4;
Step 9-4:Preserve current point and be the alternative point of concave point, and preserve its distance value;Take next profile point, return to step 9- 1;Until having traveled through all profile points;
Step 9-5:All alternative concave points are screened, if alternative concave point is close in profile, take distance maximum For actual concave point, delete other points;Finally give concave point coordinate.
A kind of 4. magnetic sheet unfilled corner detection method based on concave point search as claimed in claim 1, it is characterised in that the step In 10, find Defect Edge point algorithm and comprise the following steps that:
Step 10-1:To the concave point found in step 9, forward n-th point and forward n-th point of concave point is found, n is initially 5, seek the coordinate of two points;
Step 10-2:Seek the distance of concave point 2 points of connection straight lines into step 10-1;
Step 10-3:To n values plus 1,10-2 is repeated;If current distance value is less than previous distance value, stops, preserving this 2 points be to should concave point the defects of marginal point.
CN201710820022.6A 2017-09-13 2017-09-13 Magnetic sheet corner defect detection method based on pit search Active CN107564001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710820022.6A CN107564001B (en) 2017-09-13 2017-09-13 Magnetic sheet corner defect detection method based on pit search

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710820022.6A CN107564001B (en) 2017-09-13 2017-09-13 Magnetic sheet corner defect detection method based on pit search

Publications (2)

Publication Number Publication Date
CN107564001A true CN107564001A (en) 2018-01-09
CN107564001B CN107564001B (en) 2020-09-25

Family

ID=60979767

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710820022.6A Active CN107564001B (en) 2017-09-13 2017-09-13 Magnetic sheet corner defect detection method based on pit search

Country Status (1)

Country Link
CN (1) CN107564001B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230324A (en) * 2018-01-31 2018-06-29 浙江理工大学 Magnetic shoe surface microdefect visible detection method
CN117274366A (en) * 2023-11-22 2023-12-22 合肥晶合集成电路股份有限公司 Line edge distance determining method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104091170A (en) * 2014-06-13 2014-10-08 电子科技大学 Automatic mould distinguishing method based on machine vision
CN104897071A (en) * 2015-04-28 2015-09-09 电子科技大学 Machine vision-based twisted pair pitch measuring method
CN106295789A (en) * 2015-06-10 2017-01-04 浙江托普云农科技股份有限公司 A kind of crop seed method of counting based on image procossing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104091170A (en) * 2014-06-13 2014-10-08 电子科技大学 Automatic mould distinguishing method based on machine vision
CN104897071A (en) * 2015-04-28 2015-09-09 电子科技大学 Machine vision-based twisted pair pitch measuring method
CN106295789A (en) * 2015-06-10 2017-01-04 浙江托普云农科技股份有限公司 A kind of crop seed method of counting based on image procossing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈晓红: "基于机器视觉的触摸屏玻璃缺陷检测方法研究", 《中国优秀硕士学位论文全文数据库(电子期刊)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230324A (en) * 2018-01-31 2018-06-29 浙江理工大学 Magnetic shoe surface microdefect visible detection method
CN108230324B (en) * 2018-01-31 2023-10-20 浙江理工大学 Visual detection method for microdefect on surface of magnetic shoe
CN117274366A (en) * 2023-11-22 2023-12-22 合肥晶合集成电路股份有限公司 Line edge distance determining method and device
CN117274366B (en) * 2023-11-22 2024-02-20 合肥晶合集成电路股份有限公司 Line edge distance determining method and device

Also Published As

Publication number Publication date
CN107564001B (en) 2020-09-25

Similar Documents

Publication Publication Date Title
CN106952258B (en) A kind of bottle mouth defect detection method based on gradient orientation histogram
CN109772733B (en) Defect bamboo block detecting and sorting device and method based on vision
CN102494976B (en) Method for automatic measurement and morphological classification statistic of ultra-fine grain steel grains
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN108665458B (en) Method for extracting and identifying surface defects of transparent body
CN109767445B (en) High-precision PCB defect intelligent detection method
CN106373140B (en) Transparent and semitransparent liquid impurity detection method based on monocular vision
CN112614062B (en) Colony counting method, colony counting device and computer storage medium
CN102496161A (en) Method for extracting contour of image of printed circuit board (PCB)
CN107490583A (en) A kind of intermediate plate defect inspection method based on machine vision
CN210071686U (en) Fruit grading plant based on orthogonal binocular machine vision
CN107564001A (en) A kind of magnetic sheet unfilled corner detection method based on concave point search
CN110443791A (en) A kind of workpiece inspection method and its detection device based on deep learning network
CN110807763A (en) Method and system for detecting ceramic tile surface bulge
CN107633507A (en) LCD defect inspection methods based on contour detecting and characteristic matching
Fu et al. Medicine glass bottle defect detection based on machine vision
CN115931898A (en) Visual detection method and device for surface defects of ceramic substrate and storage medium
Yang et al. Vial bottle mouth defect detection based on machine vision
CN112365448A (en) Fabric defect detection method in warp knitting process
CN204148152U (en) Large-scale multi items is mixed takes underwear automated sorting production line
CN115112682A (en) Visual mobile phone curved glass detection device and method
Ji et al. Research on Image Edge Detection Based on Improved Canny Operator
CN110415251A (en) A kind of image partition method and device of background detection
CN108663376B (en) Seamless steel tube quality detection device and detection method
CN107833222B (en) Nonmetal part surplus detection device and method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant