CN104820823A - Vehicle-mounted pedestrian recognition method and system based on OpenCv Kalman filter - Google Patents
Vehicle-mounted pedestrian recognition method and system based on OpenCv Kalman filter Download PDFInfo
- Publication number
- CN104820823A CN104820823A CN201510194120.4A CN201510194120A CN104820823A CN 104820823 A CN104820823 A CN 104820823A CN 201510194120 A CN201510194120 A CN 201510194120A CN 104820823 A CN104820823 A CN 104820823A
- Authority
- CN
- China
- Prior art keywords
- vehicle
- opencv
- kalman filter
- matrix
- pedestrian recognition
- 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
- Traffic Control Systems (AREA)
Abstract
The invention provides a highly accurate vehicle-mounted pedestrian recognition method and system based on an OpenCv Kalman filter. The invention provides the vehicle-mounted pedestrian recognition method and system based on the OpenCv Kalman filter, the method comprising an S1 step of matching lane templates in a storage; an S2 step of predicting the distance between a vehicle and other vehicles and the distance between the vehicle and pedestrians; an S3 step of determining whether the distances exceed a threshold; an S4 step of giving out an alarm if so, otherwise, updating the lane templates in the storage and returning back to the S1 step. The invention has the beneficial effect of improving the vehicle-mounted pedestrian recognition accuracy.
Description
Technical field
The present invention relates to vehicle-mounted pedestrian recognition methods, particularly relate to a kind of vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter and system thereof.
Background technology
The error of existing vehicle-mounted pedestrian recognition methods is comparatively large, and recognition effect is poor.
Summary of the invention
In order to solve the problems of the prior art, the invention provides the high vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter of a kind of precision and system thereof.
The invention provides a kind of vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter, comprise the following steps:
S1, the track template in storer to be mated;
S2, Ben Che and other vehicles and the distance between Ben Che and pedestrian to be predicted;
Whether S3, judging distance exceed threshold values;
If S4 exceeds threshold values, then report to the police, if do not exceed threshold values, then the track template more in new memory also returns step S1.
As a further improvement on the present invention, step S2 also comprises and predicting Ben Che and other vehicles and the angle between Ben Che and pedestrian; Step S3 also comprises and judges whether angle exceeds threshold values.
As a further improvement on the present invention, in step S1: by difference algorithm according to track template matches figure, determine its similarity, define a variable, preserve its similarity, when similarity is greater than 0.85, determine that the match is successful.
As a further improvement on the present invention, forecasting process in step S2 comprises: call the estimated value that member function predict obtains current state variable, its Kalman filter, by calculating that forward first state variable equation, forward reckon error covariance equation construct, obtains pre-estimating of next time state; The posteriority covariance that the kalman gain that the estimated value of the current variable of its invocation of procedure member function predict, kalman gain equation calculate, posteriority covariance equation calculate, can predict result next time.
As a further improvement on the present invention, calculate that forward state variable equation is: X (k|k-1)=A X (k-1|k-1)+B U (k), wherein, A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
As a further improvement on the present invention, reckon error covariance equation is forward: P (k|k-1)=A P (k-1|k-1) A '+Q, wherein, and A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
As a further improvement on the present invention, kalman gain equation is: Kg (k)=P (k|k-1) H '/(H P (k|k-1) H '+R), wherein, and A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
As a further improvement on the present invention, the predictive equation of result is next time: X (k|k)=X (k|k-1)+Kg (k) (Z (k)-H X (k|k-1)), wherein, A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
As a further improvement on the present invention, posteriority covariance equation is: P (k|k)=(I-Kg (k) H) P (k|k-1), wherein, and A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
Present invention also offers a kind of vehicle-mounted pedestrian recognition system based on OpenCv Kalman filter, comprise microprocessor, camera, alarm, image processor and storer, wherein, described microprocessor is connected with described camera, alarm, image processor respectively, and described image processor is connected with described storer.
The invention has the beneficial effects as follows: by such scheme, improve accuracy of identification.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of a kind of vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter of the present invention;
Fig. 2 is the structured flowchart of the streaming system of a kind of vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter of the present invention.
Embodiment
Illustrate below in conjunction with accompanying drawing and embodiment the present invention is further described.
Drawing reference numeral in Fig. 2 is: microprocessor 100; Camera 200; Alarm 300; Graphic process unit 400; Storer 500.
As shown in Figure 1, a kind of vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter, comprises the following steps:
S1, by opencv built-in function respectively initialization ransitionMatrix; MeasurementMatrix; ProcessNoiseCov; MeasurementNoiseCov; ErrorCovPost, equivalent in matrix, the track template in storer is mated;
S2, predict Ben Che and other vehicles and the distance between Ben Che and pedestrian, its process implementation is corrected measured value for calling member function correct observed reading;
Whether S3, judging distance exceed threshold values;
If S4 exceeds threshold values, then report to the police, if do not exceed threshold values, then the track template more in new memory also returns step S1.
The full name of OpenCV is: Open Source Computer Vision Library.OpenCV is a cross-platform computer vision library of issuing based on (increasing income), may operate in Linux, Windows and Mac OS operating system.Its lightweight and efficient---be made up of a series of C function and a small amount of C++ class, provide the interface of the language such as Python, Ruby, MATLAB simultaneously, achieve a lot of general-purpose algorithms of image procossing and computer vision aspect.
Step S2 also comprises and predicting Ben Che and other vehicles and the angle between Ben Che and pedestrian; Step S3 also comprises and judges whether angle exceeds threshold values.
In step S1: by difference algorithm according to track template matches figure, determine its similarity, define a variable, preserve its similarity, when similarity is greater than 0.85, determine that the match is successful.
Forecasting process in step S2 comprises: call the estimated value that member function predict obtains current state variable, its Kalman filter, by calculating that forward first state variable equation, forward reckon error covariance equation construct, obtains pre-estimating of next time state; The posteriority covariance that the kalman gain that the estimated value of the current variable of its invocation of procedure member function predict, kalman gain equation calculate, posteriority covariance equation calculate, can predict result next time.
Calculate that forward state variable equation is: X (k|k-1)=A X (k-1|k-1)+B U (k); Reckon error covariance equation is forward: P (k|k-1)=A P (k-1|k-1) A '+Q; Kalman gain equation is: Kg (k)=P (k|k-1) H '/(H P (k|k-1) H '+R); The predictive equation of result is next time: X (k|k)=X (k|k-1)+Kg (k) (Z (k)-H X (k|k-1)); Posteriority covariance equation is: P (k|k)=(I-Kg (k) H) P (k|k-1), wherein, and A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
Each two field picture, upgrade in time when predicting complete template.Compare finally by predicted value and threshold values, if exceed threshold values, then give the alarm at once.
As shown in Figure 2, a kind of vehicle-mounted pedestrian recognition system based on OpenCv Kalman filter, comprise microprocessor 100, camera 200, alarm 300, image processor 400 and storer 500, wherein, described microprocessor 100 is connected with described camera 200, alarm 300, image processor 400 respectively, and described image processor 400 is connected with described storer 500.
Wherein, after detecting that pedestrian's distance is less than threshold values by microprocessor 100, alarm 300 sends warning by loudspeaker, by this system, great raising is obtained in the accuracy predicted and promptness, average response speed improves general 0.02s than usual system, high-precision vehicle-mounted for needs, and this 0.02s is very fatal.
The present invention successfully introduces OpenCv in vehicle-mounted embedded type field, by vehicle-mounted camera 200, coordinate microprocessor 100, image processor 400, storer 500, pass through Kalman Algorithm, prediction and actual measuring and calculating are compared, realize the prediction to lane shift, promptness and accuracy are obtained for and improve greatly.
Provided by the invention a kind of based on the vehicle-mounted pedestrian recognition methods of OpenCv Kalman filter and the advantage of system as follows:
1. use Kalman Algorithm to the pedestrian in motion, have better early warning effect.
2. the storehouse opencv that will increase income is used in vehicle imbedding type system, coordinates CPU and GPU make predetermined speed and be greatly improved.
3. use opencv to increase income storehouse algorithm, support C, C++, MATLAB multilingual, in test, and there is in performance history very large convenience.
Above content is in conjunction with concrete preferred implementation further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, some simple deduction or replace can also be made, all should be considered as belonging to protection scope of the present invention.
Claims (10)
1., based on a vehicle-mounted pedestrian recognition methods for OpenCv Kalman filter, it is characterized in that, comprise the following steps:
S1, the track template in storer to be mated;
S2, Ben Che and other vehicles and the distance between Ben Che and pedestrian to be predicted;
Whether S3, judging distance exceed threshold values;
If S4 exceeds threshold values, then report to the police, if do not exceed threshold values, then the track template more in new memory also returns step S1.
2. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 1, is characterized in that, and: step S2 also comprises and predicting Ben Che and other vehicles and the angle between Ben Che and pedestrian; Step S3 also comprises and judges whether angle exceeds threshold values.
3. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 1, it is characterized in that: in step S1: by difference algorithm according to track template matches figure, determine its similarity, define a variable, preserve its similarity, when similarity is greater than 0.85, determine that the match is successful.
4. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 1, it is characterized in that: the forecasting process in step S2 comprises: call the estimated value that member function predict obtains current state variable, its Kalman filter, by calculating that forward first state variable equation, forward reckon error covariance equation construct, obtains pre-estimating of next time state; The posteriority covariance that the kalman gain that the estimated value of the current variable of its invocation of procedure member function predict, kalman gain equation calculate, posteriority covariance equation calculate, can predict result next time.
5. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 4, it is characterized in that: calculate that forward state variable equation is: X (k|k-1)=A X (k-1|k-1)+B U (k), wherein, A: state-transition matrix; B: unit matrix; X: state variable; U: noise during observation.
6. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 5, it is characterized in that: reckon error covariance equation is forward: P (k|k-1)=A P (k-1|k-1) A '+Q, wherein, A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; X: state variable; U: noise during observation.
7. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 6, it is characterized in that: kalman gain equation is: Kg (k)=P (k|k-1) H '/(H P (k|k-1) H '+R), wherein, A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; X: state variable; U: noise during observation; R: the covariance matrix of measurement noise.
8. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 7, it is characterized in that: the predictive equation of result is next time: X (k|k)=X (k|k-1)+Kg (k) (Z (k)-H X (k|k-1)), wherein, A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
9. the vehicle-mounted pedestrian recognition methods based on OpenCv Kalman filter according to claim 8, it is characterized in that: posteriority covariance equation is: P (k|k)=(I-Kg (k) H) P (k|k-1), wherein, A: state-transition matrix; B: unit matrix; Q: Gaussian noise covariance matrix; P: posteriority error covariance matrix; I: unit matrix; X: state variable; Z: actual measurement result; U: noise during observation; R: the covariance matrix of measurement noise.
10. the vehicle-mounted pedestrian recognition system based on OpenCv Kalman filter, it is characterized in that: comprise microprocessor, camera, alarm, image processor and storer, wherein, described microprocessor is connected with described camera, alarm, image processor respectively, and described image processor is connected with described storer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510194120.4A CN104820823A (en) | 2015-04-22 | 2015-04-22 | Vehicle-mounted pedestrian recognition method and system based on OpenCv Kalman filter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510194120.4A CN104820823A (en) | 2015-04-22 | 2015-04-22 | Vehicle-mounted pedestrian recognition method and system based on OpenCv Kalman filter |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104820823A true CN104820823A (en) | 2015-08-05 |
Family
ID=53731113
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510194120.4A Pending CN104820823A (en) | 2015-04-22 | 2015-04-22 | Vehicle-mounted pedestrian recognition method and system based on OpenCv Kalman filter |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104820823A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107370949A (en) * | 2017-08-09 | 2017-11-21 | 成都全云科技有限公司 | Position rotating system based on picture pick-up device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120022784A1 (en) * | 2010-06-25 | 2012-01-26 | Thales | Navigation filter for a navigation system using terrain correlation |
CN102360499A (en) * | 2011-06-30 | 2012-02-22 | 电子科技大学 | Multi-lane line tracking method based on Kalman filter bank |
CN102395009A (en) * | 2011-06-29 | 2012-03-28 | 广东好帮手电子科技股份有限公司 | Vehicle-mounted infrared night vision system with pedestrian identification function |
CN104134360A (en) * | 2014-08-14 | 2014-11-05 | 奇瑞汽车股份有限公司 | Intersection pedestrian recognition safety control system and method based on short-range communication |
-
2015
- 2015-04-22 CN CN201510194120.4A patent/CN104820823A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120022784A1 (en) * | 2010-06-25 | 2012-01-26 | Thales | Navigation filter for a navigation system using terrain correlation |
CN102395009A (en) * | 2011-06-29 | 2012-03-28 | 广东好帮手电子科技股份有限公司 | Vehicle-mounted infrared night vision system with pedestrian identification function |
CN102360499A (en) * | 2011-06-30 | 2012-02-22 | 电子科技大学 | Multi-lane line tracking method based on Kalman filter bank |
CN104134360A (en) * | 2014-08-14 | 2014-11-05 | 奇瑞汽车股份有限公司 | Intersection pedestrian recognition safety control system and method based on short-range communication |
Non-Patent Citations (1)
Title |
---|
孔金生 等: ""基于联合卡尔曼滤波的汽车防碰撞多传感器信息融合方法"", 《郑州大学学报(理学版)》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107370949A (en) * | 2017-08-09 | 2017-11-21 | 成都全云科技有限公司 | Position rotating system based on picture pick-up device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107687850B (en) | Unmanned aerial vehicle pose estimation method based on vision and inertia measurement unit | |
US11170525B2 (en) | Autonomous vehicle based position detection method and apparatus, device and medium | |
US11157737B2 (en) | Cultivated land recognition method in satellite image and computing device | |
CN109229109B (en) | Method, device, equipment and computer storage medium for judging vehicle driving direction | |
US10645668B2 (en) | Indoor positioning system and method based on geomagnetic signals in combination with computer vision | |
KR101402206B1 (en) | Multiple target tracking method with kinematics and feature information of targets | |
CN112785625A (en) | Target tracking method and device, electronic equipment and storage medium | |
CN113420682A (en) | Target detection method and device in vehicle-road cooperation and road side equipment | |
CN111091529A (en) | People counting method and system | |
CN113688730A (en) | Obstacle ranging method, apparatus, electronic device, storage medium, and program product | |
CN116563376A (en) | LIDAR-IMU tight coupling semantic SLAM method based on deep learning and related device | |
WO2021056450A1 (en) | Method for updating image template, device, and storage medium | |
CN113554712B (en) | Registration method and device of automatic driving vehicle, electronic equipment and vehicle | |
CN104820822A (en) | Vehicle-mounted road offset identification method and system based on OpenCv Kalman filter | |
CN113219505A (en) | Method, device and equipment for acquiring GPS coordinates for vehicle-road cooperative tunnel scene | |
CN104820823A (en) | Vehicle-mounted pedestrian recognition method and system based on OpenCv Kalman filter | |
CN104821100A (en) | Vehicle-mounted forward collision early warning method and system based on OpenCv Kalman filter | |
CN104794447A (en) | Vehicle-mounted tunnel recognition method and system based on OpenCv Kalman filter | |
CN115223135B (en) | Parking space tracking method and device, vehicle and storage medium | |
CN114037977B (en) | Road vanishing point detection method, device, equipment and storage medium | |
CN114429631B (en) | Three-dimensional object detection method, device, equipment and storage medium | |
CN114120252B (en) | Automatic driving vehicle state identification method and device, electronic equipment and vehicle | |
CN113450794B (en) | Navigation broadcasting detection method and device, electronic equipment and medium | |
CN115392407A (en) | Method, device, equipment and medium for warning danger source based on unsupervised learning | |
CN111160190B (en) | Vehicle-mounted pedestrian detection-oriented classification auxiliary kernel correlation filtering tracking method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
EXSB | Decision made by sipo to initiate substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20150805 |
|
RJ01 | Rejection of invention patent application after publication |