CN101211508B - Traffic lamp automatic control method and system - Google Patents
Traffic lamp automatic control method and system Download PDFInfo
- Publication number
- CN101211508B CN101211508B CN2007103039126A CN200710303912A CN101211508B CN 101211508 B CN101211508 B CN 101211508B CN 2007103039126 A CN2007103039126 A CN 2007103039126A CN 200710303912 A CN200710303912 A CN 200710303912A CN 101211508 B CN101211508 B CN 101211508B
- Authority
- CN
- China
- Prior art keywords
- crossing
- motion
- image
- axle
- current traffic
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000006073 displacement reaction Methods 0.000 claims description 25
- 239000000284 extract Substances 0.000 claims description 20
- 238000000605 extraction Methods 0.000 claims description 18
- 230000008859 change Effects 0.000 claims description 17
- 230000007613 environmental effect Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 description 8
- 230000008878 coupling Effects 0.000 description 6
- 238000010168 coupling process Methods 0.000 description 6
- 238000005859 coupling reaction Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- UZFMOKQJFYMBGY-UHFFFAOYSA-N 4-hydroxy-TEMPO Chemical compound CC1(C)CC(O)CC(C)(C)N1[O] UZFMOKQJFYMBGY-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses an automatic control method for a traffic light, which comprises the following steps: collecting the current image on crossing constantly and determining the moving direction of objects in the image before the moving time on the current moving direction indicated by the traffic light reaches the predefined longest moving time of the current moving direction; determining no object on the current moving direction according to the moving direction of the object, and controlling the indication of the traffic light to transfer to the next moving direction; or, controlling the indication of the traffic light to transfer to the next moving direction when the moving time of the current moving direction reaches the longest moving time. Furthermore, the invention further discloses an automatic control system for the traffic light. The technical proposal disclosed by the invention can improve the running efficiency of traffic.
Description
Technical field
The present invention relates to traffic system, relate in particular to a kind of autocontrol method and system of traffic lights.
Background technology
At present, traffic lights generally all adopts time-controlled mode, promptly all determines the instruction time of each traffic direction traffic lights of each crossing.Yet in some time period, possible certain direction vehicle flowrate and/or flow of the people are very little, and other direction vehicle flowrates and/or flow of the people are very big, and this moment, this mode according to the time of determining timing controlled traffic lights indication will make full use of traffic resource.In addition in some time period, during as night, the vehicle flowrate and/or the flow of the people of all directions are all very little, this moment, this mode according to the time of determining timing controlled traffic lights indication can make that vehicle and/or people still need to wait for the predetermined set time, caused the delay of vehicle and/or people's travelling speed.
As seen, no matter be in which kind of situation, this mode according to the time of determining timing controlled traffic lights indication all can reduce the operational efficiency of traffic in the prior art.
Summary of the invention
In view of this, provide the autocontrol method of traffic lights among the present invention on the one hand, a kind of automatic control system of traffic lights is provided on the other hand, so that improve the operational efficiency of traffic.
The autocontrol method of traffic lights provided by the present invention comprises:
Reached in the working time of the current traffic direction of traffic lights indication before the longest run time of default current traffic direction, constantly gather the present image at crossing,, determine the direction of motion of object on the crossing according to the image of being gathered;
Judge whether described direction of motion is consistent with current traffic direction, if inconsistent, then determining does not have object on the current traffic direction, and the indication of control traffic lights changes next traffic direction over to; Otherwise when reached described longest run time the working time of current traffic direction, the indication of control traffic lights changed next traffic direction over to.
Wherein, the described present image of constantly gathering the crossing, according to the image of being gathered, determine that the direction of motion of object comprises on the crossing:
The present image at A, collection crossing, and according to the foreground object in the described present image extraction image, the object that moves on the corresponding crossing of described foreground object;
B, if present image is not the image in the preceding N frame of current traffic direction, then the foreground object with described foreground object and N continuous frame extraction before carries out tracking and matching, if match same object, then determine the direction of motion of this object according to the change in location of same object; N 〉=1 wherein;
This method further comprises: when judging that described direction of motion is consistent with current traffic direction, return execution in step A.
Perhaps, the described present image of constantly gathering the crossing, according to the image of being gathered, determine that the direction of motion of object comprises on the crossing:
A, gather the present image at crossing according to the default time interval, and extract foreground object in the image, the object that moves on the corresponding crossing of described foreground object according to described present image;
B, if present image is not the image in the preceding N frame of current traffic direction, then the foreground object with described foreground object and N continuous frame extraction before carries out tracking and matching, if match same object, then determine the direction of motion of this object according to the change in location of same object; N 〉=1 wherein.
Preferably, further comprise among the step B: if do not match same object, judge whether that then continuous N time does not match same object, if then determining does not have object on the current traffic direction; M 〉=1 wherein.
Wherein, the described foreground object that extracts in the image according to present image is: the background model of described present image with the crossing of having set up compared, extract foreground object from described present image.
Preferably, the background model at crossing described in the steps A is: the background model at the crossing of bringing in constant renewal in according to the environmental change at crossing.
Wherein, described change in location according to same object determines that the direction of motion of this object comprises:
A direction at default crossing is a horizontal ordinate x axle, and vertically another direction of this direction is an ordinate y axle, and the positive dirction of true origin and x axle and y axle is set, and obtains the image coordinate axle at crossing;
Based on described image coordinate axle, determine the position (x of same object in two frames of front and back
n, y
n) and (x
N+1, y
N+1), and calculate the displacement (x of described object at the x axle
N+1-x
n) and at the displacement (y of y axle
N+1-y
n);
According to described displacement (x
N+1-x
n) and (y
N+1-y
n), determine the direction of motion of described object.
Wherein, described according to displacement (x
N+1-x
n) and (y
N+1-y
n), determine that the direction of motion of described object comprises:
The default axial threshold value Tx of x, the axial threshold value Ty of y;
If | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |<Ty, determine that then the direction of motion of this object is the direction that is parallel to the x axle;
If | (x
N+1-x
n) |<Tx, | (y
N+1-y
n) |>Ty, determine that then the direction of motion of this object is the direction that is parallel to the y axle;
If | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |>Ty, and (x
N+1-x
n) (y
N+1-y
n)>0, the direction of motion of then determining this object is for being the direction of 45 ° or-135 ° with x axle positive dirction;
If | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |>Ty, and (x
N+1-x
n) (y
N+1-y
n)<0, the direction of motion of then determining this object is for being the direction of 135 ° or-45 ° with x axle positive dirction.
Preferably, before the steps A, further comprise: whether reach the shortest working time of default current traffic direction the working time of judging current traffic direction, if then carry out described steps A.
The automatic control system of traffic lights provided by the present invention comprises:
Timing unit is used for carrying out timing the working time of the current traffic direction of traffic lights indication;
Collecting unit is used for constantly gathering the present image at crossing before longest run time that timing time at described timing unit reaches default current traffic direction;
Analytic unit is used for the image according to described collecting unit collection, determines the direction of motion of object on the crossing, judges whether described direction of motion is consistent with current traffic direction, if inconsistent, determines not have object on the current traffic direction;
The traffic lights control module, be used for when described analytic unit is determined not have object on the current traffic direction or the timing time of described timing unit when reaching the longest run time of default current traffic direction, the indication of control traffic lights changes next traffic direction over to.
Wherein, described analytic unit comprises:
The foreground extraction unit is used for the present image according to described collecting unit collection, extracts the foreground object in the image, the object that moves on the corresponding crossing of described foreground object;
The tracking and matching unit is used for when present image is not the image of preceding N frame of current traffic direction, and the foreground object that described foreground extraction unit is extracted carries out tracking and matching with the foreground object that N continuous frame before extracts; N 〉=1 wherein;
The direction determining unit is used for determining the direction of motion of this object according to the change in location of same object when described tracking and matching units match arrives same object;
Judging unit is used to judge whether described direction of motion is consistent with current traffic direction, if consistent, then determines to have object on the current traffic direction, otherwise, determine not exist on the current traffic direction object.
Preferably, described traffic lights control module is further used for when described tracking and matching unit continuous N time does not match same object, and the indication of control traffic lights changes next traffic direction over to; M 〉=1 wherein.
Wherein, a direction at default crossing is a horizontal ordinate x axle, and vertically another direction of this direction is an ordinate y axle, and the positive dirction of true origin and x axle and y axle is set, and obtains the image coordinate axle at crossing;
Described direction determining unit comprises:
Position determination module is used for based on described image coordinate axle, determines the position (x of same object in two frames of front and back
n, y
n) and (x
N+1, y
N+1);
The displacement computing module is used for the position (x according to described object two frames in front and back
n, y
n) and (x
N+1, y
N+1), calculate the displacement (x of described object at the x axle
N+1-x
n) and at the displacement (y of y axle
N+1-y
n);
The direction determination module is used for according to described displacement (x
N+1-x
n) and (y
N+1-y
n), determine the direction of motion of described object.
Preferably, described collecting unit further after the timing time of described timing unit reaches the shortest working time of default current working time, is carried out the present image at described collection crossing.
From such scheme as can be seen, among the present invention before reaching the longest run time of default current traffic direction working time of the current traffic direction of traffic lights indication, constantly gather the present image at crossing,, determine the direction of motion of object on the crossing according to the image of being gathered; According to the direction of motion of described object, when determining not have object on the current traffic direction, the indication of control traffic lights changes next traffic direction over to; Otherwise, when reach described longest run time the working time of current traffic direction, the indication of control traffic lights changes next traffic direction over to, realized automatic analysis to the crossing road conditions, and when on determining current traffic direction, not having the object operation, need not to continue to wait for, and change next traffic direction over to, thereby improved the operational efficiency of traffic, more preferably used path resource.
During specific implementation, constantly gather the image at crossing, background model according to the crossing of having set up, extract the foreground object at crossing from the image of being gathered, with N continuous+1, the foreground object that N 〉=1 frame extracts carries out tracking and matching, determine the direction of motion of this object according to the change in location of the same object that matches, when judging that described direction of motion and current traffic direction are inconsistent, determine not had on the current direction object operation, the indication of control traffic lights changes next traffic direction over to; Further, at continuously default M, when M 〉=1 time does not match same object, also can determine not had on the current direction object operation, the indication of control traffic lights changes next traffic direction over to, has further improved the operational efficiency of traffic.
Description of drawings
Fig. 1 is the exemplary process diagram of the autocontrol method of traffic lights in the embodiment of the invention;
Fig. 2 is the information at a crossing in the embodiment of the invention;
Fig. 3 is based on the image coordinate axle at crossing shown in Figure 2 in the embodiment of the invention;
Fig. 4 (a) to Fig. 4 (d) be based on 4 traffic direction synoptic diagram at crossing shown in Figure 2 in the embodiment of the invention;
Fig. 5 is the exemplary block diagram of the automatic control system of traffic lights in the embodiment of the invention;
Fig. 6 is the structural representation of analytic unit in the system shown in Figure 5;
Fig. 7 is the structural representation of direction determining unit in the analytic unit shown in Figure 6.
Embodiment
Among the present invention, can utilize image processing techniques, realize automatic control traffic lights.Reached in the working time of the current traffic direction of traffic lights indication before the longest run time of default current traffic direction, gather the image at crossing,, determine the direction of motion of object on the crossing according to the image of being gathered; According to the direction of motion of described object, when determining not have object on the current traffic direction, the indication of control traffic lights changes next traffic direction over to; Otherwise when reached described longest run time the working time of current traffic direction, the indication of control traffic lights changed next traffic direction over to.Promptly analyze the current traffic information at crossing according to the image information of being gathered, according to the current traffic information at crossing, the traffic lights indication at control crossing.
Wherein, according to the image of being gathered, the method for determining the direction of motion of object on the crossing can have multiple, can be the image that will gather and default background model compares, extract foreground object, the direction of motion of object is determined in the variation in the frame of front and back according to foreground object; Also can be that the image that will gather carries out interframe work difference etc., the variation of interframe foreground object before and after obtaining, thereby the direction of motion of definite object; In addition, other implementation can also be arranged, enumerate no longer one by one herein.
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
In the present embodiment, be example with the image that will gather and the situation that the background model of presetting compares.At first be set a longest run time for each traffic direction, this longest run time is in the time of can being available technology adopting timing controlled mode, be the fixing instruction time of each traffic direction traffic lights setting, in addition, set guarded region, this guarded region should be able to comprise the moving region scope that the object of each traffic direction of crossing is possible.
Afterwards, on each traffic direction, write down the working time on this traffic direction, and carry out method flow shown in Figure 1, Fig. 1 is the exemplary process diagram of the autocontrol method of traffic lights in the embodiment of the invention.As shown in Figure 1, this flow process comprises the steps:
Step 101 is gathered the present image at crossing, according to the background model at the crossing of having set up, extracts the current foreground object at crossing from described present image.
In this step, can utilize the first-class image capture device of single camera or a plurality of shooting to gather the present image at crossing, present image and the background model of having set up are compared, extract the current foreground object at crossing, i.e. the object that moves on the crossing.
Wherein, the foundation of background model and the extraction of foreground object can be adopted prior art, and have a variety of methods selective in the prior art, for example, can select to comprise Density Estimator, and mixed Gauss model and simple background are made difference and carried out in interior all multimodes.
Further, consider that the variation of surrounding environment to the influence of background model (for example, in difference constantly, shine upon skyscraper and be mapped in the shade difference at crossing), background model can be brought in constant renewal in according to the environmental change at crossing, and wherein, update method also can adopt prior art.
Step 102, if present image is not the preceding N of current traffic direction, the image in N 〉=1 frame, then the foreground object with described current foreground object and N continuous frame extraction before carries out tracking and matching, if match same object, then determine the direction of motion of this object according to the change in location of same object.
Direction of motion for judgment object, usually need at least two frame consecutive images, and in order to obtain the corresponding relation of foreground object in the different frame, need to adopt the mode of object matches that foreground object is carried out tracking and matching, wherein, matching way can adopt the mode based on the minimum distance coupling also can adopt the mode of histogram coupling to carry out.
If do not match same object, then can return execution in step 101; Perhaps, but execution in step 103; Perhaps, the number of times that does not match continuously same object is counted, if default continuously M, M 〉=1 time does not match same object, and then execution in step 103, otherwise, can return execution in step 101.
If match same object, then can determine the direction of motion of this object according to the change in location of same object.During specific implementation, several different methods can be arranged.Wherein a kind of can be as follows:
With crossing shown in Figure 2 is example, and a direction at predeterminable crossing is a horizontal ordinate x axle, and vertically another direction of this direction is an ordinate y axle, and the positive dirction of true origin and x axle and y axle is set, and obtains the image coordinate axle at crossing shown in Figure 3.
Based on described image coordinate axle, determine the position (x of same object in two frames of front and back
n, y
n) and (x
N+1, y
N+1), and calculate the displacement (x of described object at the x axle
N+1-x
n) and at the displacement (y of y axle
N+1-y
n).
According to described displacement (x
N+1-x
n) and (y
N+1-y
n), determine the direction of motion of object.
Wherein, according to displacement (x
N+1-x
n) and (y
N+1-y
n), when determining the direction of motion of object, several different methods can be arranged, as can be according to (x
N+1-x
n) and (y
N+1-y
n), calculate the angle between movement direction of object and x axle or the y axle, according to the angle of being calculated, determine the direction of motion of object; Perhaps, also can preset axial threshold value Tx of x and the axial threshold value Ty of y, according to (x
N+1-x
n), (y
N+1-y
n), Tx and Ty, determine the direction of motion of object.
For example, to 4 kinds of traffic directions shown in Fig. 4 (d), be traffic direction 1, direction 2, direction 3 and direction 4 for Fig. 4 (a) as if number consecutively.
Then work as | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) | during<Ty, the direction of motion of determining this object is direction 1, promptly is parallel to the direction of x axle.
When | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |>Ty, and (x
N+1-x
n) (y
N+1-y
n)>0 o'clock, the direction of motion of determining this object is direction 2, promptly is the direction of 45 ° or-135 ° with x axle positive dirction.
When | (x
N+1-x
n) |<Tx, | (y
N+1-y
n) | during>Ty, the direction of motion of determining this object is direction 3, promptly is parallel to the direction of y axle.
When | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |>Ty, and (x
N+1-x
n) (y
N+1-y
n)<0 o'clock, the direction of motion of determining this object is direction 4, promptly is the direction of 135 ° or-45 ° with x axle positive dirction.
Step 103 judges whether described direction of motion is consistent with current traffic direction, if consistent, then returns execution in step 101; Otherwise, execution in step 104.
In this step, when the direction of motion of object and current traffic direction were compared, if the two unanimity, can think still had object in operation on the current traffic direction, otherwise can think does not have object in operation on the current traffic direction.
Step 104, the indication of control traffic lights changes next traffic direction over to.
Because the sequencing of traffic direction preestablishes, therefore the indication of may command traffic lights changes default next traffic direction over to, and when the indication of control traffic lights changes next traffic direction over to, at first need through continuing the amber light state of Preset Time.For example, to 4 directions shown in Fig. 4 (d), the circular order of predeterminable traffic direction is direction 1 → direction 2 → direction 3 → direction 4 → direction 1 for Fig. 4 (a).
In the present embodiment, before the step 104 in carrying out flow process shown in Figure 1, if the longest run time that reaches this traffic direction working time on the current traffic direction, think that then arrive the working time of current traffic direction, enter step 104, the indication of control traffic lights changes next traffic direction over to.
In addition, for step 101 shown in Figure 1, also can be according to the periodic present image of gathering the crossing of the default time interval, then can need not when not matching same object, to return execution in step 101 in the step 102, when the direction of motion of object and current traffic direction are inconsistent, also need not to return execution in step 101 in the step 103.In addition, the acquisition method in the step 101 shown in Figure 1 also can have other acquisition method, is not limited to two kinds of foregoing description.
Preferably, may further be each traffic direction be set a working time the shortest, then carry out before the flow process shown in Figure 1, whether reach the shortest working time of default current traffic direction the working time of judging current traffic direction, if reach, then carry out flow process shown in Figure 1.
Below a kind of mode more excellent in the matching way of mentioning in the step 102 shown in Figure 1 is described in detail.
Adopt the mode of histogram coupling, can preestablish tracking queue, and tracking queue be initially sky; Afterwards, for each frame of handling, after extraction obtains foreground object, to current all foreground objects that obtain, employing is based on the mode of histogram coupling, find the maximum match degree of all objects in itself and the tracking queue, and when maximum match degree during, think coupling greater than preset threshold value TP, come from same object, adopt the object in the current foreground object renewal tracking queue, otherwise, it added to tracking queue as new candidate's object item; If tracking queue is empty, then the object that foreground extraction is obtained adds in the tracking queue.
Further, also can adopt the matching process of position-based and yardstick combination, when promptly foreground object being mated, adopt positional information and the size information auxiliary histogram of two objects in video to mate; Suppose that the object frame is respectively R in current foreground object frame and the tracking queue
1(cx1, cy1, w1, h1) and R
2(cx2, cy2, w2, h2), and cx1 wherein, cx2 is respectively the center horizontal ordinate of two rectangle frames, and cy1, cy2 are respectively the central longitudinal coordinate of two rectangle frames, and w1, w2 are respectively the width of two rectangle frames, and h1, h2 are respectively the height of two rectangle frames; The centre distance of two rectangle frames is dis=sqrt ((cx1-cx2)
2+ (cy1-cy2)
2), the position yardstick matching degree that then defines two rectangle frames is
Sqrt is open computing, and min is for getting the small value computing, and max is for getting big value computing, and DR and SR are default constant.
Further, the method that the method that method and the position-based yardstick based on the histogram coupling can also be mated combines, the matching degree that promptly final foreground object extracts object in result and the tracking queue multiply by rectangle position yardstick matching degree for the histogram matching degree.
For the object in the tracking queue,, can write down the occurrence number of this object in order to identify object (candidate's object) or the real object that disturbs, be assumed to n, if setting threshold TN then is n>TN, think that then this object is a real-world object, otherwise be candidate's object.Further, also can write down the frame number that object do not trace into is nm, to real-world object, if nm, thinks then that object disappears greater than preset threshold value TMN, deletes from formation; To candidate's object, if nm, thinks then that object disappears, and deletes from formation greater than preset threshold value TMPN.The final real-world object that only will occur carries out keeping records as effective object, is used for analyzing and inquiry.
More than the autocontrol method of the traffic lights in the embodiment of the invention is described in detail, again the automatic control system of traffic lights in the embodiment of the invention is described in detail below.
Fig. 5 is the exemplary block diagram of the automatic control system of traffic lights in the embodiment of the invention.As shown in Figure 5, this system comprises: timing unit, collecting unit, analytic unit and traffic lights control module.
Wherein, timing unit is used for carrying out timing the working time of the current traffic direction of traffic lights indication.
Collecting unit is used for constantly gathering the present image at crossing before longest run time that timing time at described timing unit reaches default current traffic direction.
Analytic unit is used for the image gathered according to described collecting unit, determines the direction of motion of object on the crossing, and according to the direction of motion of described object, determines whether there is object on the current traffic direction.
The traffic lights control module is used for when described analytic unit is determined not have object on the current traffic direction or the timing time of described timing unit when reaching the longest run time of default current traffic direction, and the indication of control traffic lights changes next traffic direction over to.
During specific implementation, the inner structure of analytic unit can have multiple way of realization, wherein a kind of can comprising as shown in Figure 6: foreground extraction unit, tracking and matching unit, direction determining unit and judging unit.
Wherein, the foreground extraction unit is used for the present image according to described collecting unit collection, extracts the foreground object in the image.During specific implementation, the foreground extraction unit can extract foreground object according to the background model at the crossing of having set up from the present image of described collecting unit collection; Perhaps, also can make difference etc., extract foreground object according to described collecting unit present image of gathering and the image of gathering before.
It is not the preceding N of current traffic direction that the tracking and matching unit is used at present image, and during image in N 〉=1 frame, the foreground object that described foreground extraction unit is extracted carries out tracking and matching with the foreground object that N continuous frame before extracts.
The direction determining unit is used for determining the direction of motion of this object according to the change in location of same object when described tracking and matching units match arrives same object.
Judging unit is used to judge whether described direction of motion is consistent with current traffic direction, if consistent, then determines to have object on the current traffic direction, otherwise, determine not exist on the current traffic direction object.
Further, the traffic lights control module also can be in described tracking and matching unit continuous N, and when M 〉=1 time did not match same object, the indication of control traffic lights changed next traffic direction over to.
In the present embodiment, can be consistent with the description in the flow process shown in Figure 1, a direction at default crossing is a horizontal ordinate x axle, vertically another direction of this direction is an ordinate y axle, and the positive dirction of true origin and x axle and y axle is set, obtain the image coordinate axle at crossing.Then the inner structure of direction determining unit can comprise as shown in Figure 7: position determination module, displacement computing module and direction determination module.
Wherein, position determination module is used for based on described image coordinate axle, determines the position (x of same object in two frames of front and back
n, y
n) and (x
N+1, y
N+1).
The displacement computing module is used for the position (x according to described object two frames in front and back
n, y
n) and (x
N+1, y
N+1), calculate the displacement (x of described object at the x axle
N+1-x
n) and at the displacement (y of y axle
N+1-y
n).
The direction determination module is used for according to described displacement (x
N+1-x
n) and (y
N+1-y
n), determine the direction of motion of described object.Concrete definite method also can comprise two kinds of methods describing in the step 102 shown in Figure 1.
Further, also can be each traffic direction be set a working time the shortest, then collecting unit correspondingly can reach at the timing time of described timing unit after the shortest working time of default current working time, carried out the operation of the present image at described collection crossing.
Each component units or module in the system in the present embodiment can realize by hardware, also can realize by software, and its concrete operations can be consistent with the method the operation described in the present embodiment, gives unnecessary details no longer one by one herein.
As seen, the automatic control scheme of traffic lights has been proposed in the embodiment of the invention, automatically the road conditions at crossing are analyzed in this scheme, obtain the traffic information under the current traffic direction of traffic lights indication, and the object of judging this direction has been finished when passing through, change the indication of traffic lights over to, thereby quickened traffic circulation speed, more preferably used path resource next traffic direction.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is preferred embodiment of the present invention; be not to be used to limit protection scope of the present invention; within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (14)
1. the autocontrol method of a traffic lights is characterized in that, this method comprises:
Reached in the working time of the current traffic direction of traffic lights indication before the longest run time of default current traffic direction, constantly gather the present image at crossing,, determine the direction of motion of object on the crossing according to the image of being gathered;
Judge whether described direction of motion is consistent with current traffic direction, if inconsistent, then determining does not have object on the current traffic direction, and the indication of control traffic lights changes next traffic direction over to; Otherwise when reached described longest run time the working time of current traffic direction, the indication of control traffic lights changed next traffic direction over to.
2. the method for claim 1 is characterized in that, the described present image of constantly gathering the crossing according to the image of being gathered, determines that the direction of motion of object comprises on the crossing:
The present image at A, collection crossing, and according to the foreground object in the described present image extraction image, the object that moves on the corresponding crossing of described foreground object;
B, if present image is not the image in the preceding N frame of current traffic direction, then the foreground object with described foreground object and N continuous frame extraction before carries out tracking and matching, if match same object, then determine the direction of motion of this object according to the change in location of same object; N 〉=1 wherein;
This method further comprises: when judging that described direction of motion is consistent with current traffic direction, return execution in step A.
3. the method for claim 1 is characterized in that, the described present image of constantly gathering the crossing according to the image of being gathered, determines that the direction of motion of object comprises on the crossing:
A, gather the present image at crossing according to the default time interval, and extract foreground object in the image, the object that moves on the corresponding crossing of described foreground object according to described present image;
B, if present image is not the image in the preceding N frame of current traffic direction, then the foreground object with described foreground object and N continuous frame extraction before carries out tracking and matching, if match same object, then determine the direction of motion of this object according to the change in location of same object; N 〉=1 wherein.
4. as claim 2 or 3 described methods, it is characterized in that, further comprise among the step B: if do not match same object, judge whether that then continuous N time does not match same object, if then determining does not have object on the current traffic direction; M 〉=1 wherein.
5. as claim 2 or 3 described methods, it is characterized in that the described foreground object that extracts in the image according to present image is: the background model of described present image with the crossing of having set up compared, from described present image, extract foreground object.
6. method as claimed in claim 5 is characterized in that, the background model at crossing described in the steps A is: the background model at the crossing of bringing in constant renewal in according to the environmental change at crossing.
7. as claim 2 or 3 described methods, it is characterized in that described change in location according to same object determines that the direction of motion of this object comprises:
A direction at default crossing is a horizontal ordinate x axle, and vertically another direction of this direction is an ordinate y axle, and the positive dirction of true origin and x axle and y axle is set, and obtains the image coordinate axle at crossing;
Based on described image coordinate axle, determine the position (x of same object in two frames of front and back
n, y
n) and (x
N+1, y
N+1), and calculate the displacement (x of described object at the x axle
N+1-x
n) and at the displacement (y of y axle
N+1-y
n);
According to described displacement (x
N+1-x
n) and (y
N+1-y
n), determine the direction of motion of described object.
8. method as claimed in claim 7 is characterized in that, and is described according to displacement (x
N+1-x
n) and (y
N+1-y
n), determine that the direction of motion of described object comprises:
The default axial threshold value Tx of x, the axial threshold value Ty of y;
If | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |<Ty, determine that then the direction of motion of this object is the direction that is parallel to the x axle;
If | (x
N+1-x
n) |<Tx, | (y
N+1-y
n) |>Ty, determine that then the direction of motion of this object is the direction that is parallel to the y axle;
If | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |>Ty, and (x
N+1-x
n) (y
N+1-y
n)>0, the direction of motion of then determining this object is for being the direction of 45 ° or-135 ° with x axle positive dirction;
If | (x
N+1-x
n) |>Tx, | (y
N+1-y
n) |>Ty, and (x
N+1-x
n) (y
N+1-y
n)<0, the direction of motion of then determining this object is for being the direction of 135 ° or-45 ° with x axle positive dirction.
9. as claim 2 or 3 described methods, it is characterized in that, before the steps A, further comprise: whether reach the shortest working time of default current traffic direction the working time of judging current traffic direction, if then carry out described steps A.
10. the automatic control system of a traffic lights is characterized in that, this system comprises:
Timing unit is used for carrying out timing the working time of the current traffic direction of traffic lights indication;
Collecting unit is used for constantly gathering the present image at crossing before longest run time that timing time at described timing unit reaches default current traffic direction;
Analytic unit is used for the image according to described collecting unit collection, determines the direction of motion of object on the crossing, judges whether described direction of motion is consistent with current traffic direction, if inconsistent, determines not have object on the current traffic direction;
The traffic lights control module, be used for when described analytic unit is determined not have object on the current traffic direction or the timing time of described timing unit when reaching the longest run time of default current traffic direction, the indication of control traffic lights changes next traffic direction over to.
11. system as claimed in claim 10 is characterized in that, described analytic unit comprises:
The foreground extraction unit is used for the present image according to described collecting unit collection, extracts the foreground object in the image, the object that moves on the corresponding crossing of described foreground object;
The tracking and matching unit is used for when present image is not the image of preceding N frame of current traffic direction, and the foreground object that described foreground extraction unit is extracted carries out tracking and matching with the foreground object that N continuous frame before extracts; N 〉=1 wherein;
The direction determining unit is used for determining the direction of motion of this object according to the change in location of same object when described tracking and matching units match arrives same object;
Judging unit is used to judge whether described direction of motion is consistent with current traffic direction, if consistent, then determines to have object on the current traffic direction, otherwise, determine not exist on the current traffic direction object.
12. system as claimed in claim 11 is characterized in that, described traffic lights control module is further used for when described tracking and matching unit continuous N time does not match same object, and the indication of control traffic lights changes next traffic direction over to; M 〉=1 wherein.
13. system as claimed in claim 11, it is characterized in that a direction at default crossing is a horizontal ordinate x axle, vertically another direction of this direction is an ordinate y axle, and the positive dirction of true origin and x axle and y axle is set, obtain the image coordinate axle at crossing;
Described direction determining unit comprises:
Position determination module is used for based on described image coordinate axle, determines the position (x of same object in two frames of front and back
n, y
n) and (x
N+1, y
N+1);
The displacement computing module is used for the position (x according to described object two frames in front and back
n, y
n) and (x
N+1, y
N+1), calculate the displacement (x of described object at the x axle
N+1-x
n) and at the displacement (y of y axle
N+1-y
n);
The direction determination module is used for according to described displacement (x
N+1-x
n) and (y
N+1-y
n), determine the direction of motion of described object.
14. as each described system in the claim 10 to 13, it is characterized in that, described collecting unit further after the timing time of described timing unit reaches the shortest working time of default current working time, is carried out the present image at described collection crossing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007103039126A CN101211508B (en) | 2007-12-21 | 2007-12-21 | Traffic lamp automatic control method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2007103039126A CN101211508B (en) | 2007-12-21 | 2007-12-21 | Traffic lamp automatic control method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101211508A CN101211508A (en) | 2008-07-02 |
CN101211508B true CN101211508B (en) | 2010-07-07 |
Family
ID=39611508
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2007103039126A Active CN101211508B (en) | 2007-12-21 | 2007-12-21 | Traffic lamp automatic control method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101211508B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104219830B (en) * | 2014-01-19 | 2017-09-12 | 吴嘉懿 | Dimmable lighting light fixture |
CN114707560B (en) * | 2022-05-19 | 2024-02-09 | 北京闪马智建科技有限公司 | Data signal processing method and device, storage medium and electronic device |
-
2007
- 2007-12-21 CN CN2007103039126A patent/CN101211508B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN101211508A (en) | 2008-07-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111583675B (en) | Regional road network traffic signal lamp coordination control system and method | |
CN100551048C (en) | Multiple-camera supervisory control system and tracking thereof based on the three-dimensional video-frequency dynamic tracking | |
CN105336169B (en) | A kind of method and system that traffic congestion is judged based on video | |
CN101510356B (en) | Video detection system and data processing device thereof, video detection method | |
CN103714698B (en) | Public transit vehicle passenger flow volume statistical system based on range image and method | |
CN100573618C (en) | A kind of traffic intersection four-phase vehicle flow detection method | |
CN103345840B (en) | Road incidents video detecting method is crossed at a kind of cross channel crossing | |
CN103258425B (en) | Method for detecting vehicle queuing length at road crossing | |
CN102819764A (en) | Method for counting pedestrian flow from multiple views under complex scene of traffic junction | |
CN101577054A (en) | Control method of traffic signal lamp and system | |
CN103366568B (en) | Traffic section vehicle queue's video detecting method and system | |
CN104778846A (en) | Computer-vision-based traffic light control method | |
CN103871079A (en) | Vehicle tracking method based on machine learning and optical flow | |
CN105513342A (en) | Video-tracking-based vehicle queuing length calculating method | |
CN105513349A (en) | Double-perspective learning-based mountainous area highway vehicle event detection method | |
CN106558224B (en) | A kind of traffic intelligent monitoring and managing method based on computer vision | |
CN111951576A (en) | Traffic light control system based on vehicle identification and method thereof | |
CN116434159A (en) | Traffic flow statistics method based on improved YOLO V7 and Deep-Sort | |
CN110718077A (en) | Signal lamp optimization timing method under action-evaluation mechanism | |
CN103646254A (en) | High-density pedestrian detection method | |
CN111915885A (en) | Urban road traffic simulation experiment method and system | |
CN108499081A (en) | A kind of control method and intelligent wearable device of intelligent wearable device | |
CN106791277A (en) | A kind of car tracing method in video monitoring | |
CN101211508B (en) | Traffic lamp automatic control method and system | |
CN112215073A (en) | Traffic marking line rapid identification and tracking method under high-speed motion scene |
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 | ||
C41 | Transfer of patent application or patent right or utility model | ||
TR01 | Transfer of patent right |
Effective date of registration: 20160516 Address after: 519031 Guangdong city of Zhuhai province Hengqin Baohua Road No. 6, room 105 -478 Patentee after: GUANGDONG ZHONGXING ELECTRONICS CO., LTD. Address before: 100083, Haidian District, Xueyuan Road, Beijing No. 35, Nanjing Ning building, 15 Floor Patentee before: Beijing Vimicro Corporation |