Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
a4385b18
Commit
a4385b18
authored
Dec 02, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created output doc help() file.
parent
d3ce471c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
kalman.c
samples/c/kalman.c
+21
-14
No files found.
samples/c/kalman.c
View file @
a4385b18
/*
Tracking of rotating point.
Rotation speed is constant.
Both state and measurements vectors are 1D (a point angle),
Measurement is the real point angle + gaussian noise.
The real and the estimated points are connected with yellow line segment,
the real and the measured points are connected with red line segment.
(if Kalman filter works correctly,
the yellow segment should be shorter than the red one).
Pressing any key (except ESC) will reset the tracking with a different speed.
Pressing ESC will stop the program.
*/
#include "opencv2/video/tracking.hpp"
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <stdio.h>
void
help
()
{
printf
(
"
\n
Examle of c calls to OpenCV's Kalman filter.
\n
"
" Tracking of rotating point.
\n
"
" Rotation speed is constant.
\n
"
" Both state and measurements vectors are 1D (a point angle),
\n
"
" Measurement is the real point angle + gaussian noise.
\n
"
" The real and the estimated points are connected with yellow line segment,
\n
"
" the real and the measured points are connected with red line segment.
\n
"
" (if Kalman filter works correctly,
\n
"
" the yellow segment should be shorter than the red one).
\n
"
"
\n
"
" Pressing any key (except ESC) will reset the tracking with a different speed.
\n
"
" Pressing ESC will stop the program.
\n
"
);
}
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
const
float
A
[]
=
{
1
,
1
,
0
,
1
};
const
float
A
[]
=
{
1
,
1
,
0
,
1
};
help
();
IplImage
*
img
=
cvCreateImage
(
cvSize
(
500
,
500
),
8
,
3
);
IplImage
*
img
=
cvCreateImage
(
cvSize
(
500
,
500
),
8
,
3
);
CvKalman
*
kalman
=
cvCreateKalman
(
2
,
1
,
0
);
CvKalman
*
kalman
=
cvCreateKalman
(
2
,
1
,
0
);
CvMat
*
state
=
cvCreateMat
(
2
,
1
,
CV_32FC1
);
/* (phi, delta_phi) */
CvMat
*
state
=
cvCreateMat
(
2
,
1
,
CV_32FC1
);
/* (phi, delta_phi) */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment