CN104616281A - Distance online detection method applied to double-filament bulb - Google Patents

Distance online detection method applied to double-filament bulb Download PDF

Info

Publication number
CN104616281A
CN104616281A CN201410714177.8A CN201410714177A CN104616281A CN 104616281 A CN104616281 A CN 104616281A CN 201410714177 A CN201410714177 A CN 201410714177A CN 104616281 A CN104616281 A CN 104616281A
Authority
CN
China
Prior art keywords
image
partiald
bulb
formula
gray
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
CN201410714177.8A
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.)
Tianjin Polytechnic University
Original Assignee
Tianjin Polytechnic 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 Tianjin Polytechnic University filed Critical Tianjin Polytechnic University
Priority to CN201410714177.8A priority Critical patent/CN104616281A/en
Publication of CN104616281A publication Critical patent/CN104616281A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention belongs to the image processing and model recognition field and relates to a distance online detection method applied to double-filament bulb. The method can exactly detect the position of the filament and the pin and calculate the distance between the filament and the pin. According to the computer visual principle, the advantage of the hardware system of the contact measuring method and the picture processing method of the non-contact measuring method are combined, the binarization processing, median filtering, contour extracting, ellipse fitting and rotation outer envelope rectangle method is adopted, the threshold value filtering is adjusted to suitable value to exactly obtain the edge and centre of the filament and the pin. The detection method can effectively solve the difficulty that the bulb online detection requirement precision is high and the efficiency is high, the method meets the factory actual demand and the applicability is wide.

Description

