CN109141232A - A kind of circle plate casting online test method based on machine vision - Google Patents

A kind of circle plate casting online test method based on machine vision Download PDF

Info

Publication number
CN109141232A
CN109141232A CN201810890880.2A CN201810890880A CN109141232A CN 109141232 A CN109141232 A CN 109141232A CN 201810890880 A CN201810890880 A CN 201810890880A CN 109141232 A CN109141232 A CN 109141232A
Authority
CN
China
Prior art keywords
sample
image
circle
point
plate casting
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
CN201810890880.2A
Other languages
Chinese (zh)
Other versions
CN109141232B (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.)
CHANGZHOU HIDEA MACHINERY CO LTD
Jiangsu University
Original Assignee
CHANGZHOU HIDEA MACHINERY CO LTD
Jiangsu University
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 CHANGZHOU HIDEA MACHINERY CO LTD, Jiangsu University filed Critical CHANGZHOU HIDEA MACHINERY CO LTD
Priority to CN201810890880.2A priority Critical patent/CN109141232B/en
Publication of CN109141232A publication Critical patent/CN109141232A/en
Application granted granted Critical
Publication of CN109141232B publication Critical patent/CN109141232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • 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
    • 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/30116Casting

Abstract

The circle plate casting online test method based on machine vision that the invention discloses a kind of obtains circle plate casting sample tow sides image, after image preprocessing by acquiring circle plate casting sample image;Sample size is detected according to sample image collected, preliminary judgement defect, carries out next step detection;It is handled by picture and detection label is carried out to sample notch to the extraction translation specifications realization of notch enhanced processing;After the degree and set threshold value comparison that deviate benchmark according to edge, realization detects sample veining defect;Be finally completed to sample whether He Ge judgement, can be realized and notch and burr are identified real-time, quickly to circle plate casting, be suitable for high speed on-line detecting system.

Description

