CN101504720B - Random color spherical object identification method based on single camera - Google Patents
Random color spherical object identification method based on single camera Download PDFInfo
- Publication number
- CN101504720B CN101504720B CN200910048180XA CN200910048180A CN101504720B CN 101504720 B CN101504720 B CN 101504720B CN 200910048180X A CN200910048180X A CN 200910048180XA CN 200910048180 A CN200910048180 A CN 200910048180A CN 101504720 B CN101504720 B CN 101504720B
- Authority
- CN
- China
- Prior art keywords
- counter
- ball
- grid
- value
- point
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention relates to a method for identifying a spherical object with any color based on a single camera. The method comprises the steps of: shooting the edge with a detected image first, calculating possible spherical center tracks aiming at each point on the edge, and then obtaining the position of the spherical center by calculating an intersection point of the tracks. The method can quickly and effectively identify whether the spherical object with any color exists in the image, calculate the position of a sphere relative to the camera, and has high identification success rate.
Description
Technical field
The invention belongs to machine vision/Computer Image Processing; Relate to a kind of random color spherical object identification method based on single camera.
Background technology
One of matter of utmost importance that will solve in robot soccer game is the identification ball.Method commonly used at present is to rely on the difference of ball and other object colors to discern, this just means and need classify to color, finding out ball may be which color is the color of ball, uses the threshold value color classification usually, perhaps determines the classification of color by color lookup table.But such way depends on light and color very much, and dirigibility is low.If change a new football, even illumination is constant, color also needs to reclassify, and the adaptability of identification is very low.The method of the ball identification of random color commonly used is to use integrogram to obtain the Haar feature at present, generates many original sorters then, utilizes adaboost to make up these Weak Classifiers, obtains a strong classifier.This machine vision method is applicable to the most of objects of identification, yet it is not too high to discern its success ratio.
Summary of the invention
The objective of the invention is to overcome dependence and the low deficiency of existing sorter recognition methods success ratio to color, a kind of random color spherical object identification method based on single camera is provided, even under a lot of difficult situations, also reached very desirable effect.
For achieving the above object, the present invention adopts following technical proposals:
A kind of random color spherical object identification method based on single camera, it is characterized in that: at first extract edge of image to be detected, at each point on its edge, calculate possible centre of sphere track, again by calculating the intersection point of these tracks, just obtain sphere center position, thus the identification mission of finishing; The concrete operations step is as follows:
(1) edge extracting: extract all points of image border, these points are that the information that comprised is the coordinate on their images;
(2) utilize distance function, each some projection on the ground on the computed image, promptly these points are mapped to the volume coordinate position of ground relative camera;
(3) calculate the intersection point of the centre of sphere track of all subpoint correspondences:
It is that the lattice of step is used for writing down the number of times by curve negotiating that view field is divided into length and width, the information that each grid comprises for this reason the planimetric coordinates of the corresponding projection of grid (x, y) and counter counter (x, y);
According to elliptic equation
Calculate the span of y, get y from minimum value y
MinTo maximal value y
Max, described minimum value and maximal value promptly are the oval coordinates of going up point most and descending point most, are a stepping with step at every turn, promptly each loop ends y+step;
Described circulation is for getting greater than maximal value y as y
MaxThe time jump out circulation
By
Solve the respective x value;
If obtain two point (x
1, y) with (x
2, y):
Find and comprise (x
1, grid y), the counter counter (x of this grid correspondence
1, y) add 1;
Find and comprise (x
2, grid y), the counter counter (x of this grid correspondence
2, y) add 1; Otherwise, if obtain a point (x, y):
Find and comprise that ((x y) adds 1 to the counter counter of this grid correspondence for x, grid y);
(4) seek the maximal value max{counter (x of all criss-cross method devices
i, y
j), differentiate the result who discerns ball:
If this maximal value max{counter is (x
i, y
j) greater than certain threshold value counter_threshold, then recognize ball, the centre of sphere be grid center counter_max (x, y); Otherwise there is not ball in the zone; Threshold value counter_threshold described here is not some fixed numbers, to set according to the system, object and the environment that detect, method commonly used is to have the image of ball to test with one, aforesaid criss-cross method device all count finish after, draw out the histogram of counter number of count value/this numerical value of correspondence of all grids, the intermediate value of getting the highest count value and time high count value is suitably debugged on this basis and is made trace according to debug results and revise as the reference threshold value.
{
Recognize ball;
The centre of sphere be grid center counter_max (x, y);
}
Otherwise
{
There is not ball in the zone;
}。
The present invention compared with prior art, have following conspicuous outstanding substantive distinguishing features and remarkable advantage: Flame Image Process of the present invention is based on analytic geometry method, dexterously machine world problem is converted into solid problem, even under a lot of difficult situations, also reach very desirable effect, can fast and effeciently discern random color spherical object whether in image, and calculate the position of the relative camera of spheroid, recognition success rate is very high.
Description of drawings
Fig. 1 is the index path of this method, and light OP and ball are tangent, and P0 ' point is the point of contact, and the P0 point is a point of contact P0 ' projection on the ground.
Fig. 2 is the derivation of equation synoptic diagram of this method, tilting pipeline for OP air line distance be the set of being had a few of r, centre of sphere track is just chosen in this set, choosing method is obtained crossing part for highly to be that the plane of r is crossing with it.Visible this common factor of the process of the derivation of equation is an ellipse.
Fig. 3 is limited in identified region on the plane of 12m*12m, and initial point is represented the robot location.
The synoptic diagram of Fig. 4 " algorithm " part medium square counter.
Fig. 5 is the program program flow diagram of this method, and concrete implication is referring to " algorithm " part in the embodiment.
Embodiment
Details are as follows in conjunction with the accompanying drawings for a preferred embodiment of the present invention:
The modeling and the derivation of equation: suppose ball all the time on the ground, Fig. 1 has showed that gamma camera catches the index path of ball.The O point is represented the center (if directly use gamma camera, the O point is represented the optical centre of gamma camera, and this algorithm is applicable to the general vision system that does not use panorama) of panorama.Light OP and ball are tangent, P
0' point be the point of contact, P
0Point is point of contact P
0' on the ground projection.As the method for other shape recognition, we earlier carry out edge extracting to image, and the edge correspondence of ball and the point of contact of the tangent light of ball (P for example
0'), and the projection on the ground of these point of contacts.
Now this geometrical issues is set up mathematical model, select on the ground projection of any light and ball point of contact (corresponding the edge of ball), for example P
0, calculate corresponding centre of sphere track.If the radius of ball is r, the O point coordinate be (0,0, h) (the panorama height is h).Can determine that centre of sphere track must overhead highly be on the surface level of r, because we suppose that ball on the ground.Because straight line OP
0Tangent with ball, the centre of sphere is from straight line OP
0Distance must equal r, that is to say that the centre of sphere is inevitable with straight line OP
0Be axle, r can prove that this track is an ellipse on the pipeline of radius.
Begin below the to derive analytic expression of centre of sphere track, recall the mathematical notation of variable in the model: the radius of ball is r, the O point coordinate be (0,0, h).At first obtain P apart from straight line O
0With the distance be the track of the point of r, it is the analytic expression of tilting pipeline among Fig. 2, then the z value in the analytic expression is changed into r, just can obtain centre of sphere track, manual this analytic expression of deriving is the exceedingly difficult thing that gets, because formula is very long, so we use MatLab symbolic computation tool box (Symbolic Toolbox) programming to calculate centre of sphere track.
Assisting down of this powerful instrument of Matlab symbolic computation tool box, we have obtained centre of sphere track:
A, b, c, d, f are 6 parameters, they depend on the radius r of ball, the height h.P of the optical centre of panorama
0Coordinate (the x of point
0, y
0.)
b=2·(h-r)·h·x
0
c=2·x
0·y
0
d=2·(h-r)·h·y
0
Obviously centre of sphere track is a quadratic equation, because it is again the curve of a sealing, we can determine that it is that (quadratic equation can be a para-curve to an ellipse, hyperbolic curve, ellipse.Wherein having only ellipse is closed curve, and circle is special ellipse), also can provide strict mathematical justification according to the discriminant of quadratic equation:
Still by using Matlab symbolic computation tool box to obtain, it shows delta all the time less than 0 (h ≠ 0) to following formula, and this meaning centre of sphere track must be an ellipse.We have had a very satisfied result to first crucial problem now.According to this incomplete information of coordinate of a point of contact projection on the ground, we can calculate the track of possible sphere centre coordinate.
Algorithm: though we have had the general thought of setting up zingy mathematical model and dealing with problems, we know and obtain a series of centre of sphere tracks earlier, and then calculate the intersection point of these tracks, intersection point is exactly the centre of sphere, but a trouble that runs into like this is exactly to have no idea to separate two binary quadratic equations.Being to use manual derive also be to use Matlab all can't find the solution (prompting that Matlab provides is " object too large ", task is too complicated), we can only avoid calculating intersection point.
Though we know what infinitely extended on the plane at centre of sphere place, we are its artificial limited area that is limited in a 12m*12m, as shown in Figure 3.Initial point is exactly the position of robot.Because if ball surpasses 6 meters from the distance of robot, the distortion of ball shape and color will reach the degree that can not repair, and the confidence level of identification is not high, not surpass 6 meters ball so do not need to discern, and be rational so limit identification range.
As shown in Figure 4, now centre of sphere place surface level is divided into a lot of lattices, at counter of each grid definition, for any lattice, if certain this grid of bar deferent process, the corresponding counter of grid adds one.If it is suitable that grid is chosen, the counter of the grid correspondence at sphere centre coordinate (coordinate of the intersection point of all tracks) place must have maximum count value.We select the grid of count value maximum, if this count value, just judges that ball finds greater than certain threshold value.
Specific algorithm is as follows:
The first step: edge extracting, extract all points of image border, these points are that the information that comprised is the coordinate on their images;
Second step: utilize distance function, each some projection on the ground on the computed image, promptly these points are mapped to the volume coordinate position of ground relative camera, see Fig. 1, P
0Point is in these points; (notice that distance function is not a content of the present invention, and be a necessary link of machine vision, repeat no more here) with the camera measuring distance
The 3rd step: the intersection point (this step is one of core of this algorithm) that calculates the centre of sphere track of all subpoint correspondences
It is that the lattice of step is used for writing down the number of times by curve negotiating that view field is divided into length and width, the information that each grid comprises for this reason the planimetric coordinates of the corresponding projection of grid (x, y) and counter counter (x, y);
According to elliptic equation
Calculate the span of y, get y from minimum value y
MinTo maximal value y
Max(noticing that the minimum value and the maximal value of indication promptly are the oval coordinates of going up point most and descending point most here) is a stepping with step at every turn, promptly each loop ends y+step;
Circulation: (when y gets greater than maximal value y
MaxThe time jump out circulation)
{
By
Solve the respective x value;
If obtain two point (x
1, y) with (x
2, y):
Find and comprise (x
1, grid y), the counter counter (x of this grid correspondence
1, y) add 1;
Find and comprise (x
2, grid y), the counter counter (x of this grid correspondence
2, y) add 1;
Otherwise, if obtain a point (x, y):
Find and comprise that ((x y) adds 1 to the counter counter of this grid correspondence for x, grid y);
}
The 4th step: the maximal value max{counter (x that seeks all criss-cross method devices
i, y
j), differentiate the result who discerns ball; (this step be this algorithm core two)
Seek the maximal value max{counter (x in the counter of all grids
i, y
j);
If this maximal value max{counter is (x
i, y
j) greater than certain threshold value counter_thresbold;
{
Recognize ball;
The centre of sphere be grid center counter_max (x, y);
}
Otherwise
{
There is not ball in the zone;
}
Other sees Fig. 5 program flow diagram.
We have designed three experiments and have tested this algorithm.First experiment is the recognition effect of test in noisy environment.Recognition effect when second experiment test ball partly covered by obstacle.The 3rd the skyborne recognition effect of experimental identification ball.
In first experiment, 3 paper are arranged around the ball.Paper has produced extra border around ball, but algorithm is not disturbed.Any mistake does not appear in (25 frame per second) in 3 minutes experiment.In second experiment, ball is by the chair partial occlusion, when shield portions less than protocorm 1/3 the time, program without lifting an eyebrow recognized ball, about 1/2 the time when the ball part that is blocked, discern less than ball sometimes.In second experiment, ball is by the chair partial occlusion, when shield portions less than protocorm 1/3 the time, program without lifting an eyebrow recognized ball, about 1/2 the time when the ball part that is blocked, discern less than ball sometimes.
Comparison with the adaboost algorithm:
Again the adaboost method is applied in the vision system, compare with analytic geometry method, effect is good especially under the noisy again situation of cartesian geometry algorithm, we do not find any not recognizing or the situation of identification error, adaboost shows relatively poor under noisy situation, and error recognition rate is greatly about (even the error rate of adaboost still has about 5% under non-noisy situation) about 20%.Block under the situation, the limit that the cartesian geometry algorithm can be discerned approximately is 1/3 again, the identification limit of adaboost approximately again 1/5, in fact, the adaboost algorithm is at whole ball, and the cartesian geometry algorithm at be arc.Yet adaboost can discern aerial ball, and to highly have no requirement (still inaccurate but the centre of sphere calculates, this is that monocular vision determines), the cartesian geometry algorithm can only be discerned bed hedgehopping 5cm with interior ball.Computing machine is because the shared cpu resource of adaboost is lower than %1, and this is 2% better than what use the cartesian geometry algorithm.Two kinds of methods all are real-time.
Claims (1)
1. random color spherical object identification method based on single camera, it is characterized in that at first absorbing edge of image to be detected, each point on its edge calculates possible centre of sphere track, by calculating the intersection point of these tracks, obtain the position of the centre of sphere again; Concrete steps are as follows:
(1) edge extracting: extract all points of image border, the information that these points are comprised is the coordinate on their images;
(2) utilize distance function, each some projection on the ground on the computed image, promptly these points are mapped to the volume coordinate position of ground relative camera;
(3) calculate the intersection point of the centre of sphere track of all subpoint correspondences:
It is that the lattice of step is used for writing down the number of times by curve negotiating that view field is divided into length and width, the information that each grid comprises for this reason the planimetric coordinates of the corresponding projection of grid (x, y) and counter counter (x, y);
According to elliptic equation
A in the formula, b, c, d, e, f are 6 parameters;
b=2·(h-r)·h·x
0
c=2·x
0·y
0
d=2·(h-r)·h·y
0
R is the radius of ball; H is the optical centre of panorama or the height h of camera; (x
o, y
o.) be on the ball edge certain a bit along the camera light path coordinate of projection on the ground;
Calculate the span of y, get y from minimum value y
MinTo maximal value y
Max, described minimum value and maximal value promptly are the oval coordinates of going up point most and descending point most, are a stepping with step at every turn, promptly each loop ends y=y+step;
By
Solve the respective x value;
If obtain two point (x
1, y) with (x
2, y):
Find and comprise (x
1, grid y), the counter counter (x of this grid correspondence
1, y) add 1;
Find and comprise (x
2, grid y), the counter counter (x of this grid correspondence
2, y) add 1; Otherwise, if obtain a point (x, y):
Find and comprise that ((x y) adds 1 to the counter counter of this grid correspondence for x, grid y);
Described circulation is for getting greater than maximal value y as y
MaxThe time jump out circulation;
(4) seek the maximal value max{counter (x of all criss-cross method devices
i, y
j), differentiate the result who discerns ball:
If this maximal value max{counter is (x
i, y
j) greater than certain threshold value counter_threshold, then recognize ball, the centre of sphere be grid center counter_max (x, y); Otherwise there is not ball in the zone; Threshold value counter_threshold described here is not some fixed numbers, to set according to the system, object and the environment that detect, method is to have the image of ball to test with one, aforesaid criss-cross method device all count finish after, draw out the histogram of counter number of count value/this numerical value of correspondence of all grids, the intermediate value of getting the highest count value and time high count value is as the reference threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910048180XA CN101504720B (en) | 2009-03-25 | 2009-03-25 | Random color spherical object identification method based on single camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910048180XA CN101504720B (en) | 2009-03-25 | 2009-03-25 | Random color spherical object identification method based on single camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101504720A CN101504720A (en) | 2009-08-12 |
CN101504720B true CN101504720B (en) | 2011-05-04 |
Family
ID=40976960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910048180XA Expired - Fee Related CN101504720B (en) | 2009-03-25 | 2009-03-25 | Random color spherical object identification method based on single camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101504720B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108079565B (en) * | 2017-12-28 | 2019-11-08 | 深圳市超级视觉科技有限公司 | A kind of game of billiards scoring system |
CN110598539A (en) * | 2019-08-02 | 2019-12-20 | 焦作大学 | Sports goods classification device and method based on computer vision recognition |
-
2009
- 2009-03-25 CN CN200910048180XA patent/CN101504720B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101504720A (en) | 2009-08-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Xu et al. | Dot distance for tiny object detection in aerial images | |
Zhou et al. | LIDAR and vision-based real-time traffic sign detection and recognition algorithm for intelligent vehicle | |
CN106446926A (en) | Transformer station worker helmet wear detection method based on video analysis | |
CN103902976B (en) | A kind of pedestrian detection method based on infrared image | |
CN101339607B (en) | Human face recognition method and system, human face recognition model training method and system | |
CN101923645B (en) | Iris splitting method suitable for low-quality iris image in complex application context | |
CN105956582A (en) | Face identifications system based on three-dimensional data | |
US20120093420A1 (en) | Method and device for classifying image | |
CN102214309B (en) | Special human body recognition method based on head and shoulder model | |
CN105404857A (en) | Infrared-based night intelligent vehicle front pedestrian detection method | |
CN102402680A (en) | Hand and indication point positioning method and gesture confirming method in man-machine interactive system | |
CN104091147A (en) | Near infrared eye positioning and eye state identification method | |
CN109697430A (en) | The detection method that working region safety cap based on image recognition is worn | |
CN113158850B (en) | Ship driver fatigue detection method and system based on deep learning | |
CN104636749A (en) | Target object detection method and device | |
CN104573707B (en) | A kind of license plate Chinese character recognition method based on multi-feature fusion | |
EP2587451A1 (en) | Moving-object detection device | |
US20150125039A1 (en) | Lane departure warning system and method | |
CN103020986A (en) | Method for tracking moving object | |
CN104077594A (en) | Image recognition method and device | |
CN102270308A (en) | Facial feature location method based on five sense organs related AAM (Active Appearance Model) | |
CN103150572A (en) | On-line type visual tracking method | |
CN103473570A (en) | Self-adaptive video scene pedestrian detection method | |
CN105512618A (en) | Video tracking method | |
CN104102904A (en) | Static gesture identification method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20110504 Termination date: 20140325 |