A kind of method being applied to the on-line checkingi distance of bilux bulb
Technical field
The present invention relates to a kind of method being applied to the on-line checkingi distance of bilux bulb, in particular, detection method provided by the present invention, can obtain the filament of bilux bulb and the profile of pin and center and the distance between them simultaneously.
Background technology
The quality of bulb determines the performance of car light, have important meaning, and the parameters of the size of filament bulb and filament determines the quality of bulb for traffic safety.The dimensional requirement of all kinds of filament bulb is specify that, the restriction of filament shape, length and location and measuring condition thereof in standard GB/T 15766.1-2008 " road vehicle bulb sizes, photoelectric properties require ".This just requires that bulb manufacturing enterprise needs to solve the detectability of self, improves the quality of products, meets national standard.Therefore, technology and assembling by improving inspection promote the problem that China's bulb quality has become extremely urgent.
The detection method of current bilux bulb mainly contains the measuring method of contact and contactless measuring method.
For the measuring method of contact, more influential have following method: the people such as the Ji Yinhua of light fixture research institute of Shanghai Automotive Vehicle Inspection Center by realizing accurately, efficiently locating in measuring process, develop the bulb fixture meeting standard and accuracy requirement, improve the detectability of serial bulb; The Qian Xiaolin of Shanghai Automotive Vehicle Inspection Center is discussed in detail the dimensional measurement of H7 bulb and the method for Set and Positioning according to the regulation in GB15766.1-2008; The Zhang Guocheng that country's light industry electric light source products quality supervision detects station, Baoji by the testing apparatus that uses unit clamp and large projector and form according in GB15766.1 to the requirement that H4 bulb accessory size is measured, propose a kind of calibration steps for H4 bulb Size Measuring System.This several method is all the measuring method using contact, and by using special survey instrument, the lamp envelope design for each model goes out detailed measuring method, and its specific aim had is stronger.But, because often kind of measuring system and measuring method all design for the bulb of concrete model, reduce the scope of application of measuring system and the speed of detection, the while that the testing requirement in industrial production line cannot being met, because bulb skin is glassware, use the measuring method of contact, easily make bulb break, wearing and tearing etc.
For contactless measuring method, more influential also have following method: the people such as the Tang Yanli of Mechanical Engineering College of Xi'nan Communication Univ. propose in conjunction with modern digital image processing and vision measuring method, adopts contactless measurement to carry out range observation; The people such as the big vast great waves of Shanghai Communications University's information detection technology and instrument system have summed up a set of edge detection algorithm with practicality, can realize some difficult automatic measurement of surveying parameter (small aperture and hole heart distance as sheet part) in geometric measurement; The people such as the Zhang Shaojun of Malchinery College of Beijing Science & Tech. Univ. have inquired into the method utilizing digital image processing techniques to carry out physical dimension measurement.This several method describes the application of image processing techniques in dimensional measurement respectively, can find out the comparative maturity that image processing techniques has developed in this field.But these image processing techniquess are not all applied to the on-line checkingi aspect of workpiece, be the complicacy due to wherein involved algorithm on the one hand, cause on-line checkingi can not accomplish the requirement detected in real time; On the other hand due to the restriction of hardware facility, cause the obtained precision of images not high, have impact on the precision of detection.
The online distance detection method of the present invention's design, puts forward to solve the problem just.In integrated exposure formula measuring method, the advantage of hardware system and the algorithm of contactless measurement image procossing have built a set of filament bulb size detecting system, use C++ Software for Design simultaneously, popular image processing algorithm is at present used to process the bulb image collected, well calculate filament bulb specifications parameter, solve bulb online detection requirements high precision, high efficiency difficult point, meet factory's actual demand, application is extensive.
Summary of the invention
The invention provides a kind of fast, the bilux bulb on-line checkingi distance method based on image of reliable, practical, simple operation, the method can be applied to the distance detecting filament and pin in bilux bulb, effectively can solve factory's actual production demand.
Described bilux bulb on-line checkingi distance method to be applicable in bilux bulb in filament and pin distance detection device, its hardware system schematic diagram as shown in Figure 1, its by parallel light system, ccd image acquisition system, low angle illuminator, at the uniform velocity kinematic train to form, and utilize original image needed for this system acquisition subsequent treatment, recycle corresponding image processing software and complete image procossing, as shown in Figure 2, Detailed operating procedures is as follows for its image procossing schematic diagram:
Step 1: after using the bulb image on CCD camera acquisition stream waterline, for this image, background and target two class can be divided into, wherein the gray-scale value harmony of background and target interior pixels is separately high, corresponding variance is little, and harmony between background and target is minimum, and corresponding variance is maximum.Based on this principle, the gray level of image is M, and gray-scale value is the pixel number of i is n i, gray-scale value normalization is carried out to image, obtains the probability P that gray-scale value is the pixel appearance of i i:
P i = n i M - - - ( 1 )
If segmentation threshold is t, gray scale is divided into two classes, a class is called A, and a class is called B, and the probability that A occurs is w 0, average gray is μ 0, the probability that B occurs is w 1, average gray is μ 1, then:
w 0 = Σ t = 0 t P i , w 1 = Σ i = t + 1 M - 1 P i - - - ( 2 )
μ 0 = μ ( t ) w 0 , μ 1 = μ T ( t ) 1 - w 0 - - - ( 3 )
Wherein:
μ ( t ) = Σ t = 0 t i * P i , μ T ( t ) = Σ i = t + 1 M - 1 i * P i - - - ( 4 )
Then inter-class variance σ is defined as:
σ 2=w 0*(μ 0T) 2+w 1*(μ 0T) 2(5)
Increase progressively according to the sequential loop of gray-scale value from 1 to M, search for each gray-scale value in whole gray level, find and make described σ 2threshold values t time maximum, then above-mentioned threshold values t is exactly the threshold value that will find.Adopt and in this way the image after binaryzation is carried out as shown in Fig. 4 (a) to Fig. 3.As can be seen from Fig. 4 (a), the edge showing filament and pin that the image after binaryzation can be more clearly, but still there is a large amount of noises.
Step 2: for ease of the extraction of pin afterwards and filament, need to carry out filtering process to Fig. 4 (a), disturb with stress release treatment.Sort according to the size of pixel value to the image of obtained M*N, what generate monotone increasing (or decline) is 2-D data sequence.Two dimension median filter output valve can be expressed as:
g(x,y)=med{f(x-k,y-l),(k,l∈W)} (6)
Wherein, f (x, y), f (x-k, y-l) coordinate points in described image and the coordinate points of the coordinate points in described image in W template scope is respectively, g (x, y) be the coordinate points of described image after two dimension median filter in image, W is two dimension pattern plate, and k is the lateral dimension of template W, and l is the vertical dimension of template W, med is with f (x, y) centered by, template W overlap in the intermediate value of pixel gray scale in scope, filtered image is as shown in Fig. 4 (b).
Step 3: because the filament that will obtain and pin portion are the regional ensembles having some to be interconnected, so use the contour extraction method of eight neighborhood search procedure to obtain all connected regions comprised in the region obtained after medium filtering.To the profile that Fig. 4 (b) obtains as shown in Figure 5 after contours extract.
Step 4: as seen from Figure 5, the image after contours extract contains a large amount of unwanted profile, next carries out matching by the method for fitted ellipse to the ellipse in profile.The present invention adopts the measure based on geometric distance to carry out ellipse fitting.Suppose that oval equation is such as formula shown in (7), in order to avoid null solution, some restrictions carried out, if constraint condition is such as formula shown in (8) to the parameter of ellipse:
Ax 2+Bxy+Cy 2+Dx+Ey+F=0 (7)
A+C=1 (8)
Obviously the discrete point after directly utilizing equation (7) and (8) edge to detect carries out least square process, can obtain the numerical value of a parameter in equation, namely ask the minimum value of formula (9).
f ( A , B , C , D , E , F ) = Σ i = 1 n ( Ax i 2 + Bx i y i + Cy i 2 + Dx i + Ey i + F ) 2 - - - ( 9 )
Wherein, A, B, C, D, E, F are the every coefficient of ellipse formula, (x i, y i) be any coordinate in ellipse;
By extremum principle, the value of f (A, B, C, D, E, F) be made minimum, must local derviation be had:
∂ f ∂ A = ∂ f ∂ B = ∂ f ∂ C = ∂ f ∂ D = ∂ f ∂ E = ∂ f ∂ F = 0 - - - ( 10 )
A system of linear equations can be obtained by formula (10), re-use the method for solve linear equations, in conjunction with constraint condition, each coefficient of equation can be solved, and then the centre coordinate of each ellipse can be tried to achieve.The image shown in Fig. 6 (a) can be obtained after ellipse fitting to the profile that Fig. 5 obtains.
Step 5: because the shape of filament is close to the shape of rectangle, the shape of pin is close to the shape of ellipse, so the distance in order to better navigate to filament and pin, the present invention uses the method rotating external envelope rectangle to process Fig. 6 (a).The profile that Fig. 6 (a) detects can be regarded as and to be made up of multiple polygon.For the convex polygon of any one, its enclosure rectangle has at least the polygonal a certain bar limit of a limit and this to overlap.For the polygon shown in Fig. 7 (a), after over-rotation, obtain Fig. 7 (b).Its rotation angle α can be obtained by following formula:
If the coordinate of a point is (x 1, y 1), the coordinate of b point is (x 2, y 2), then
α = arctan y 1 - y 2 x 1 - x 2 - - - ( 11 )
Rotating polygon needs the point all to polygon to rotate, and its rotation formula can be obtained by formula (11).
x ′ 1 y ′ 1 · · · · · · x ′ i y ′ i · · · · · · x ′ n y ′ n = x 1 y 1 · · · · · · x i y i · · · · · · x n y n × cos α sin α - sin α cos α - - - ( 12 )
Formula (12) is the computing formula that the polygon being rotation center with initial point (0,0) is rotated counterclockwise, wherein, and (x i, y i) be rotate the coordinate points in front image, (x ' i, y ' i) be coordinate points in rotated image, with this formula, suppose known rotation center o (x 0, y 0), treat point of rotation A (x, y), rotated counterclockwise by angle α, postrotational point is B (x ', y ').
x′=x 0+(x-x 0)*cosθ+(y-y 0)*sinθ (13)
y′=y 0+(x-y 0)*cosθ-(y-y 0)*sinθ (14)
Convex-edge shape asks the enclosure rectangle of its horizontal level can obtain its rotation enclosure rectangle after rotating, for concave polygon, first concave point and two straight lines adjacent with concave point can be removed, then 2 points are connected, can convex polygon be converted into, after the process of rotation enclosure rectangle is carried out to image, just obtain Fig. 6 (b).
Step 6: as can be seen from Fig. 6 (a) and Fig. 6 (b), through ellipse fitting and after there is a lot of incoherent ellipse and rectangle in the image that obtains.Estimate the pixel size at filament and pin place place, arrange suitable threshold value, excessive and too small ellipse and rectangle are carried out filtering, the later image of filtering as shown in Figure 8.
Step 7: through the process of above algorithm, can extract profile and the center of light bulb filament and pin accurately, and can determine distance between the two by the centre coordinate of filament and pin, so far, image procossing terminates.
Accompanying drawing explanation
Fig. 1: bilux bulb on-line detecting system schematic diagram
Fig. 2: bilux bulb image processing flow figure
Fig. 3: the bulb image that CCD camera obtains
Fig. 4: the binary image before and after filtering
Image before (a) medium filtering
Image after (b) medium filtering
Fig. 5: the image after contours extract
Fig. 6: the image that ellipse fitting obtains
The image of a all ellipses that () matching obtains
B image that () obtains after rotating external envelope rectangle
Fig. 7: any one convex polygon
(a) former convex polygon
(b) convex polygon after the process of over-rotation enclosure rectangle
Fig. 8: the image after the unnecessary ellipse of filtering and rectangle
Embodiment
The invention provides a kind of fast, the bilux bulb on-line checkingi distance method based on image of reliable, practical, simple operation, the method can be applied to the distance detecting filament and pin in bilux bulb, effectively can solve factory's actual production demand.
Described bilux bulb on-line checkingi distance method to be applicable in bilux bulb in filament and pin distance detection device, its hardware system schematic diagram as shown in Figure 1, its by parallel light system, ccd image acquisition system, low angle illuminator, at the uniform velocity kinematic train to form, and utilize original image needed for this system acquisition subsequent treatment, recycle corresponding image processing software and complete image procossing, as shown in Figure 2, Detailed operating procedures is as follows for its image procossing schematic diagram:
Step 1: after using the bulb image on CCD camera acquisition stream waterline, for this image, background and target two class can be divided into, wherein the gray-scale value harmony of background and target interior pixels is separately high, corresponding variance is little, and harmony between background and target is minimum, and corresponding variance is maximum.Based on this principle, for described image, gray level is M, and gray level is the pixel number of i is n i, gray-scale value is normalized, obtains the probability that gray level is the pixel appearance of i:
P i = n i M - - - ( 1 )
If segmentation threshold is t, gray scale is divided into two classes, the probability that a class to be A mono-class be B, A occurs is w 0, average gray is μ 0, the probability that B occurs is w 1, average gray is μ 1, then:
w 0 = Σ t = 0 t P i , w 1 = Σ i = t + 1 M - 1 P i - - - ( 2 )
μ 0 = μ ( t ) w 0 , μ 1 = μ T ( t ) 1 - w 0 - - - ( 3 )
Wherein:
μ ( t ) = Σ t = 0 t i * P i , μ T ( t ) = Σ i = t + 1 M - 1 i * P i - - - ( 4 )
Then inter-class variance is defined as:
σ 2=w 0*(μ 0T) 2+w 1*(μ 0T) 2(5)
Increase progressively according to the sequential loop from 1 to M and search for each gray-scale value in whole gray level, can σ be made 2maximum threshold values t is exactly the threshold value that will find.Adopt and in this way the image after binaryzation is carried out as shown in Fig. 4 (a) to Fig. 3.As can be seen from Fig. 4 (a), the edge showing filament and pin that the image after binaryzation can be more clearly, but still there is a large amount of noises.
Step 2: for ease of the extraction of pin afterwards and filament, need to carry out filtering process to Fig. 4 (a), disturb with stress release treatment.Sort according to the size of pixel value to the image of obtained M*N, what generate monotone increasing (or decline) is 2-D data sequence.Two dimension median filter output valve can be expressed as:
g(x,y)=med{f(x-k,y-l),(k,l∈W)} (6)
Wherein, f (x, y), g (x, y) coordinate points in original image and the coordinate points in the rear image of process is respectively, W is two dimension pattern plate, and k is the lateral dimension of template W, and l is the vertical dimension of template W, mea is with f (x, y) centered by, template W overlap in the intermediate value of pixel gray scale in scope, filtered image is as shown in Fig. 4 (b).
Step 3: because the filament that will obtain and pin portion are the regional ensembles having some to be interconnected, so use the contour extraction method of eight neighborhood search procedure to obtain all connected regions comprised in the region obtained after medium filtering.To the profile that Fig. 4 (b) obtains as shown in Figure 5 after contours extract.
Step 4: as seen from Figure 5, the image after contours extract contains a large amount of unwanted profile, next carries out matching by the method for fitted ellipse to the ellipse in profile.The present invention adopts the measure based on geometric distance to carry out ellipse fitting.Suppose that oval equation is such as formula shown in (7), in order to avoid null solution, some restrictions carried out, if constraint condition is such as formula shown in (8) to the parameter of ellipse:
Ax 2+Bxy+Cy 2+Dx+Ey+F=0 (7)
A+C=1 (8)
Obviously the discrete point after directly utilizing equation (7) and (8) edge to detect carries out least square process, can obtain the numerical value of a parameter in equation, namely ask the minimum value of formula (9).
f ( A , B , C , D , E , F ) = Σ i = 1 n ( Ax i 2 + Bx i y i + Cy i 2 + Dx i + Ey i + F ) 2 - - - ( 9 )
Wherein, A, B, C, D, E, F are the every coefficient of ellipse formula, (x i, y i) be any coordinate in ellipse;
By extremum principle, the value of f (A, B, C, D, E, F) be made minimum, must local derviation be had:
∂ f ∂ A = ∂ f ∂ B = ∂ f ∂ C = ∂ f ∂ D = ∂ f ∂ E = ∂ f ∂ F = 0 - - - ( 10 )
A system of linear equations can be obtained by formula (10), re-use the method for solve linear equations, in conjunction with constraint condition, each coefficient of equation can be solved, and then the centre coordinate of each ellipse can be tried to achieve.The image shown in Fig. 6 (a) can be obtained after ellipse fitting to the profile that Fig. 5 obtains.
Step 5: because the shape of filament is close to the shape of rectangle, the shape of pin is close to the shape of ellipse, so the distance in order to better navigate to filament and pin, the present invention uses the method rotating external envelope rectangle to process Fig. 6 (a).The profile that Fig. 6 (a) detects can be regarded as and to be made up of countless multiple polygon.For the convex polygon of any one, its enclosure rectangle has at least the polygonal a certain bar limit of a limit and this to overlap.For the polygon shown in Fig. 7 (a), after over-rotation, obtain Fig. 7 (b).Its rotation angle α can be obtained by following formula:
If the coordinate of a point is (x 1, y 1), the coordinate of b point is (x 2, y 2), then
α = arctan y 1 - y 2 x 1 - x 2 - - - ( 11 )
Rotating polygon needs the point all to polygon to rotate, and its rotation formula can be obtained by formula (11).
x ′ 1 y ′ 1 · · · · · · x ′ i y ′ i · · · · · · x ′ n y ′ n = x 1 y 1 · · · · · · x i y i · · · · · · x n y n × cos α sin α - sin α cos α - - - ( 12 )
Formula (12) is the computing formula that the polygon being rotation center with initial point (0,0) is rotated counterclockwise, wherein, and (x i, y i) be rotate the coordinate points in front image, (x ' i, y ' i) be coordinate points in rotated image, with this formula, suppose known rotation center 0 (x 0, y 0), treat point of rotation A (x, y), rotated counterclockwise by angle α, postrotational point is B (x ', y ').
x′=x 0+(x-x 0)*cosθ+(y-y 0)*sinθ (13)
y′=y 0+(x-y 0)*cosθ-(y-y 0)*sinθ (14)
Convex-edge shape asks the enclosure rectangle of its horizontal level can obtain its rotation enclosure rectangle after rotating, for concave polygon, first concave point and two straight lines adjacent with concave point can be removed, then 2 points are connected, can convex polygon be converted into, after the process of rotation enclosure rectangle is carried out to image, just obtain Fig. 6 (b).
Step 6: as can be seen from Fig. 6 (a) and Fig. 6 (b), through ellipse fitting and after there is a lot of incoherent ellipse and rectangle in the image that obtains.Estimate the pixel size at filament and pin place place, arrange suitable threshold value, excessive and too small ellipse and rectangle are carried out filtering, the later image of filtering as shown in Figure 8.
Step 7: through the process of above algorithm, can extract profile and the center of light bulb filament and pin accurately, can determine distance between the two by the centre coordinate of filament and pin.
In sum, the advantage of the method for bilux bulb on-line checkingi distance of the present invention is:
(1) native system adopts contactless measuring method, overcomes shortcoming too strict to hardware requirement in contact measurement method, and whole detection system structure is simple, and convenient installation, can be widely used in on-line detecting system;
(2) software section of native system adopts the rudimentary algorithm of machine vision and image procossing, solves bulb online detection requirements high precision, high efficiency difficult point;
(3) native system adopts CCD camera measuring targets to carry out the Real-time Collection of image, and the position of measuring targets does not have strict requirement, without the need to fixing object under test, can not cause wearing and tearing to examined object.
Schematically above be described the present invention and embodiment thereof, this description does not have limitation, yet just one of the embodiments of the present invention shown in accompanying drawing.So; if those of ordinary skill in the art enlightens by it; when not departing from the invention aim; adopt each component layouts mode of the same item of other form or other form; design the technical scheme similar to this technical scheme and embodiment without creationary, all should protection scope of the present invention be belonged to.

Claims (1)

1. be applied to a method for the on-line checkingi distance of bilux bulb, it is characterized in that, comprise the following steps:
Step 1: use the bulb image on CCD camera acquisition stream waterline, the gray level of described bulb image is M, and gray-scale value is the pixel number of i is n i, gray-scale value normalization is carried out to described bulb image, obtains the probability P that gray-scale value is the pixel appearance of i i:
P i = n i M - - - ( 1 )
If segmentation threshold is t, gray scale is divided into two classes, a class is called A, and a class is called B, and the probability that A occurs is w 0, average gray is μ 0, the probability that B occurs is w 1, average gray is μ 1,then:
w 0 = Σ i = 0 t P i , w 1 = Σ i = t + 1 M - 1 P i - - - ( 2 )
μ 0 = μ ( t ) w 0 , μ 1 = μ T ( t ) 1 - w 0 - - - ( 3 )
Wherein:
μ ( t ) = Σ i = 0 t i * P i , μ T ( t ) = Σ i = t + 1 M - 1 i * P i - - - ( 4 )
Then inter-class variance σ is defined as:
σ 2=w 0*(μ 0T) 2+w 1*(μ 0T) 2(5)
Increase progressively according to the sequential loop of gray-scale value from 1 to M, search for each gray-scale value in whole gray level, find and make σ 2threshold values t time maximum, then described threshold values t is exactly the threshold value that will find, and adopts and carries out binary conversion treatment to image in this way;
Step 2: the image obtained after step 1 processes is sorted according to the size of pixel value, generate the 2-D data sequence of monotone increasing, two dimension median filter output valve can be expressed as:
g(x,y)=med{f(x-k,y-l),(k,l)∈W)} (6)
Wherein, f (x, y) is the coordinate points in described bulb image, f (x-k, y-l) be the coordinate points of the coordinate points in described bulb image in W template scope, g (x, y) is the coordinate points of described bulb image after two dimension median filter in image, W is two dimension pattern plate, k is the lateral dimension of template W, and l is the vertical dimension of template W, and med is with f (x, y) centered by, the intermediate value of pixel gray scale in template W institute coverage;
Step 3: use eight neighborhood search procedure to carry out contours extract to the image obtained after step 2 processes, to obtain after medium filtering obtain all connected regions of comprising in region;
Step 4: adopt the least square method based on geometric distance to carry out ellipse fitting, oval equation is such as formula shown in (7), and in order to avoid null solution, limit the parameter of ellipse, constraint condition is such as formula shown in (8):
Ax 2+Bxy+Cy 2+Dx+Ey+F=0 (7)
A+C=1 (8)
Obviously the discrete point after directly utilizing equation (7) and (8) edge to detect carries out least square process, can obtain the numerical value of each parameter in equation, namely ask the minimum value of formula (9);
f ( A , B , C , D , E , F ) = Σ i = 1 n ( Ax i 2 Bx i y i + Cy i 2 + Dx i + Ey i + F ) 2 - - - ( 9 )
Wherein, A, B, C, D, E, F are the every coefficient of ellipse formula, (x i, y i) be any coordinate in ellipse;
By extremum principle, the value of f (A, B, C, D, E, F) be made minimum, must local derviation be had:
∂ f ∂ A = ∂ f ∂ B = ∂ f ∂ C = ∂ f ∂ D = ∂ f ∂ E = ∂ f ∂ F = 0 - - - ( 10 )
A system of linear equations can be obtained by formula (10), re-use the method for solve linear equations, in conjunction with constraint condition, each coefficient of equation can be solved, said method process is carried out to the image obtained after step 3 processes, and then the centre coordinate of each ellipse can be tried to achieve;
Step 5: use the method rotating external envelope rectangle to process the image obtained after step 4 processes, the profile that step 4 detects can be regarded as and to be made up of multiple polygon, described multiple polygons are made up of convex polygon and concave polygon, for a convex polygon in described multiple polygons, the enclosure rectangle of described convex polygon has a limit to overlap with a limit of described convex polygon, and the rotation angle α before and after rotation can be obtained by formula (11):
Get 2 points in described convex polygon, a point and b point, the coordinate of described a point is (x 1, y 1), the coordinate of described b point is (x 2, y 2), then:
α = arctan y 1 - y 2 x 1 - x 2 - - - ( 11 )
Rotate described convex polygon, need to rotate all points of described convex polygon, its rotation formula can be obtained by formula (12);
x ′ 1 y ′ 1 . . . . . . x ′ i y ′ i . . . . . . x ′ n y ′ n = x 1 y 1 . . . . . . x i y i . . . . . . x n y n × cos α sin α - sin α cos α - - - ( 12 )
Formula (12) is the computing formula that the polygon being rotation center with initial point (0,0) is rotated counterclockwise, wherein, and (x i, y i) be rotate the coordinate points in front image, (x ' i, y ' i) be coordinate points in rotated image, with this formula, suppose known rotation center o (x 0, y 0), treat point of rotation A (x, y), rotated counterclockwise by angle α, postrotational point is B (x ', y ');
x′=x 0+(x-x 0)*cosα+(y-y 0)*sinα (13)
y′=y 0+(x-y 0)*cosα-(y-y 0)*sinα (14)
Described convex polygon asks the enclosure rectangle of the horizontal level of described convex polygon can obtain the rotation enclosure rectangle of described convex polygon after rotating; For concave polygon, first concave point and two straight lines adjacent with concave point can be removed, then connect 2 points, can convex polygon be converted into, thus the process of rotation enclosure rectangle is carried out to image;
Step 6: according to the filament of bulb and the pixel size at pin place place, threshold value is set, excessive and too small ellipse and rectangle are carried out filtering;
Step 7: through the process of above algorithm, can extract the filament of described bulb and the profile of pin and center accurately, can determine distance between the two by the centre coordinate of described filament and described pin;
So far, the method for the on-line checkingi distance of bilux bulb terminates.
CN201410714177.8A 2014-11-28 2014-11-28 Distance online detection method applied to double-filament bulb Pending CN104616281A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410714177.8A CN104616281A (en) 2014-11-28 2014-11-28 Distance online detection method applied to double-filament bulb

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410714177.8A CN104616281A (en) 2014-11-28 2014-11-28 Distance online detection method applied to double-filament bulb