A kind of circle plate casting online test method based on machine vision
Technical field
The invention belongs to field of machine vision more particularly to a kind of brake disc castings on-line checking sides based on machine vision Method.
Background technique
In the production process of casting, due to various reasons, casting outer profile is difficult to avoid not generating burr, defect The defects of, these defects seriously affect the surface quality and physical mechanical property of product;In terms of dimensional accuracy, casting may go out Cast-in-place insufficient, thin-walled deformation etc., causes casting overall dimensions and weight unqualified.
The quality testing link of current Casting Factory mostly uses online artificial detection or offline sampling Detection.Artificial online inspection Survey has stronger dependence to the ability to work of worker, degree of fatigue, and accuracy rate not can guarantee.And the manpower of artificial detection at This occupies sizable ratio in casting cost, and very big difficulty is brought to the cost control of enterprise.And inspection of sampling offline It surveys, though the detection data of degree of precision can be obtained, due to being sampling Detection, reacts slow, low efficiency, sampling covering surface is small, very Difficult discovery failure and less loss in time.
And the machine components on-line checking based on machine vision has untouchable, safe objectivity and high efficiency, becomes The main flow direction of futurity industry detection.But since the online vision-based detection of small and medium-sized casting requires high-precision, high speed, so that should Detection method still faces some technical problems:
(1) by lens distortion, polishing is uneven and the multiple factors such as ambient enviroment are influenced, the signal-to-noise ratio of detection system is not Height, edge tiny flaw are difficult to distinguish and detect with noise.How brake disc edge contour is accurately completely extracted, it is outer to adapt to One of the problem of interference of boundary's poor environment is to be solved.
(2) brake disc castings are the machine components with circular feature, and outer edge is jagged, fash and burr etc. Defect affects to the circle fitting of internal-and external diameter.Forefathers have geometrical center method, most for detecting circular method mainly Small square law and Circle Hough Transform etc., geometrical center method calculating process is simple, but known point is required to be evenly distributed, or in precision It is used in the case where not high;Least square method is influenced vulnerable to lack part, the picture noise on actual object boundary or curve, is intended Conjunction has deviation;And tradition Hough loop truss noise immunity is strong, precision is high, major defect be algorithm calculating and storage demand with The increase of curve dimension and it is in exponential increase, be not suitable for high speed on-line detecting system.
(3) form of casting surface defect is complex, and detection difficulty is big.How false defect (surface scratch, water excluded Mark, mark spot etc.) interference under, identify notch and the two kinds of edge defect of burr real-time, quickly, quantify defect Pixel Dimensions information.
Summary of the invention
The present invention is insufficient according to prior art and defect, proposes a kind of circle plate casting based on machine vision and examines online Survey method, it is therefore intended that quickly detect circle plate casting in real time, reach the required precision of production technical standard.
A kind of circle plate casting online test method based on machine vision, comprising the following steps:
Step 1, circle plate casting sample image is acquired, circle plate casting sample tow sides image is obtained;
Step 2, sample size is detected according to sample image collected, preliminary judgement defect, is carried out in next step Detection;
Step 3, detection label is carried out to sample notch;
Step 4, sample veining defect is detected;
Step 5, be finally completed to sample whether He Ge judgement.
Further, the method that sample size is detected specifically includes the following steps:
Step 2.1, image preprocessing, sample image carry out median filtering, eliminate image salt-pepper noise, after retaining profile, Image segmentation is carried out using background subtraction and Ostu optimal threshold method, obtains bianry image;
Step 2.2, the pixel edge that bianry image is detected using canny operator passes through gray scale moments method and Pixel-level Fusion Edges obtain sub-pixel edge contour images, by slightly edge precision is refine to inside pixel to essence;
Step 2.3, roundness threshold T is setThresholdIf circularity T > TThreshold, circle contour is separately added into chained list, calls least square method Carry out round fitting;If circularity T < TThreshold, using Hough loop truss method is improved, count the votes of central coordinate of circle and radius, votes It is as required to measure most target points, draws out fitting circular curve respectively;
Further, circularity T > TThreshold, call least square method to carry out round fitting:
T<TThreshold, suitable to obtained sub-pixel edge profile Clockwise Searching point, initial point P1For the marginal point of the top, it is P for a number consecutively that step angle, which is 1 °,1,P2,..., Pn,...,P359,
Select distance P1The point at n point interval of point, the two is connected in a manner of line segment;
Cross Pn+1Point makees line segmentVertical line, put in domain from point Pn+1Start to search for clockwise, until finding away from vertical The nearest point P of linem, connecting line segmentIf the selection of n so thatIt is just diameter, then can not finds corresponding points Pm, this Time point PmWith point Pn+1It is overlapped;
From round property: " string midpoint corresponding to 90 ° of angles of circumference is the center of circle ", then central coordinate of circle (xo,yo) are as follows:
WhereinFor P1Point coordinate,For PmPoint coordinate is, it is specified that an allowable error limit:
X is respectively set, two accumulators of y store gained central coordinate of circle, and repeat the above steps respectively, complete point domain (P1,P2,...,Pn) all the points parameter space conversion,
Poll is counted, central coordinate of circle (a, b) is x, the most number of frequency of occurrence in the cumulative array of y;
Using the central coordinate of circle found out as foundation, ask each point in a domain to the distance in the center of circle, if the variance of all radius values Less than threshold tau, then radius of the average value as circle is calculated;Otherwise, the mode of data set is set to center of circle radius value R, through detecting Exceed threshold value with jagged part circularity.
Step 2.4, using internal-and external diameter central coordinate of circle, distance of center circle is sought, is estimated as the coaxiality error under orthographic projection, when When meeting concentricity < 1mm, sample is labeled as qualified product;Otherwise it is labeled as rejected product;
Further, the condition of defects detection preliminary judgement are as follows:, will according to resulting round matched curve as benchmark model line It is bad for deviating from the endpoint detections of benchmark model line certain distance in sub-pixel edge contour images, if distance is negative value, after It is continuous to carry out carrying out detection label to sample notch, if distance is positive value, skips to and sample veining defect is detected;
Further, the method that whether there is chips defect in detection image, and carry out detection label to it are as follows:
Step 3.1, using OSTU optimal threshold T, binaryzation sample image obtains bianry image;
Step 3.2, the cavity inside opening operation filling bianry image, excludes the interference of false defect;
Step 3.3 obtains gap regions by cap transformation;Step 3.4, using the mode that morphology is serially divided to figure As carrying out expansion process, amplify gap regions;
Step 3.5, using the regionprop operator statistical regions area and center point coordinate feature of MATLAB, as former state Code notches on product image, realize to sample whether be qualified product judgement.
Further, after degree and set threshold value comparison that benchmark is deviateed according to edge, sample veining defect is examined The method of survey are as follows:
Step 4.1, according to the degree of edge deviation reference line compared with threshold value, if the degree of edge deviation reference line < Threshold value, it is determined that be that qualified product follows the steps below if edge deviates degree > threshold value of reference line;
Step 4.2, exposure mask g (x, y) is established according to resulting basic circle, original image and exposure mask is subjected to logic and operation acquisition Burr areas;
Step 4.3, binaryzation is carried out to burr areas, by two-value connected region Edge track, obtain burr profile and with Different colours mark is measured burr perimeter and area using regionprops operator, is coloured to burr area;
Step 4.4, according to treated image, determine whether current sample needs to finish;
Beneficial effects of the present invention:
(1) the test environment polishing that the present invention is built is uniform not to be influenced by multiple factors such as ambient enviroments, detection system The signal-to-noise ratio of system is high, and edge tiny flaw is easier to distinguish and detect with noise.It accurately can completely extract plate-like casting side Edge profile.
(2) plate-like casting is the machine components with circular feature, and outer edge is jagged, fash and burr etc. lack It falls into, affects to the circle fitting of internal-and external diameter.In order to guarantee the requirement of accuracy and speed, the present invention devises improvement Hough circle centering algorithm, according to three-point circle and non relieved gear hobs feature, to traditional Hough parameter space dimensionality reduction reduction, only Two one-dimensional parameter spaces of central coordinate of circle x, y need to be preset, and do not have high order power operation and extracting operation, it can be in the meter of algorithm It calculates and generates good effect of optimization in complexity.To guarantee the robustness of algorithm, eliminating lattice point at the boundary noise, spy defines one Allowable error limits δwcWith radius variances threshold tau, it can be achieved that going beyond the limit of the quick loop truss of the specimen part of the limits of error to circularity. The experimental results showed that the detected value of this algorithm and the deviation of actual value within 1mm (i.e. ± 0.3%), average detected one zero The time of part is 9.006447s.
(3) method of the present invention can not be influenced by the form of casting surface defect, can exclude puppet Under the interference of defect (surface scratch, water mark, mark spot etc.), notch and the two kinds of edge of burr are identified real-time, quickly Defect quantifies the Pixel Dimensions information of defect.The experimental results showed that the defects detection of this algorithm just inspection rate is up to 95%, it is average to examine The survey time is 3.60049s.
Detailed description of the invention
Fig. 1 is NI Vision Builder for Automated Inspection block diagram of the invention;
Fig. 2 is vision-based detection hardware platform figure of the invention;
Fig. 3 a is the brake disc image with chips defect that collection in worksite arrives in actually detected application case;
Fig. 3 b is the brake disc image with veining defect that collection in worksite arrives in actually detected application case;
Fig. 4 a is the brake disc image with chips defect after median filtering;
Fig. 4 b is the brake disc image with veining defect after median filtering;
Fig. 5 is the roller-way background image that collection in worksite arrives in actually detected application case;
Fig. 6 a is the brake disc image with chips defect that background subtraction obtains;
Fig. 6 b is the brake disc image with veining defect that background subtraction obtains;
Fig. 7 a is the brake disc bianry image with chips defect;
Fig. 7 b is the brake disc bianry image with veining defect;
Fig. 8 a is the pixel edge contour images with chips defect based on canny operator extraction;
Fig. 8 b is the pixel edge contour images with veining defect based on canny operator extraction;
Fig. 8 c is the sub-pixel edge contour images with chips defect based on gray scale moments method;
Fig. 8 d is the sub-pixel edge contour images with veining defect based on gray scale moments method;
Fig. 9 is dimensional measurement algorithm flow schematic diagram of the present invention;
Figure 10 is the circle fitting result figure of the brake disc part based on least square method;
Figure 11 is the loop truss result figure based on the brake disc part for improving Hough transformation;
Figure 12 a is the schematic diagram for improving Hough transformation in the positioning of the center of circle;
Figure 12 b is the radius parameter space ballot statistic curve for improving Hough transformation;
Figure 13 is chips defect detection algorithm flow diagram of the present invention;
Figure 14 a is the region holes filling result figure based on morphology opening operation;
Figure 14 b is that the actual edge notch based on cap transformation extracts image;
Figure 14 c is the actual edge notch enlarged drawing based on serial cutting operation;
Figure 14 d is that the chips defect after combine detection result marks result figure;
Figure 15 is veining defect detection algorithm flow diagram of the present invention;
The exposure mask template of circle on the basis of Figure 16 a;
Figure 16 b is original image and exposure mask template logic operation result figure;
Figure 16 c is the veining defect colouring results figure based on connected region domain method;
Figure 17 is to contain technically demanding brake disc detail drawing in concrete application case.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, the specific embodiments are only for explaining the present invention, not For limiting the present invention.
It is the NI Vision Builder for Automated Inspection block diagram of invention, including feeding mechanical system, lighting system, optically detecting as shown in Figure 1 System, image processing and analysis system and human-computer interaction interface, wherein passing through between material mechanical system and human-computer interaction interface Electric interfaces and information interface realize the mutual transmitting of information;If Fig. 2 is vision-based detection hardware platform figure of the invention, in darkroom In environment, for feeding mechanical system for transmitting to sample, lighting system, which is used, can highlight object edge using LED bar graph light source Edge feature, when use, can be freely combined according to article size, while can exclude external environmental light using dark field illumination Interference, object under test illuminance is uniform, and defect is high-visible.Optical system for collecting selects area array CCD camera, in the present embodiment In, operating distance of the camera away from part to be measured is about 700mm, and brake disc maximum gauge to be measured isBy the model of camera Determine that imaging size isIt is as follows according to formula f=uM/ (M+1) primary Calculation:
M=11/300=0.036 (1)
F=700 × 0.036/ (0.036+1)=25.2 (2)
Wherein u is distance of the camera lens to object, i.e. operating distance;F is the focal length of camera lens;M is image proportionality coefficient.Therefore Final choice focal length is the fixed-focus telecentric lens of 25mm, can finely tune operating distance.
A kind of technical solution that the circle plate casting online test method based on machine vision uses of the present invention specifically:
Step 1, by optical system for collecting, brake disc sample tow sides image is collected, if Fig. 3 a is collection in worksite The brake disc image with chips defect arrived, 3b are the brake disc images with veining defect that collection in worksite arrives.
Step 2, such as Fig. 9, sample size is detected according to sample image collected, preliminary judgement defect, is carried out It detects in next step;Detailed process is as follows:
Step 2.1, image preprocessing: median filtering is carried out to sample image collected using 5X5 sliding window, is eliminated Image salt-pepper noise after retaining profile, while preferably retaining profile;It is carried out using background subtraction and OSTU optimal threshold method Image segmentation extracts target brake disk area (ROI), obtains bianry image;It is specific:
2.1.1 median filtering: the influence of the extraneous factors such as examined scene natural light, hardware device, meeting in casting image Salt-pepper noise is introduced, the sliding window scan image f (x, y) that the present invention is 9X9 using a size will be in window (2N+1) Each pixel gray value makees size sequence, and the output pixel value of filter result is the intermediate value of the sequence;After finally obtaining filtering Image f1(x, y) as shown in Fig. 4 a, 4b,
yk=med (xk-N,xk-N+1,...xk,...,xk+N-1,xk+N) (3)
In formula, med indicates 5X5 neighborhood median operation, ykFor the center pixel value after k-th of domain filtering, xkIt is k-th Center pixel value before domain filtering, N=12 in this example.
2.1.2 image segmentation: divide roller-way background such as Fig. 5 with background subtraction first, obtain the part drawing of uniform background As f2(x, y) is as shown in Fig. 6 a, 6b;Again by OSTU maximum variance between clusters to above-mentioned image binaryzation.It is maximum between two classes Variance are as follows:
σ2(T)=Waa-μ)2+Wbb-μ)2 (4)
W in formulaaFor A class probability, μaFor A class average gray, WbFor B class probability, μbFor B class average gray, μ is that image is total Body average gray.So that σ2(T) the threshold value T being maximized divides the image into A, B two parts, obtains bianry image f3(x, y), it is black Color is brake disc area to be tested, as shown in Fig. 7 a, 7b:
Step 2.2, the pixel edge for detecting bianry image using canny operator such as Fig. 8 a, 8b, using the field 5X5 Formwork calculation is carried out, 1,2,3 rank Gray Moments is sought, and then merge with pixel edge, obtains sub-pixel edge contour images f4(x, Y), as shown in Fig. 8 c, 8d.
Step 2.3, roundness threshold TThreshold=0.90, if circularity T > TThreshold, then by sub-pixel edge contour images f4(x's, y) is interior Excircle configuration point is separately added into chained list, calls least square method to carry out round fitting the pixel in each chained list:
Enable local derviationThe sample point set of the edge of the circle (Ω be), the available formula of simultaneous (6) it is minimum Value, the functional value of the more each minimum point of process just obtain minimum value, to obtain round deformation equation R2=x2+y2-2ax- 2ay+a2+b2Multinomial coefficient, required central coordinate of circle (a, b) and radius R can be asked by corresponding relationship, through detecting with jaggy Part circularity is qualified, and least square fitting circle is as shown in Figure 10.Wherein, xi、yiFor x, y pixel of sub-pixel edge profile point Coordinate.
If T < TThreshold, then using Hough loop truss method is improved, the invention proposes a kind of, and the improvement based on Hough transform is round It feels relieved algorithm, by parameter space dimension from three-dimensional drop at one-dimensional, and there is no high order power operation and extracting operation, it can be in algorithm Computation complexity on generate good effect of optimization, such as Figure 12 a, 12b specific algorithm is as follows:
A is to obtained sub-pixel edge profile clockwise direction Searching point, initial point P1For the marginal point of the top, step pitch Angle is 1 °, is P for a number consecutively1,P2,...,Pn,...,P359
B selects distance P1The point at n point interval of point, the two is connected in a manner of line segment.
C crosses Pn+1Point makees line segmentVertical line, from point P in the point domain in step an+1Start to search for clockwise, Until finding the point P nearest away from vertical linem, connecting line segmentIf the selection of n so thatIt is just diameter, then can not looks for To corresponding points Pm, this time point PmWith point Pn+1It is overlapped.
D is from the property justified: " string midpoint corresponding to 90 ° of angles of circumference is the center of circle ", then central coordinate of circle (xo,yo) are as follows:
WhereinFor P1Point coordinate,For PmPoint coordinate.To guarantee the robustness of algorithm, eliminating side Boundary's lattice point noise, it is desirable to exclude undesirable measuring point, spy provides an allowable error limit:
X is respectively set in e, and two accumulators of y store gained central coordinate of circle respectively.And the b-d that repeats the above steps, it completes Point domain (P1,P2,...,Pn) all the points parameter space conversion.
F counts poll, and central coordinate of circle (a, b) is x, the most number of frequency of occurrence in the cumulative array of y.
G asks each point in a domain to the distance in the center of circle, if the variance of all radius values using the central coordinate of circle found out as foundation Less than threshold tau, then radius of the average value as circle is calculated;Otherwise, the mode of data set is set to center of circle radius value R.Through detecting Exceed threshold value with jagged part circularity, Improved Hough Transform loop truss result is as shown in figure 11.
Step 2.4, using above-mentioned resulting internal-and external diameter central coordinate of circle, distance of center circle is sought, as the concentricity under orthographic projection Estimation error, when meeting concentricity < 1mm, sample is labeled as qualified product;Otherwise it is labeled as rejected product;
Further, the condition of preliminary determining defects are as follows: according to resulting round matched curve as benchmark model line, will deviate from The endpoint detections of benchmark model line certain distance are bad, if continuing to detect sample notch apart from being negative value Label is skipped to and is detected to sample veining defect if distance is positive value;
Further, such as Figure 13, obtained two after being handled according to image segmentation, median filtering and OSTU optimal thresholdization It is worth image, the method that whether there is chips defect in detection image, and carry out detection label to it are as follows:
Step 3.1, inner void is filled: since piece surface is there are false defects such as scratch, marks, what Threshold segmentation obtained Contain small holes inside bianry image, to avoid impacting extraction emargintion, needs to fill local speck, therefore this hair Bright with a radius is 15, the structural element A of disc-shape to obtained bianry image f3(x, y) does opening operation, result figure As shown in figures 14a.
Wherein symbol " Θ " indicates the etching operation in mathematical morphology, symbolIndicate expansive working;
Step 3.2, gap regions are extracted: the present invention is with the structural element B that a radius is 60, disc-shape to above-mentioned place It manages obtained image and carries out cap transformation, first opening operation bring the result is that being exaggerated the area in crack or local low-light level Domain, then the figure after subtracting opening operation in original image highlight region brighter around profile, i.e. emargintion region h2(x, Y), as shown in fig. 14b.
Step 3.3, gap regions are amplified: for uncompressed big figure used in the present embodiment, serially being divided using morphology The mode cut carries out expansive working to image, is greatly improved the speed of service, therefore the present invention uses structural elementAbove-mentioned picture carries out expansive working, as a result obtains amplified gap regions h3(x, y), as shown in figure 14 c:
Step 3.4, gap regions mark: statistical regions area and center point coordinate feature, image subscript after the filtering Remember notch, circle radius size and the proportional example of notch area, the image after label as shown in Figure 14 d, realize to sample whether For the judgement of qualified product.
As shown in figure 15, after according to the degree of edge deviation benchmark compared with set area threshold, to sample burr The method that defect is detected are as follows:
Step 4.1, binary conversion treatment and closing operation of mathematical morphology are carried out according to sample image,
Step 4.2, exposure mask g (x, y) is established according to the resulting basic circle of step 4, original image and exposure mask is subjected to logical AND fortune It calculates, obtains the image g of only burr areas1(x,y).If Figure 16 a is exposure mask template, Figure 16 b is exposure mask operation result.
g1(x, y)=f2(x,y)&g(x,y) (12)
Step 4.3, binaryzation is carried out to burr areas, by two-value connected region Edge track, obtain burr profile and with Different colours mark measures burr perimeter and area using regionprops operator, colours and is coloured aobvious to burr area Show in original image, testing result is as shown in figure 16 c.
Step 4.4, according to treated image, determine whether current sample needs to finish;
As Figure 17 obtains the detecting size of 5 sample brake disc parts in the present embodiment, and respectively with practical ruler It is very little to compare, draw dimension measurement result table as shown in Table 1.Known first kind part (1#, 2#, 3#) outer diameter tolerance are as follows: 269 ± 1mm, id tolerance are as follows: 57 ± 0.5mm;Second class part (4#, 5#) outer diameter tolerance are as follows: 285 ± 1mm, id tolerance Are as follows: 57 ± 0.5mm.Concentricity requirement is ± 1mm.
Table 1: size detection result
During atual detection, defects detection generates a degree of mistake vulnerable to environment light, the influence of illuminance unevenness Pick up or missing inspection, in order to really reflect the fault-tolerance of the vision-based detection result, it is special by sample parts with different location and rotation angle Platform after testing, fault detection data shown in record sheet two: (note: positive inspection rate is the accuracy detected)
Table 2: defects detection result
Finally judge part for qualified product, rejected product or to precision-machined parts according to casting techniques standard.Defects detection And acceptance criteria are as follows:
On Mechanical processing of casting surface, allow there are the casting surface defect within the scope of machining allowance,
Allow to allow there are the hole class defect of Φ 2.5mm × 1.5mm at 3 with casting repair sheets on the non-processing face of casting Repairing is clogged to it, mend should be smooth consistent with basal plane, then antirust treatment.
Casting should be cleaned out, burr, fash, dead head residual volume height be not greater than 0.5mm, nothing on casting Residual sand (opening between the brake lining up and down of such as brake disc) and oxide skin.
Above embodiments are merely to illustrate design philosophy and feature of the invention, and its object is to make technology in the art Personnel can understand the content of the present invention and implement it accordingly, and protection scope of the present invention is not limited to the above embodiments.So it is all according to It is within the scope of the present invention according to equivalent variations made by disclosed principle, mentality of designing or modification.

Claims (8)

1. a kind of circle plate casting online test method based on machine vision, which comprises the following steps:
Step 1, circle plate casting sample image is acquired, circle plate casting sample tow sides image is obtained;
Step 2, sample size is detected according to sample image collected, preliminary judgement defect, carries out next step detection;
Step 3, detection label is carried out to sample notch;
Step 4, sample veining defect is detected;
Step 5, be finally completed to sample whether He Ge judgement.
2. a kind of circle plate casting online test method based on machine vision according to claim 1, which is characterized in that institute State the method detected to sample size the following steps are included:
Step 2.1, sample image collected is pre-processed, obtains bianry image;
Step 2.2, the pixel edge for detecting bianry image is merged by gray scale moments method and pixel edge, obtains sub- picture Plain edge contour image;
Step 2.3, roundness threshold T is setThreshold, according to circularity T and threshold value TThresholdComparison, draw out fitting circular curve;
Step 2.4, using internal-and external diameter central coordinate of circle, distance of center circle is sought, as the coaxiality error estimation under orthographic projection, works as satisfaction When concentricity < 1mm, sample is labeled as qualified product;Otherwise it is labeled as rejected product.
3. a kind of circle plate casting online test method based on machine vision according to claim 2, which is characterized in that institute State the pretreated process of image are as follows: to sample image carry out median filtering, retain profile after, reuse background subtraction and Ostu optimal threshold method carries out image segmentation.
4. a kind of circle plate casting online test method based on machine vision according to claim 2, which is characterized in that institute If stating circularity T > TThreshold, sub-pixel edge contour images are separately added into chained list, least square is called to the pixel in each chained list Method carries out round fitting;If circularity T < TThreshold, using Hough loop truss method is improved, fitting circular curve is drawn out respectively.
5. a kind of circle plate casting online test method based on machine vision according to claim 4, which is characterized in that if T>TThreshold, call least square method to carry out round fitting:If T < TThreshold, To obtained sub-pixel edge profile clockwise direction Searching point, initial point P1For the marginal point of the top, step angle is 1 °, is Point number consecutively is P1,P2,...,Pn,...,P359
Select distance P1The point at n point interval of point, the two is connected in a manner of line segment;
Cross Pn+1Point makees line segmentVertical line, put in domain from point Pn+1Start to search for clockwise, until finding away from vertical line most Close point Pm, connecting line segmentIf the selection of n so thatIt is just diameter, then can not finds corresponding points Pm, this time point PmWith point Pn+1It is overlapped;
Central coordinate of circle (xo,yo) are as follows:
WhereinFor P1Point coordinate,For PmPoint coordinate is, it is specified that an allowable error limit:
X is respectively set, two accumulators of y store gained central coordinate of circle, and repeat the above steps respectively, complete point domain (P1, P2,...,Pn) all the points parameter space conversion;
Poll is counted, central coordinate of circle (a, b) is x, the most number of frequency of occurrence in the cumulative array of y;
Using the central coordinate of circle found out as foundation, ask each point in a domain to the distance in the center of circle, if the variance of all radius values is less than Threshold tau then calculates radius of the average value as circle;Otherwise, the mode of data set is set to center of circle radius value R, is had through detection The part circularity of burr exceeds threshold value.
6. a kind of circle plate casting online test method based on machine vision according to claim 1, which is characterized in that lack Fall into the condition of detection preliminary judgement are as follows: according to resulting round matched curve as benchmark model line, by sub-pixel edge profile diagram It is bad for deviating from the endpoint detections of benchmark model line certain distance as in, if continuing apart from being negative value to sample notch Detection label is carried out, if distance is positive value, skips to and sample veining defect is detected.
7. a kind of circle plate casting online test method based on machine vision according to claim 1, which is characterized in that inspection The method that whether there is chips defect in altimetric image, and carry out detection label to it are as follows:
Step 3.1, using OSTU optimal threshold T, binaryzation sample image obtains bianry image;
Step 3.2, the cavity inside opening operation filling bianry image, excludes the interference of false defect;
Step 3.3, gap regions are obtained by cap transformation;
Step 3.4, expansion process is carried out to image using the mode that morphology is serially divided, amplifies gap regions;
Step 3.5, statistical regions area and center point coordinate feature, the code notches on raw sample image, realization are to sample The no judgement for qualified product.
8. a kind of circle plate casting online test method based on machine vision according to claim 1, which is characterized in that right The method that sample veining defect is detected are as follows:
Step 4.1, according to the degree of edge deviation reference line compared with threshold value, if edge deviates degree < threshold value of reference line, Then it is determined as qualified product, if edge deviates degree > threshold value of reference line, follows the steps below;
Step 4.2, exposure mask is established according to resulting basic circle, original image and exposure mask is subjected to logic and operation and obtain burr areas;
Step 4.3, binaryzation is carried out to burr areas, by two-value connected region Edge track, obtains burr profile and with difference Color identifier is measured burr perimeter and area using regionprops operator, is coloured to burr area;
Step 4.4, according to treated image, determine whether current sample needs to finish.
CN201810890880.2A 2018-08-07 2018-08-07 Online detection method for disc castings based on machine vision Active CN109141232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810890880.2A CN109141232B (en) 2018-08-07 2018-08-07 Online detection method for disc castings based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810890880.2A CN109141232B (en) 2018-08-07 2018-08-07 Online detection method for disc castings based on machine vision

Publications (2)

Publication Number Publication Date
CN109141232A true CN109141232A (en) 2019-01-04
CN109141232B CN109141232B (en) 2020-09-25

Family

ID=64791812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810890880.2A Active CN109141232B (en) 2018-08-07 2018-08-07 Online detection method for disc castings based on machine vision

Country Status (1)

Country Link
CN (1) CN109141232B (en)

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109580633A (en) * 2018-11-30 2019-04-05 佛山职业技术学院 A kind of method of plank automatic contacting face production equipment and plank automatic contacting face
CN109622926A (en) * 2019-01-09 2019-04-16 湖南师范大学 A kind of ingot edge detection method towards ingot casting process
CN109900711A (en) * 2019-04-02 2019-06-18 天津工业大学 Workpiece, defect detection method based on machine vision
CN110006911A (en) * 2019-04-19 2019-07-12 天津工业大学 It is a kind of applied to a plurality of scratch detection method in metal surface containing screw
CN110097548A (en) * 2019-05-08 2019-08-06 北华航天工业学院 A kind of drilling defects detection system and its detection method based on machine vision
CN110163853A (en) * 2019-05-14 2019-08-23 广东奥普特科技股份有限公司 A kind of detection method of edge defect
CN110887455A (en) * 2019-11-20 2020-03-17 山东农业大学 Tree electronic altimeter jitter error eliminating method based on mode
CN111062959A (en) * 2019-11-28 2020-04-24 重庆大学 Extraction and characterization method for bottom edge burr cutting characteristics of aviation thin-wall micro-structural part
CN111145154A (en) * 2019-12-25 2020-05-12 西北工业大学 Machine vision-based serial steel wire anti-loosening structure detection method
CN111257348A (en) * 2020-03-27 2020-06-09 河海大学常州校区 LED light guide plate defect detection method based on machine vision
CN111768357A (en) * 2019-03-29 2020-10-13 银河水滴科技(北京)有限公司 Image detection method and device
CN111899296A (en) * 2020-06-24 2020-11-06 广西大学 Method and device for detecting log volume based on computer vision
CN111912846A (en) * 2020-07-13 2020-11-10 苏州亚朴智能科技有限公司 Machine vision-based surface defect and edge burr detection method
CN111982921A (en) * 2020-05-21 2020-11-24 北京安视中电科技有限公司 Hole defect detection method and device, conveying platform and storage medium
CN112304217A (en) * 2020-10-15 2021-02-02 浙江大学台州研究院 Dimension measurement scoring device and scoring method based on machine vision
CN113129268A (en) * 2021-03-19 2021-07-16 江苏航空职业技术学院 Quality detection method for airplane riveting pier head
CN113267139A (en) * 2021-07-19 2021-08-17 江苏中科云控智能工业装备有限公司 Die casting deformation amount detection system with big data analysis
CN113284143A (en) * 2021-07-20 2021-08-20 江苏中科云控智能工业装备有限公司 Die casting deburring precision detection system based on image data processing
CN113379744A (en) * 2021-08-12 2021-09-10 山东大拇指喷雾设备有限公司 Nozzle device surface defect detection method and system based on image processing
CN113740345A (en) * 2021-08-27 2021-12-03 电子科技大学(深圳)高等研究院 Burr detection method and system at high sampling rate
CN113804125A (en) * 2021-09-29 2021-12-17 镇江福坤船舶配件有限公司 Method for inspecting surface linear deviation of propeller shaft bracket casting
CN113916892A (en) * 2021-09-28 2022-01-11 南京理工大学 Multi-view vision-based brake disc gluing defect detection device and method
CN114113112A (en) * 2021-11-29 2022-03-01 哈尔滨工业大学 Surface micro-defect positioning and identifying method based on three-light-source microscope system
CN114998204A (en) * 2022-04-24 2022-09-02 启东亦大通自动化设备有限公司 Self-adaptive adjustment method for processing quality of fisheye gasket
CN115077387A (en) * 2022-08-22 2022-09-20 成都岁生科技有限责任公司 Wedge detection method based on point cloud technology
CN115311291A (en) * 2022-10-12 2022-11-08 南通虎神金属制品有限公司 Cleaning method for hole blockage in hole machining
CN115930833A (en) * 2023-03-13 2023-04-07 山东微晶自动化有限公司 Quality detection and shape correction method for large cavity casting part
CN116385472A (en) * 2023-06-07 2023-07-04 深圳市锦红兴科技有限公司 Hardware stamping part deburring effect evaluation method
CN116523882A (en) * 2023-05-05 2023-08-01 苏州如涵科技有限公司 Vision-based optical target area accuracy detection method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135416A (en) * 2010-12-30 2011-07-27 天津普达软件技术有限公司 Online image detecting system and method for bottle covers
CN105279756A (en) * 2015-10-19 2016-01-27 天津理工大学 Notch circular arc part dimension visual detection method based on self-adapting region division
CN105865344A (en) * 2016-06-13 2016-08-17 长春工业大学 Workpiece dimension measuring method and device based on machine vision
CN106289186A (en) * 2016-09-21 2017-01-04 南京航空航天大学 The airborne visual detection of rotor wing unmanned aerial vehicle and multi-target positioning system and implementation method
CN106404793A (en) * 2016-09-06 2017-02-15 中国科学院自动化研究所 Method for detecting defects of bearing sealing element based on vision
CN106871786A (en) * 2017-03-23 2017-06-20 杭州兆深科技有限公司 A kind of detection method and system for liquid-transfering sucker port

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135416A (en) * 2010-12-30 2011-07-27 天津普达软件技术有限公司 Online image detecting system and method for bottle covers
CN105279756A (en) * 2015-10-19 2016-01-27 天津理工大学 Notch circular arc part dimension visual detection method based on self-adapting region division
CN105865344A (en) * 2016-06-13 2016-08-17 长春工业大学 Workpiece dimension measuring method and device based on machine vision
CN106404793A (en) * 2016-09-06 2017-02-15 中国科学院自动化研究所 Method for detecting defects of bearing sealing element based on vision
CN106289186A (en) * 2016-09-21 2017-01-04 南京航空航天大学 The airborne visual detection of rotor wing unmanned aerial vehicle and multi-target positioning system and implementation method
CN106871786A (en) * 2017-03-23 2017-06-20 杭州兆深科技有限公司 A kind of detection method and system for liquid-transfering sucker port

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张小洁等: "改进的Hough变换在零件圆心定位中的应用", 《机械与电子》 *

Cited By (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109580633A (en) * 2018-11-30 2019-04-05 佛山职业技术学院 A kind of method of plank automatic contacting face production equipment and plank automatic contacting face
CN109622926A (en) * 2019-01-09 2019-04-16 湖南师范大学 A kind of ingot edge detection method towards ingot casting process
CN111768357A (en) * 2019-03-29 2020-10-13 银河水滴科技(北京)有限公司 Image detection method and device
CN111768357B (en) * 2019-03-29 2024-03-01 银河水滴科技(北京)有限公司 Image detection method and device
CN109900711A (en) * 2019-04-02 2019-06-18 天津工业大学 Workpiece, defect detection method based on machine vision
CN110006911A (en) * 2019-04-19 2019-07-12 天津工业大学 It is a kind of applied to a plurality of scratch detection method in metal surface containing screw
CN110006911B (en) * 2019-04-19 2021-07-27 天津工业大学 Method for detecting multiple scratches on metal surface containing screw
CN110097548A (en) * 2019-05-08 2019-08-06 北华航天工业学院 A kind of drilling defects detection system and its detection method based on machine vision
CN110097548B (en) * 2019-05-08 2021-01-15 北华航天工业学院 Drilling defect detection system based on machine vision and detection method thereof
CN110163853A (en) * 2019-05-14 2019-08-23 广东奥普特科技股份有限公司 A kind of detection method of edge defect
CN110887455A (en) * 2019-11-20 2020-03-17 山东农业大学 Tree electronic altimeter jitter error eliminating method based on mode
CN110887455B (en) * 2019-11-20 2021-11-19 山东农业大学 Tree electronic altimeter jitter error eliminating method based on mode
CN111062959A (en) * 2019-11-28 2020-04-24 重庆大学 Extraction and characterization method for bottom edge burr cutting characteristics of aviation thin-wall micro-structural part
CN111145154B (en) * 2019-12-25 2022-04-01 西北工业大学 Machine vision-based serial steel wire anti-loosening structure detection method
CN111145154A (en) * 2019-12-25 2020-05-12 西北工业大学 Machine vision-based serial steel wire anti-loosening structure detection method
CN111257348A (en) * 2020-03-27 2020-06-09 河海大学常州校区 LED light guide plate defect detection method based on machine vision
CN111982921A (en) * 2020-05-21 2020-11-24 北京安视中电科技有限公司 Hole defect detection method and device, conveying platform and storage medium
CN111982921B (en) * 2020-05-21 2023-11-03 北京安视中电科技有限公司 Method and device for detecting hole defects, conveying platform and storage medium
CN111899296A (en) * 2020-06-24 2020-11-06 广西大学 Method and device for detecting log volume based on computer vision
CN111899296B (en) * 2020-06-24 2023-07-25 广西大学 Log volume detection method and device based on computer vision
CN111912846A (en) * 2020-07-13 2020-11-10 苏州亚朴智能科技有限公司 Machine vision-based surface defect and edge burr detection method
CN112304217A (en) * 2020-10-15 2021-02-02 浙江大学台州研究院 Dimension measurement scoring device and scoring method based on machine vision
CN113129268A (en) * 2021-03-19 2021-07-16 江苏航空职业技术学院 Quality detection method for airplane riveting pier head
CN113129268B (en) * 2021-03-19 2023-06-27 江苏航空职业技术学院 Quality detection method for riveting pier head of airplane
CN113267139A (en) * 2021-07-19 2021-08-17 江苏中科云控智能工业装备有限公司 Die casting deformation amount detection system with big data analysis
CN113284143A (en) * 2021-07-20 2021-08-20 江苏中科云控智能工业装备有限公司 Die casting deburring precision detection system based on image data processing
CN113379744A (en) * 2021-08-12 2021-09-10 山东大拇指喷雾设备有限公司 Nozzle device surface defect detection method and system based on image processing
CN113379744B (en) * 2021-08-12 2021-11-19 山东大拇指喷雾设备有限公司 Nozzle device surface defect detection method and system based on image processing
CN113740345B (en) * 2021-08-27 2024-03-22 电子科技大学(深圳)高等研究院 Burr detection method and system under high-speed sampling rate
CN113740345A (en) * 2021-08-27 2021-12-03 电子科技大学(深圳)高等研究院 Burr detection method and system at high sampling rate
CN113916892A (en) * 2021-09-28 2022-01-11 南京理工大学 Multi-view vision-based brake disc gluing defect detection device and method
CN113804125A (en) * 2021-09-29 2021-12-17 镇江福坤船舶配件有限公司 Method for inspecting surface linear deviation of propeller shaft bracket casting
CN114113112A (en) * 2021-11-29 2022-03-01 哈尔滨工业大学 Surface micro-defect positioning and identifying method based on three-light-source microscope system
CN114113112B (en) * 2021-11-29 2023-08-18 哈尔滨工业大学 Surface micro defect positioning and identifying method based on three-light-source microscopic system
CN114998204A (en) * 2022-04-24 2022-09-02 启东亦大通自动化设备有限公司 Self-adaptive adjustment method for processing quality of fisheye gasket
CN115077387B (en) * 2022-08-22 2022-10-28 成都岁生科技有限责任公司 Wedge detection method based on point cloud technology
CN115077387A (en) * 2022-08-22 2022-09-20 成都岁生科技有限责任公司 Wedge detection method based on point cloud technology
CN115311291A (en) * 2022-10-12 2022-11-08 南通虎神金属制品有限公司 Cleaning method for hole blockage in hole machining
CN115930833A (en) * 2023-03-13 2023-04-07 山东微晶自动化有限公司 Quality detection and shape correction method for large cavity casting part
CN116523882A (en) * 2023-05-05 2023-08-01 苏州如涵科技有限公司 Vision-based optical target area accuracy detection method and system
CN116523882B (en) * 2023-05-05 2023-11-24 苏州如涵科技有限公司 Vision-based optical target area accuracy detection method and system
CN116385472A (en) * 2023-06-07 2023-07-04 深圳市锦红兴科技有限公司 Hardware stamping part deburring effect evaluation method
CN116385472B (en) * 2023-06-07 2023-08-08 深圳市锦红兴科技有限公司 Hardware stamping part deburring effect evaluation method

Also Published As

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

Similar Documents

Publication Publication Date Title
CN109141232A (en) A kind of circle plate casting online test method based on machine vision
Martínez et al. Quality inspection of machined metal parts using an image fusion technique
CN109490316A (en) A kind of surface defects detection algorithm based on machine vision
CN109900711A (en) Workpiece, defect detection method based on machine vision
CN105069790A (en) Rapid imaging detection method for gear appearance defect
CN109900719B (en) Visual detection method for blade surface knife lines
CN102441581A (en) Machine vision-based device and method for online detection of structural steel section size
CN108257171A (en) Car radar assembling aperture detection method based on light vision
CN106780526A (en) A kind of ferrite wafer alligatoring recognition methods
WO2019216362A1 (en) Inspection device and inspection method
Fu et al. Medicine glass bottle defect detection based on machine vision
CN117152129B (en) Visual detection method and system for surface defects of battery cover plate
CN111539951B (en) Visual detection method for outline size of ceramic grinding wheel head
Kaushik et al. Machine vision based automated inspection approach for clutch friction disc (CFD)
Zhou et al. Automated detection of surface defects on sphere parts using laser and CDD measurements
CN109916923A (en) A kind of customization plate automatic defect detection method based on machine vision
CN109579735A (en) Piston ring contour detecting method for identifying and classifying and its device based on machine vision
CN114354631A (en) Valve blank surface defect detection method based on vision
CN110189301B (en) Foreign matter detection method for generator stator core steel sheet stacking platform
CN114004812A (en) Threaded hole detection method and system adopting guide filtering and neural network model
Joshi et al. Automated inspection of spur gears using machine vision approach
ChaoJie et al. Intelligent bearing quality checking system based on visual inspection
Schwarzbauer et al. Automated quality inspection of microfluidic chips using morphologic techniques
CN112465784B (en) Metro clamp appearance abnormality detection method
Charles et al. Survey Paper on Visual Inspection of a Mechanical Part using Machine Learning

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