- Author: Haibo Wang
- Email: [email protected]
- This is an open source Object-Tracking library, The development language is C++, The classic and mainstream object tracking algorithms and related algorithms are reproduced(For example, RANSAC, least squares and so on). Of course, these are optimized by Eigen3 and openMP.
- CPU: intel i5 7500
- Memory: 8G x 2 DDR4
- GPU: GTX 1070 8GHz
- RANSAC:
Linear Fitting, 600 sample point, 500 iteration, Time consuming: 70-100us
The least-square method
RANSAC
- Kalman Filter:
Two dimensional coordinate tracking, System state variable is [x,y,dx,dy], prediction+update. Mean time consuming: 8us
- MeanShift:
Using kernel function,refactoring with Eigen3 and openMP, Test images's size is 640x480, using RGB color space. Mean time consuming:100-2000us
- Using opencv's own calibration tool to calculate the internal parameters of the camera, the chessboard picture has been given, fool-style operation, take a look.
DasudaRunner/Object-Tracking/calibration_camera
opencv:>=3.3.0 or >=3.0.0
python:>=2.7
python-opencv:
./src$ python getChecker.py # press 's' to save image
./src$ sudo sh calibration_camera.sh
Now you can get out_camera_data.yml , this is a file that contains your camera's internal reference.
./src$ ./demo ../out_camera_data.yml
Actually, it call the function remap_image() in tracking.hpp.
#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>
#include "../../../tracking.hpp"
using namespace std;
int main(int argc, char* argv[])
{
cv::VideoCapture cap;
cap.open(0);
wong::calibration_camera camera(argv[1]);
cv::Mat frame,out;
cout<<"Press any key to exit the program !"<<endl;
for (;;){
cap >> frame;
camera.remap_image(frame,out);
cv::imshow("source",frame);
cv::imshow("corrected",out);
if(cv::waitKey(5)>=0)
break;
}
}