Publications (1)

Publication Number Publication Date
CN104616281A true CN104616281A (en) 2015-05-13

Family

ID=53150714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410714177.8A Pending CN104616281A (en) 2014-11-28 2014-11-28 Distance online detection method applied to double-filament bulb

Country Status (1)

Country Link
CN (1) CN104616281A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105181704A (en) * 2015-08-26 2015-12-23 浙江江山三友电子有限公司 Lamp-filament bepowdering quality real-time detection method
CN106504219A (en) * 2016-11-04 2017-03-15 中国公路工程咨询集团有限公司 Constrained path morphology high-resolution remote sensing image road Enhancement Method
CN107063126A (en) * 2016-10-08 2017-08-18 天津工业大学 A kind of method of online dimensional measurement applied to Vehicular lamp bulb
CN108534802A (en) * 2018-04-28 2018-09-14 中国计量大学 Pipe bubble based on image processing techniques deviates measuring method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105181704A (en) * 2015-08-26 2015-12-23 浙江江山三友电子有限公司 Lamp-filament bepowdering quality real-time detection method
CN107063126A (en) * 2016-10-08 2017-08-18 天津工业大学 A kind of method of online dimensional measurement applied to Vehicular lamp bulb
CN107063126B (en) * 2016-10-08 2019-05-03 天津工业大学 A method of the online dimensional measurement applied to Vehicular lamp bulb
CN106504219A (en) * 2016-11-04 2017-03-15 中国公路工程咨询集团有限公司 Constrained path morphology high-resolution remote sensing image road Enhancement Method
CN106504219B (en) * 2016-11-04 2019-07-12 中国公路工程咨询集团有限公司 Constrained path morphology high-resolution remote sensing image road Enhancement Method
CN108534802A (en) * 2018-04-28 2018-09-14 中国计量大学 Pipe bubble based on image processing techniques deviates measuring method
CN108534802B (en) * 2018-04-28 2023-03-14 中国计量大学 Tube level bubble deviation measurement method based on image processing technology

