CN105160644A - Method for positioning center of crisscross image in CCD image measurement system - Google Patents
Method for positioning center of crisscross image in CCD image measurement system Download PDFInfo
- Publication number
- CN105160644A CN105160644A CN201510633287.6A CN201510633287A CN105160644A CN 105160644 A CN105160644 A CN 105160644A CN 201510633287 A CN201510633287 A CN 201510633287A CN 105160644 A CN105160644 A CN 105160644A
- Authority
- CN
- China
- Prior art keywords
- image
- pixel
- cross
- center
- crisscross
- 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
Links
Landscapes
- Image Analysis (AREA)
Abstract
The invention provides a method for positioning the center of a crisscross image in a CCD image measurement system. The method comprises the following steps: (1) obtaining gray data distribution I (i,j) of a frame of crisscross image; (2) quickly positioning a pixel-level center position (x1,y1) of the crisscross image with a crisscross image feature method; (3) performing smooth filtration preprocessing on part of the image near the position (x1,y1); (4) for the preprocessed image, calculating N groups of center-of-mass coordinate points along transverse and longitudinal coordinate axes by adopting a centroid algorithm with a threshold value; and (5) performing linear fitting on the center-of-mass coordinate points in the step (4) with a least square method, fitting out two straight lines, and finally calculating sub-pixel-level center position coordinates (x0,y0) of the crisscross image according to the fitted-out two straight lines. The method only selects part of image data in the crisscross image for calculation, and has the characteristics of small calculation amount, low system resource cost, quickness and simplicity for positioning and high timeliness and applicability while meeting positioning precision requirements.
Description
Technical field
The present invention relates to a kind of image measuring method based on computer vision technique, particularly cross inconocenter localization method in a kind of CCD image measurement system.
Background technology
The position detection and location of cross inconocenter are vital technology in optical measurement, the detection meanss such as laser collimator, Digital Optoelectronic Autocollimator, spirit-leveling instrument calibrating instrument i angular measurement.Precision and the speed of usual detection and location algorithm directly affects final positioning precision and speed.Therefore, the centre coordinate extracting cross picture quickly and accurately has important impact for the overall performance of said system, particularly for real time dynamic measurement, under the prerequisite ensureing center positioning precision, the complexity of method and efficiency just seem particularly important.
Along with the development of measuring technique, higher requirement be it is also proposed to corresponding measurement and positioning precision, Pixel-level precision cannot meet the demand of actual measurement, need to adopt more high-precision Measurement Algorithm, measuring accuracy is made to reach 1/tens pixels even higher, as sub-pixel Measurement Algorithm, thus the measuring accuracy of system is greatly enhanced.
The orientation problem of cross inconocenter position, conventional algorithm has method of interpolation, grey scale centre of gravity method, data fitting algorithms, correlation method etc., these algorithms are simple and positioning precision is higher, 0.2--0.5 pixel can be reached, but can only the moderate image of processing target surface area, and comparatively large by noise, when signal noise ratio (snr) of image is less, its positioning error will become larger.
In addition, because traditional edge detection method (Sobel operator, Roberts operator, Prewitt operator etc.) processes whole image, not only operand is large, and owing to often needing selected threshold, and choosing of threshold value is very easily subject to noise, and then rim detection effect can be had a strong impact on.
Therefore, invent that a kind of locating speed is fast, precision is high and the cross inconocenter location measurement method that applicability is stronger has great importance and actual application value.
Summary of the invention
The object of the invention is for the cross image in CCD image measurement system, propose a kind of meet while measuring accuracy requires can the method for quick position cross inconocenter position, it is by analyzing the essential characteristic of cross image, the a small amount of image gradation data in computing local can go out centre coordinate position by quick position, its calculated amount is little, computing velocity is fast, make the simple resource also greatly saving system of software simulating, there is the feature that positioning precision is high, applicability is strong simultaneously.
The object of the present invention is achieved like this:
Cross inconocenter localization method in a kind of CCD image measurement system, comprises the following steps:
A: the intensity profile I (i, j) obtaining a frame cross image;
B: based on cross image characteristic method, the Pixel-level center (x of quick position cross picture
1, y
1);
C: according to Pixel-level center (x
1, y
1), to j ∈ [y on line direction
1-30, y
1-50] and j ∈ [y
1+ 30, y
1+ 50], i ∈ [x
1-50, x
1+ 50] the image employing mould in region is the smoothing filter preprocessing of gaussian filtering template of 3, and column direction in like manner;
D: to pretreated image, adopts the centroid algorithm of band threshold value respectively to calculate N=40 group center-of-mass coordinate point in abscissa axis direction and axis of ordinates direction respectively;
E: adopt least square method to carry out fitting a straight line to abscissa axis direction and ordinate axial N=40 group center-of-mass coordinate point respectively, final two straight lines according to simulating calculate, and obtain the sub-pixel center position coordinates (x of cross picture
0, y
0).
Beneficial effect of the present invention is:
1, the method is not the method adopting traditional point by point search to calculate to the data point in image, but by a small amount of relevant gradation data in local in process image, cross inconocenter position coordinates can be accurately calculated, its computation process is simple, processing speed is fast, real-time, extremely be convenient to hardware, software simulating, greatly can save the resource of system;
2, positioning precision is higher, can reach 1/60 pixel in the more uniform situation of cross picture distribution about;
3, by introducing Image semantic classification link, can noise spot effectively in filtering image, anti-interference is stronger; When cross picture is in image border, still can accurately orient its center position coordinates fast.
4, applicability is strong.
Accompanying drawing explanation
Fig. 1 is cross inconocenter position measurement positioning flow figure in the present invention;
Fig. 2 is the image schematic diagram containing cross picture of measurement to be positioned in the present invention;
Fig. 3 is the cross image coordinate system schematic diagram defined in the present invention;
Fig. 4 is cathetus fitting result schematic diagram of the present invention.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further details.
Fig. 1 is cross inconocenter position measurement positioning flow figure in the present invention.Fig. 2 is the cross image usually obtained.When carrying out cross image process, the useful region of image is only two bright lines and peripheral part thereof, and the brightness of bright line core is maximum, and this processes the information required for calculating exactly.According to this feature, the concrete grammar of location, its center is:
(1) the original image intensity profile I (i, j) that a frame contains cross picture is obtained; Set up two-dimensional coordinate system as shown in Figure 3 to this image, initial point, in the upper left corner, is to the right that x-axis is forward and reverse, and being also abscissa axis positive dirction, is y-axis positive dirction downwards, is also axis of ordinates positive dirction.
(2) adopt mould be 3 gaussian filtering template to original image distribute I (i, j) K (K=10) row carry out smothing filtering pre-service; If the row gray scale vector in original image I (i, j) is f, carrying out the vector of the gray scale after gaussian filtering process is g, and sets the gray-scale value of respective pixel before and after filtering as f (i), g (i):
g(i)=[f(i-1)+2f(i)+f(i+1)]/4(1)
(3) gray areas segmentation is carried out to gray scale vector g; Setting threshold value T
1, T
2(T
1<T
2), g<T
1for background area, be designated as S
0, g>T
2for target area, be designated as S
1, T
1<g<T
2for edge transition region is designated as S
2.If maximal value is MXG in gray scale vector g, minimum value is MNG, then T
1, T
2value be:
In gray scale vector g, subscript is ascending searches for one by one, sets a zone bit t=0, finds first to be greater than T
1some E
l(1), then zone bit t=1 is made, and recording pixel subscript position b
1(1), continue search, find first to be less than T
1some E
l(2), then zone bit t=0 is made, and recording pixel subscript position b
1(2), similarly, also 2 and T can be found
2relevant gray-scale value E
2and E (1)
2and subscript position b (2)
1and b (1)
2(2).Then be positioned at b
2(1)--b
2(2) between, region is target area S
1; Be positioned at b
1(1)--b
2(1), b
1(2)--b
2(2) region between is edge transition region S
2; All the other are background area S
0.
(4) maximum of gradients is asked to g; At edge transition region S
2in, the Grad corresponding when a certain pixel satisfies condition:
Can think that this point is marginal point, realize the Pixel-level location of marginal point, if do not meet the pixel of above-mentioned condition, then make K=K+10, and proceed to (2).Wherein:
(5) marginal point oriented according to (4) calculates cross as Pixel-level center horizontal ordinate x
1,in like manner calculate center ordinate y
1.
(6) according to the center position coordinates (x oriented
1,y
1), j ∈ [y in the row direction
1-30, y
1-50] and j ∈ [y
1+ 30, y
1+ 50], i ∈ [x
1-50, x
1+ 50] in region, also namely as rectangular area A and B in Fig. 4, employing mould is the smoothing filtering of gaussian filtering template of 3, and namely adopt formula (1) to calculate, column direction in like manner;
(7) in the row direction, in the area image after (6) filtering process, satisfy condition g (i, j) >T
1the centroid algorithm formula (7) of employing band threshold value calculate, and obtain 40 groups of center of mass point coordinates, column direction in like manner calculates 40 groups of center of mass point coordinates, wherein T
1for threshold value, as shown in formula (2), k=1,2 ... 40.
The totally 80 groups of center of mass point calculated, as shown in dotted line point in rectangular area A, B, C, D in schematic diagram 4, respectively have 20 groups in its each region.
(8) least square method is utilized to carry out fitting a straight line to the center of mass point of 40 on line direction and column direction respectively, also namely as the center of mass point of 40 in A and B region in schematic diagram 4 simulates straight line, 40 center of mass point in C and D region simulate other straight line, it is fast that the method has processing speed, good stability, and the feature being subject to that noise is little.Least square line fitting theory: suppose that the straight line wanting matching is y=kx+b, and establish
When
With
Time, have
φ has minimum value under least square meaning.
As stated above in the row direction with on column direction, two straight lines obtaining of matching are as shown in Figure 4 respectively:
Then finally locating the cross inconocenter position coordinates obtained is (x
0, y
0), wherein:
Claims (4)
1. a cross inconocenter localization method in CCD image measurement system, is characterized in that: comprise the following steps:
A: the intensity profile I (i, j) obtaining a frame cross image;
B: based on cross image characteristic method, the Pixel-level center (x of quick position cross picture
1, y
1);
C: according to Pixel-level center (x
1, y
1), to j ∈ [y on line direction
1-30, y
1-50] and j ∈ [y
1+ 30, y
1+ 50], i ∈ [x
1-50, x
1+ 50] the image employing mould in region is the smoothing filter preprocessing of gaussian filtering template of 3, and column direction in like manner;
D: to pretreated image, adopts the centroid algorithm of band threshold value respectively to calculate N=40 group center-of-mass coordinate point in abscissa axis direction and axis of ordinates direction respectively;
E: adopt least square method to carry out fitting a straight line to abscissa axis direction and ordinate axial N=40 group center-of-mass coordinate point respectively, final two straight lines according to simulating calculate, and obtain the sub-pixel center position coordinates (x of cross picture
0, y
0).
2. cross inconocenter localization method in a kind of CCD image measurement system according to claim 1, is characterized in that: for line direction, and in like manner, quick position cross is as Pixel-level center (x for column direction
1, y
1) method be:
S1: adopt mould be 3 gaussian filtering template to cross image K (K=10) row carry out smothing filtering pre-service; If the row gray scale vector f in original image, carrying out the vector of the gray scale after gaussian filtering process is g, and sets the gray-scale value of respective pixel before and after filtering as f (i), g (i):
g(i)=[f(i-1)+2f(i)+f(i+1)]/4
S2: gray areas segmentation is carried out to g; Setting threshold value T
1, T
2(T
1<T
2), g<T
1for background area, be designated as S
0, g>T
2for target area, be designated as S
1, T
1<g<T
2for edge transition region is designated as S
2.If maximal value is MXG in gray scale vector g, minimum value is MNG, then T
1, T
2value be:
In gray scale vector g, subscript is ascending searches for one by one, sets a zone bit t=0, finds first to be greater than T
1some E
l(1), then zone bit t=1 is made, and recording pixel subscript position b
1(1), continue search, find first to be less than T
1some E
l(2), then zone bit t=0 is made, and recording pixel subscript position b
1(2), similarly, also 2 and T can be found
2relevant gray-scale value E
2and E (1)
2and subscript position b (2)
1and b (1)
2(2).Then be positioned at b
2(1) ~ b
2(2) between, region is target area S
1; Be positioned at b
1(1) ~ b
2(1), b
1(2) ~ b
2(2) region between is edge transition region S
2; All the other are background area S
0.
S3: maximum of gradients is asked to g; At edge transition region S
2in, the Grad corresponding when a certain pixel satisfies condition:
Can think that this point is marginal point, realize the Pixel-level location of marginal point, if do not meet the pixel of above-mentioned condition, then make K=K+10, and proceed to S1.Wherein:
S4: calculate cross as Pixel-level center horizontal ordinate x according to the marginal point that S3 orients
1.
3. cross inconocenter method for rapidly positioning in a kind of CCD image measurement system according to claim 1, is characterized in that: the centroid algorithm formula of band threshold value is:
Wherein for x
k, j ∈ [y
1-30, y
1-50] and j ∈ [y
1+ 30, y
1+ 50], i ∈ [x
1-50, x
1, and g (i, the j) >T that satisfies condition+50]
1, wherein k=1,2 ... 40, for y
kin like manner.
4. cross inconocenter method for rapidly positioning in a kind of CCD image measurement system according to claim 1, is characterized in that: two straight lines simulated are: y=k
1x+b
1and y=k
2x+b
2, then cross is (x as sub-pixel center position coordinates
0, y
0), wherein:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510633287.6A CN105160644A (en) | 2015-09-29 | 2015-09-29 | Method for positioning center of crisscross image in CCD image measurement system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510633287.6A CN105160644A (en) | 2015-09-29 | 2015-09-29 | Method for positioning center of crisscross image in CCD image measurement system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105160644A true CN105160644A (en) | 2015-12-16 |
Family
ID=54801487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510633287.6A Pending CN105160644A (en) | 2015-09-29 | 2015-09-29 | Method for positioning center of crisscross image in CCD image measurement system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105160644A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107516328A (en) * | 2017-08-23 | 2017-12-26 | 山东非凡智能科技有限公司 | A kind of AGV work independent positioning methods and system |
CN107578385A (en) * | 2017-09-01 | 2018-01-12 | 中国空气动力研究与发展中心低速空气动力研究所 | The assemblage characteristic localization method of feature based edge extracting |
CN111360370A (en) * | 2020-03-02 | 2020-07-03 | 中船第九设计研究院工程有限公司 | Welding robot welding seam positioning method for processing shipyard parts |
CN114002706A (en) * | 2021-10-29 | 2022-02-01 | 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) | Measuring method and device of photoelectric sight-stabilizing measuring system and computer equipment |
CN116563298A (en) * | 2023-07-12 | 2023-08-08 | 南京茂莱光学科技股份有限公司 | Cross line center sub-pixel detection method based on Gaussian fitting |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6701007B1 (en) * | 1999-03-11 | 2004-03-02 | Fuji Photo Film Co., Ltd. | Image processing device, image processing method, and recording medium for correcting color balance of output images |
CN102270350A (en) * | 2010-06-01 | 2011-12-07 | 西门子公司 | Iterative ct image reconstruction with a four-dimensional noise filter |
CN103226833A (en) * | 2013-05-08 | 2013-07-31 | 清华大学 | Point cloud data partitioning method based on three-dimensional laser radar |
-
2015
- 2015-09-29 CN CN201510633287.6A patent/CN105160644A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6701007B1 (en) * | 1999-03-11 | 2004-03-02 | Fuji Photo Film Co., Ltd. | Image processing device, image processing method, and recording medium for correcting color balance of output images |
CN102270350A (en) * | 2010-06-01 | 2011-12-07 | 西门子公司 | Iterative ct image reconstruction with a four-dimensional noise filter |
CN103226833A (en) * | 2013-05-08 | 2013-07-31 | 清华大学 | Point cloud data partitioning method based on three-dimensional laser radar |
Non-Patent Citations (2)
Title |
---|
刘博超等: "微分算子和直线拟合在十字丝中心定位中的应用", 《软件工程与应用》 * |
杨博雄: "CCD细分技术及其应用研究", 《中国优秀博硕士学位论文全文数据库(博士)信息科技辑(月刊)》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107516328A (en) * | 2017-08-23 | 2017-12-26 | 山东非凡智能科技有限公司 | A kind of AGV work independent positioning methods and system |
CN107516328B (en) * | 2017-08-23 | 2021-02-12 | 山东非凡智能科技有限公司 | AGV working point positioning method and system |
CN107578385A (en) * | 2017-09-01 | 2018-01-12 | 中国空气动力研究与发展中心低速空气动力研究所 | The assemblage characteristic localization method of feature based edge extracting |
CN111360370A (en) * | 2020-03-02 | 2020-07-03 | 中船第九设计研究院工程有限公司 | Welding robot welding seam positioning method for processing shipyard parts |
CN114002706A (en) * | 2021-10-29 | 2022-02-01 | 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) | Measuring method and device of photoelectric sight-stabilizing measuring system and computer equipment |
CN116563298A (en) * | 2023-07-12 | 2023-08-08 | 南京茂莱光学科技股份有限公司 | Cross line center sub-pixel detection method based on Gaussian fitting |
CN116563298B (en) * | 2023-07-12 | 2023-09-08 | 南京茂莱光学科技股份有限公司 | Cross line center sub-pixel detection method based on Gaussian fitting |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104268857B (en) | A kind of fast sub-picture element rim detection and localization method based on machine vision | |
CN105160644A (en) | Method for positioning center of crisscross image in CCD image measurement system | |
CN105913415B (en) | A kind of image sub-pixel edge extracting method with extensive adaptability | |
CN103345755B (en) | A kind of Chessboard angular point sub-pixel extraction based on Harris operator | |
CN108647585A (en) | A kind of traffic mark symbol detection method based on multiple dimensioned cycle attention network | |
CN100446544C (en) | Method for extraction method of video object external boundary | |
CN112037159B (en) | Cross-camera road space fusion and vehicle target detection tracking method and system | |
CN103439348B (en) | Remote controller key defect detection method based on difference image method | |
CN109816639B (en) | Real-time straight line segment detection system and method based on LSD algorithm | |
CN106643545A (en) | Calibration method for steel rail profile measured by adopting laser displacement technology | |
CN103310464B (en) | A kind of method of the direct estimation camera self moving parameter based on normal direction stream | |
CN102901444A (en) | Method for detecting component size based on matching pursuit (MP) wavelet filtering and detecting system thereof | |
JP2021168143A (en) | System and method for efficiently scoring probe in image by vision system | |
CN105096298A (en) | Grid feature point extraction method based on fast line extraction | |
CN104715487A (en) | Method for sub-pixel edge detection based on pseudo Zernike moments | |
CN103700117A (en) | Robust optical flow field estimating method based on TV-L1 variation model | |
CN110909623B (en) | Three-dimensional target detection method and three-dimensional target detector | |
CN106529548A (en) | Sub-pixel level multi-scale Harris corner detection algorithm | |
CN113538378A (en) | Bearing size online detection system based on deep learning | |
CN103914829B (en) | Method for detecting edge of noisy image | |
CN103913166A (en) | Star extraction method based on energy distribution | |
CN106503683A (en) | A kind of video well-marked target detection method based on dynamic focal point | |
CN104574312A (en) | Method and device of calculating center of circle for target image | |
CN113628170B (en) | Laser line extraction method and system based on deep learning | |
Sun et al. | Decoupled feature pyramid learning for multi-scale object detection in low-altitude remote sensing images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20151216 |