Similar Documents

Publication Publication Date Title
CN107341802B (en) Corner sub-pixel positioning method based on curvature and gray scale compounding
CN105066915B (en) Mould camber processing error and surface roughness On-machine Test device and detection method
CN104050446B (en) Meter pointer image identification method based on pointer width character
CN103295232B (en) Based on the SAR image registration method in straight line and region
CN106204610A (en) Peg-in-hole assembly automatic centering system based on image procossing
CN104616281A (en) Distance online detection method applied to double-filament bulb
CN108986082A (en) A kind of profile of steel rail detection method and system based on EPNP
CN103727930A (en) Edge-matching-based relative pose calibration method of laser range finder and camera
CN111047588A (en) Imaging measurement method for size of shaft type small part
CN110108712A (en) Multifunctional visual sense defect detecting system
CN113706537A (en) Irregular workpiece detection method based on machine vision
CN103913166B (en) A kind of punctate opacity of the cornea extracting method based on Energy distribution
CN109993154A (en) The lithium sulfur type instrument intelligent identification Method of substation's simple pointer formula
CN104613869A (en) Method and system for detecting elliptical hole group based on maximum inscribed circle
CN106875441A (en) A kind of online PE bottles of recognition positioning method based on machine vision
CN108582075A (en) A kind of intelligent robot vision automation grasping system
CN108986160A (en) A kind of image laser center line extraction method containing specular light interference
CN106813569A (en) A kind of automobile tire 3-D positioning method based on line-structured light
CN114485433A (en) Three-dimensional measurement system, method and device based on pseudo-random speckles
Zhao et al. Design of real-time steel bars recognition system based on machine vision
CN114022441A (en) Defect detection method for irregular hardware
CN104236866A (en) Automobile headlamp test data error correction method based on driving direction
CN111553345B (en) Method for realizing meter pointer reading identification processing based on Mask RCNN and orthogonal linear regression
CN205786374U (en) Special-shaped stamping parts profile defects vision detection system based on coupling
CN104748684A (en) Visual detection method and device for crankshaft shoulder back chipping

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150513