├── README.md ├── kcf_tld_tracking_ros ├── KCF_TLD │ ├── KCF │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── launch │ │ │ └── kcf.launch │ │ ├── msg │ │ │ └── BoundingBox.msg │ │ ├── package.xml │ │ └── src │ │ │ ├── 3rdparty │ │ │ ├── cv_ext │ │ │ │ ├── init_box_selector.cpp │ │ │ │ ├── init_box_selector.hpp │ │ │ │ ├── math_spectrums.cpp │ │ │ │ ├── math_spectrums.hpp │ │ │ │ ├── psr.hpp │ │ │ │ ├── shift.cpp │ │ │ │ ├── shift.hpp │ │ │ │ ├── tracker_run.cpp │ │ │ │ └── tracker_run.hpp │ │ │ ├── piotr │ │ │ │ ├── README.md │ │ │ │ ├── gradientMex.hpp │ │ │ │ └── src │ │ │ │ │ ├── gradientMex.cpp │ │ │ │ │ ├── sse.hpp │ │ │ │ │ └── wrappers.hpp │ │ │ └── tclap │ │ │ │ ├── AUTHORS │ │ │ │ ├── COPYING │ │ │ │ ├── ChangeLog │ │ │ │ ├── INSTALL │ │ │ │ ├── Makefile.am │ │ │ │ ├── Makefile.in │ │ │ │ ├── README │ │ │ │ └── tclap │ │ │ │ ├── Arg.h │ │ │ │ ├── ArgException.h │ │ │ │ ├── ArgTraits.h │ │ │ │ ├── CmdLine.h │ │ │ │ ├── CmdLineInterface.h │ │ │ │ ├── CmdLineOutput.h │ │ │ │ ├── Constraint.h │ │ │ │ ├── DocBookOutput.h │ │ │ │ ├── HelpVisitor.h │ │ │ │ ├── IgnoreRestVisitor.h │ │ │ │ ├── Makefile.am │ │ │ │ ├── Makefile.in │ │ │ │ ├── MultiArg.h │ │ │ │ ├── MultiSwitchArg.h │ │ │ │ ├── OptionalUnlabeledTracker.h │ │ │ │ ├── StandardTraits.h │ │ │ │ ├── StdOutput.h │ │ │ │ ├── SwitchArg.h │ │ │ │ ├── UnlabeledMultiArg.h │ │ │ │ ├── UnlabeledValueArg.h │ │ │ │ ├── ValueArg.h │ │ │ │ ├── ValuesConstraint.h │ │ │ │ ├── VersionVisitor.h │ │ │ │ ├── Visitor.h │ │ │ │ ├── XorHandler.h │ │ │ │ └── ZshCompletionOutput.h │ │ │ ├── cf_libs │ │ │ ├── common │ │ │ │ ├── cf_tracker.hpp │ │ │ │ ├── cv_ext.hpp │ │ │ │ ├── feature_channels.hpp │ │ │ │ ├── mat_consts.hpp │ │ │ │ ├── math_helper.cpp │ │ │ │ ├── math_helper.hpp │ │ │ │ ├── scale_estimator.hpp │ │ │ │ └── tracker_debug.hpp │ │ │ ├── dsst │ │ │ │ ├── dsst_debug.hpp │ │ │ │ └── dsst_tracker.hpp │ │ │ └── kcf │ │ │ │ ├── .kcf_tracker.hpp.swp │ │ │ │ ├── kcf_debug.hpp │ │ │ │ └── kcf_tracker.hpp │ │ │ └── main │ │ │ ├── image_acquisition.cpp │ │ │ ├── image_acquisition.hpp │ │ │ ├── main_dsst.cpp │ │ │ └── main_kcf.cpp │ ├── KCFtld │ │ ├── AUTHORS │ │ ├── CMakeLists.txt │ │ ├── CMakeLists2.txt │ │ ├── LICENSE │ │ ├── OpenTLDConfig.cmake.in │ │ ├── README.md │ │ ├── launch │ │ │ └── kcftld.launch │ │ ├── package.xml │ │ ├── sample │ │ │ ├── DSSTtld_sample_image_sequence_linux.sh │ │ │ ├── DSSTtld_sample_image_sequence_windows.bat │ │ │ ├── DSSTtld_sample_video_linux.sh │ │ │ ├── DSSTtld_sample_video_windows.bat │ │ │ ├── KCFtld_sample_image_sequence_linux.sh │ │ │ ├── KCFtld_sample_image_sequence_windows.bat │ │ │ ├── KCFtld_sample_video_linux.sh │ │ │ ├── KCFtld_sample_video_windows.bat │ │ │ ├── config-sample.cfg │ │ │ ├── sample_image_sequence.cfg │ │ │ ├── sample_sequence_compressed │ │ │ │ ├── 00001.jpg │ │ │ │ ├── 00002.jpg │ │ │ │ ├── 00003.jpg │ │ │ │ ├── 00004.jpg │ │ │ │ ├── 00005.jpg │ │ │ │ ├── 00006.jpg │ │ │ │ ├── 00007.jpg │ │ │ │ ├── 00008.jpg │ │ │ │ ├── 00009.jpg │ │ │ │ ├── 00010.jpg │ │ │ │ ├── 00011.jpg │ │ │ │ ├── 00012.jpg │ │ │ │ ├── 00013.jpg │ │ │ │ ├── 00014.jpg │ │ │ │ ├── 00015.jpg │ │ │ │ ├── 00016.jpg │ │ │ │ ├── 00017.jpg │ │ │ │ ├── 00018.jpg │ │ │ │ ├── 00019.jpg │ │ │ │ ├── 00020.jpg │ │ │ │ ├── 00021.jpg │ │ │ │ ├── 00022.jpg │ │ │ │ ├── 00023.jpg │ │ │ │ ├── 00024.jpg │ │ │ │ ├── 00025.jpg │ │ │ │ ├── 00026.jpg │ │ │ │ ├── 00027.jpg │ │ │ │ ├── 00028.jpg │ │ │ │ ├── 00029.jpg │ │ │ │ ├── 00030.jpg │ │ │ │ ├── 00031.jpg │ │ │ │ ├── 00032.jpg │ │ │ │ ├── 00033.jpg │ │ │ │ ├── 00034.jpg │ │ │ │ ├── 00035.jpg │ │ │ │ ├── 00036.jpg │ │ │ │ ├── 00037.jpg │ │ │ │ ├── 00038.jpg │ │ │ │ ├── 00039.jpg │ │ │ │ ├── 00040.jpg │ │ │ │ ├── 00041.jpg │ │ │ │ ├── 00042.jpg │ │ │ │ ├── 00043.jpg │ │ │ │ ├── 00044.jpg │ │ │ │ ├── 00045.jpg │ │ │ │ ├── 00046.jpg │ │ │ │ ├── 00047.jpg │ │ │ │ ├── 00048.jpg │ │ │ │ ├── 00049.jpg │ │ │ │ ├── 00050.jpg │ │ │ │ ├── 00051.jpg │ │ │ │ ├── 00052.jpg │ │ │ │ ├── 00053.jpg │ │ │ │ ├── LICENSE.txt │ │ │ │ └── sample_sequence_compressed.avi │ │ │ └── sample_video.cfg │ │ └── src │ │ │ ├── 3rdparty │ │ │ ├── cf_tracking │ │ │ │ ├── .gitignore │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── README.md │ │ │ │ └── src │ │ │ │ │ ├── 3rdparty │ │ │ │ │ ├── cv_ext │ │ │ │ │ │ ├── init_box_selector.cpp │ │ │ │ │ │ ├── init_box_selector.hpp │ │ │ │ │ │ ├── math_spectrums.cpp │ │ │ │ │ │ ├── math_spectrums.hpp │ │ │ │ │ │ ├── psr.hpp │ │ │ │ │ │ ├── shift.cpp │ │ │ │ │ │ ├── shift.hpp │ │ │ │ │ │ ├── tracker_run.cpp │ │ │ │ │ │ └── tracker_run.hpp │ │ │ │ │ ├── piotr │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── gradientMex.hpp │ │ │ │ │ │ └── src │ │ │ │ │ │ │ ├── gradientMex.cpp │ │ │ │ │ │ │ ├── sse.hpp │ │ │ │ │ │ │ └── wrappers.hpp │ │ │ │ │ └── tclap │ │ │ │ │ │ ├── AUTHORS │ │ │ │ │ │ ├── COPYING │ │ │ │ │ │ ├── ChangeLog │ │ │ │ │ │ ├── INSTALL │ │ │ │ │ │ ├── Makefile.am │ │ │ │ │ │ ├── Makefile.in │ │ │ │ │ │ ├── README │ │ │ │ │ │ └── tclap │ │ │ │ │ │ ├── Arg.h │ │ │ │ │ │ ├── ArgException.h │ │ │ │ │ │ ├── ArgTraits.h │ │ │ │ │ │ ├── CmdLine.h │ │ │ │ │ │ ├── CmdLineInterface.h │ │ │ │ │ │ ├── CmdLineOutput.h │ │ │ │ │ │ ├── Constraint.h │ │ │ │ │ │ ├── DocBookOutput.h │ │ │ │ │ │ ├── HelpVisitor.h │ │ │ │ │ │ ├── IgnoreRestVisitor.h │ │ │ │ │ │ ├── Makefile.am │ │ │ │ │ │ ├── Makefile.in │ │ │ │ │ │ ├── MultiArg.h │ │ │ │ │ │ ├── MultiSwitchArg.h │ │ │ │ │ │ ├── OptionalUnlabeledTracker.h │ │ │ │ │ │ ├── StandardTraits.h │ │ │ │ │ │ ├── StdOutput.h │ │ │ │ │ │ ├── SwitchArg.h │ │ │ │ │ │ ├── UnlabeledMultiArg.h │ │ │ │ │ │ ├── UnlabeledValueArg.h │ │ │ │ │ │ ├── ValueArg.h │ │ │ │ │ │ ├── ValuesConstraint.h │ │ │ │ │ │ ├── VersionVisitor.h │ │ │ │ │ │ ├── Visitor.h │ │ │ │ │ │ ├── XorHandler.h │ │ │ │ │ │ └── ZshCompletionOutput.h │ │ │ │ │ ├── cf_libs │ │ │ │ │ ├── common │ │ │ │ │ │ ├── cf_tracker.hpp │ │ │ │ │ │ ├── cv_ext.hpp │ │ │ │ │ │ ├── feature_channels.hpp │ │ │ │ │ │ ├── mat_consts.hpp │ │ │ │ │ │ ├── math_helper.cpp │ │ │ │ │ │ ├── math_helper.hpp │ │ │ │ │ │ ├── scale_estimator.hpp │ │ │ │ │ │ └── tracker_debug.hpp │ │ │ │ │ ├── dsst │ │ │ │ │ │ ├── dsst_debug.hpp │ │ │ │ │ │ └── dsst_tracker.hpp │ │ │ │ │ └── kcf │ │ │ │ │ │ ├── kcf_debug.hpp │ │ │ │ │ │ └── kcf_tracker.hpp │ │ │ │ │ └── main │ │ │ │ │ ├── image_acquisition.cpp │ │ │ │ │ ├── image_acquisition.hpp │ │ │ │ │ ├── main_dsst.cpp │ │ │ │ │ └── main_kcf.cpp │ │ │ └── libconfig │ │ │ │ ├── CMakeLists.txt │ │ │ │ ├── grammar.c │ │ │ │ ├── grammar.h │ │ │ │ ├── libconfig.c │ │ │ │ ├── libconfig.h │ │ │ │ ├── libconfig.h++ │ │ │ │ ├── libconfig.hh │ │ │ │ ├── libconfigcpp.c++ │ │ │ │ ├── libconfigcpp.cc │ │ │ │ ├── parsectx.h │ │ │ │ ├── scanctx.c │ │ │ │ ├── scanctx.h │ │ │ │ ├── scanner.c │ │ │ │ ├── scanner.h │ │ │ │ ├── strbuf.c │ │ │ │ ├── strbuf.h │ │ │ │ └── wincompat.h │ │ │ ├── libopentld │ │ │ ├── CMakeLists.txt │ │ │ ├── CMakeLists2.txt │ │ │ ├── imacq │ │ │ │ ├── ImAcq.cpp │ │ │ │ └── ImAcq.h │ │ │ └── tld │ │ │ │ ├── Clustering.cpp │ │ │ │ ├── Clustering.h │ │ │ │ ├── DetectionResult.cpp │ │ │ │ ├── DetectionResult.h │ │ │ │ ├── DetectorCascade.cpp │ │ │ │ ├── DetectorCascade.h │ │ │ │ ├── EnsembleClassifier.cpp │ │ │ │ ├── EnsembleClassifier.h │ │ │ │ ├── IntegralImage.h │ │ │ │ ├── NNClassifier.cpp │ │ │ │ ├── NNClassifier.h │ │ │ │ ├── NormalizedPatch.h │ │ │ │ ├── TLD.cpp │ │ │ │ ├── TLD.h │ │ │ │ ├── TLDUtil.cpp │ │ │ │ ├── TLDUtil.h │ │ │ │ ├── VarianceFilter.cpp │ │ │ │ └── VarianceFilter.h │ │ │ └── opentld │ │ │ ├── CMakeLists.txt │ │ │ ├── OpenTLD.cpp │ │ │ └── main │ │ │ ├── Config.cpp │ │ │ ├── Config.h │ │ │ ├── Gui.cpp │ │ │ ├── Gui.h │ │ │ ├── Main.cpp │ │ │ ├── Main.h │ │ │ ├── Settings.cpp │ │ │ ├── Settings.h │ │ │ ├── Trajectory.cpp │ │ │ └── Trajectory.h │ └── OpenTLD │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CMakeLists.txt │ │ ├── LICENSE │ │ ├── OpenTLDConfig.cmake.in │ │ ├── README.md │ │ ├── debian │ │ ├── changelog │ │ ├── compat │ │ ├── control │ │ ├── copyright │ │ ├── docs │ │ ├── opentld.1 │ │ ├── opentld.install │ │ ├── opentld.manpages │ │ ├── rules │ │ └── source │ │ │ └── format │ │ ├── launch │ │ └── opentld.launch │ │ ├── package.xml │ │ ├── res │ │ ├── StyleGuide.md │ │ ├── conf │ │ │ └── config-sample.cfg │ │ ├── ico │ │ │ └── opentld.ico │ │ ├── img │ │ │ └── opentld.png │ │ ├── packaging │ │ │ ├── README │ │ │ ├── manpage.pod │ │ │ ├── opentld.desktop │ │ │ └── qopentld.desktop │ │ └── rcs.qrc │ │ └── src │ │ ├── 3rdparty │ │ ├── cvblobs │ │ │ ├── BlobContour.cpp │ │ │ ├── BlobContour.h │ │ │ ├── BlobLibraryConfiguration.h │ │ │ ├── BlobOperators.cpp │ │ │ ├── BlobOperators.h │ │ │ ├── BlobProperties.cpp │ │ │ ├── BlobProperties.h │ │ │ ├── BlobResult.cpp │ │ │ ├── BlobResult.h │ │ │ ├── CMakeLists.txt │ │ │ ├── ComponentLabeling.cpp │ │ │ ├── ComponentLabeling.h │ │ │ ├── blob.cpp │ │ │ └── blob.h │ │ └── libconfig │ │ │ ├── CMakeLists.txt │ │ │ ├── grammar.c │ │ │ ├── grammar.h │ │ │ ├── libconfig.c │ │ │ ├── libconfig.h │ │ │ ├── libconfig.h++ │ │ │ ├── libconfig.hh │ │ │ ├── libconfigcpp.c++ │ │ │ ├── libconfigcpp.cc │ │ │ ├── parsectx.h │ │ │ ├── scanctx.c │ │ │ ├── scanctx.h │ │ │ ├── scanner.c │ │ │ ├── scanner.h │ │ │ ├── strbuf.c │ │ │ ├── strbuf.h │ │ │ └── wincompat.h │ │ ├── libopentld │ │ ├── CMakeLists.txt │ │ ├── imacq │ │ │ ├── ImAcq.cpp │ │ │ └── ImAcq.h │ │ ├── mftracker │ │ │ ├── BB.cpp │ │ │ ├── BB.h │ │ │ ├── BBPredict.cpp │ │ │ ├── BBPredict.h │ │ │ ├── FBTrack.cpp │ │ │ ├── FBTrack.h │ │ │ ├── Lk.cpp │ │ │ ├── Lk.h │ │ │ ├── Median.cpp │ │ │ └── Median.h │ │ └── tld │ │ │ ├── Clustering.cpp │ │ │ ├── Clustering.h │ │ │ ├── DetectionResult.cpp │ │ │ ├── DetectionResult.h │ │ │ ├── DetectorCascade.cpp │ │ │ ├── DetectorCascade.h │ │ │ ├── EnsembleClassifier.cpp │ │ │ ├── EnsembleClassifier.h │ │ │ ├── ForegroundDetector.cpp │ │ │ ├── ForegroundDetector.h │ │ │ ├── IntegralImage.h │ │ │ ├── MedianFlowTracker.cpp │ │ │ ├── MedianFlowTracker.h │ │ │ ├── NNClassifier.cpp │ │ │ ├── NNClassifier.h │ │ │ ├── NormalizedPatch.h │ │ │ ├── TLD.cpp │ │ │ ├── TLD.h │ │ │ ├── TLDUtil.cpp │ │ │ ├── TLDUtil.h │ │ │ ├── VarianceFilter.cpp │ │ │ └── VarianceFilter.h │ │ └── opentld │ │ ├── CMakeLists.txt │ │ ├── OpenTLD.cpp │ │ ├── QOpenTLD.cpp │ │ ├── main │ │ ├── Config.cpp │ │ ├── Config.h │ │ ├── Gui.cpp │ │ ├── Gui.h │ │ ├── Main.cpp │ │ ├── Main.h │ │ ├── Settings.cpp │ │ ├── Settings.h │ │ ├── Trajectory.cpp │ │ └── Trajectory.h │ │ └── qopentld │ │ ├── ConfigDialog.cpp │ │ ├── ConfigDialog.h │ │ └── ConfigDialog.ui ├── LICENSE ├── README.md └── data_opentld.txt ├── kcf_tracking_ros ├── .gitignore ├── LICENSE ├── README.md ├── data.txt ├── follower │ ├── CMakeLists.txt │ ├── launch │ │ ├── includes │ │ │ ├── safety_controller.launch.xml │ │ │ └── velocity_smoother.launch.xml │ │ └── turtlebot_KCF_follower.launch │ ├── package.xml │ ├── src │ │ └── follower.cpp │ └── turtlebot_follower2_20160518121904.JPG └── turtlebot_cf_tracking │ ├── CMakeLists.txt │ ├── README.md │ ├── msg │ └── BoundingBox.msg │ ├── package.xml │ └── src │ ├── 3rdparty │ ├── cv_ext │ │ ├── init_box_selector.cpp │ │ ├── init_box_selector.hpp │ │ ├── math_spectrums.cpp │ │ ├── math_spectrums.hpp │ │ ├── psr.hpp │ │ ├── shift.cpp │ │ ├── shift.hpp │ │ ├── tracker_run.cpp │ │ └── tracker_run.hpp │ ├── piotr │ │ ├── README.md │ │ ├── gradientMex.hpp │ │ └── src │ │ │ ├── gradientMex.cpp │ │ │ ├── sse.hpp │ │ │ └── wrappers.hpp │ └── tclap │ │ ├── AUTHORS │ │ ├── COPYING │ │ ├── ChangeLog │ │ ├── INSTALL │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── README │ │ └── tclap │ │ ├── Arg.h │ │ ├── ArgException.h │ │ ├── ArgTraits.h │ │ ├── CmdLine.h │ │ ├── CmdLineInterface.h │ │ ├── CmdLineOutput.h │ │ ├── Constraint.h │ │ ├── DocBookOutput.h │ │ ├── HelpVisitor.h │ │ ├── IgnoreRestVisitor.h │ │ ├── Makefile.am │ │ ├── Makefile.in │ │ ├── MultiArg.h │ │ ├── MultiSwitchArg.h │ │ ├── OptionalUnlabeledTracker.h │ │ ├── StandardTraits.h │ │ ├── StdOutput.h │ │ ├── SwitchArg.h │ │ ├── UnlabeledMultiArg.h │ │ ├── UnlabeledValueArg.h │ │ ├── ValueArg.h │ │ ├── ValuesConstraint.h │ │ ├── VersionVisitor.h │ │ ├── Visitor.h │ │ ├── XorHandler.h │ │ └── ZshCompletionOutput.h │ ├── cf_libs │ ├── common │ │ ├── cf_tracker.hpp │ │ ├── cv_ext.hpp │ │ ├── feature_channels.hpp │ │ ├── mat_consts.hpp │ │ ├── math_helper.cpp │ │ ├── math_helper.hpp │ │ ├── scale_estimator.hpp │ │ └── tracker_debug.hpp │ ├── dsst │ │ ├── dsst_debug.hpp │ │ └── dsst_tracker.hpp │ └── kcf │ │ ├── .kcf_tracker.hpp.swp │ │ ├── kcf_debug.hpp │ │ └── kcf_tracker.hpp │ └── main │ ├── .~lock.main_kcf.cpp# │ ├── image_acquisition.cpp │ ├── image_acquisition.hpp │ ├── main_dsst.cpp │ └── main_kcf.cpp └── readme.txt /README.md: -------------------------------------------------------------------------------- 1 | 具体使用:http://blog.csdn.net/david_han008/article/details/72967588 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/launch/kcf.launch: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | Header header 2 | float64 controlTurn 3 | float64 controlSpeed 4 | int32 x 5 | int32 y 6 | float32 z 7 | int32 width 8 | int32 height 9 | 10 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/cv_ext/psr.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/cv_ext/psr.hpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/cv_ext/shift.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2012, Willow Garage, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of Willow Garage, Inc. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | * File: shift.hpp 35 | * Author: Hilton Bristow 36 | * Created: Aug 23, 2012 37 | * + Author: Klaus Haag (split into header/source file) 38 | */ 39 | 40 | #ifndef SHIFT_HPP_ 41 | #define SHIFT_HPP_ 42 | 43 | #include 44 | 45 | void shift(const cv::Mat& src, cv::Mat& dst, cv::Point2f delta, 46 | int fill = cv::BORDER_CONSTANT, 47 | cv::Scalar value = cv::Scalar(0, 0, 0, 0)); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/piotr/README.md: -------------------------------------------------------------------------------- 1 | This module provides the FHOG implementation from 2 | http://vision.ucsd.edu/~pdollar/toolbox/doc/ 3 | with an OpenCV integration. 4 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | original author: Michael E. Smoot 3 | invaluable contributions: Daniel Aarno 4 | more contributions: Erik Zeek 5 | more contributions: Fabien Carmagnac (Tinbergen-AM) 6 | outstanding editing: Carol Smoot 7 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | 26 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = tclap 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/README: -------------------------------------------------------------------------------- 1 | 2 | TCLAP - Templatized Command Line Argument Parser 3 | 4 | This is a simple C++ library that facilitates parsing command line 5 | arguments in a type independent manner. It doesn't conform exactly 6 | to either the GNU or POSIX standards, although it is close. See 7 | docs/manual.html for descriptions of how things work or look at the 8 | simple examples in the examples dir. 9 | 10 | To find out what the latest changes are read the NEWS file in this directory. 11 | 12 | 13 | Any and all feedback is welcome to: Mike Smoot 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/CmdLineOutput.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: CmdLineOutput.h 6 | * 7 | * Copyright (c) 2004, Michael E. Smoot 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_CMDLINEOUTPUT_H 24 | #define TCLAP_CMDLINEOUTPUT_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | namespace TCLAP { 34 | 35 | class CmdLineInterface; 36 | class ArgException; 37 | 38 | /** 39 | * The interface that any output object must implement. 40 | */ 41 | class CmdLineOutput 42 | { 43 | 44 | public: 45 | 46 | /** 47 | * Virtual destructor. 48 | */ 49 | virtual ~CmdLineOutput() {} 50 | 51 | /** 52 | * Generates some sort of output for the USAGE. 53 | * \param c - The CmdLine object the output is generated for. 54 | */ 55 | virtual void usage(CmdLineInterface& c)=0; 56 | 57 | /** 58 | * Generates some sort of output for the version. 59 | * \param c - The CmdLine object the output is generated for. 60 | */ 61 | virtual void version(CmdLineInterface& c)=0; 62 | 63 | /** 64 | * Generates some sort of output for a failure. 65 | * \param c - The CmdLine object the output is generated for. 66 | * \param e - The ArgException that caused the failure. 67 | */ 68 | virtual void failure( CmdLineInterface& c, 69 | ArgException& e )=0; 70 | 71 | }; 72 | 73 | } //namespace TCLAP 74 | #endif 75 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/Constraint.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Constraint.h 5 | * 6 | * Copyright (c) 2005, Michael E. Smoot 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_CONSTRAINT_H 23 | #define TCLAP_CONSTRAINT_H 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace TCLAP { 33 | 34 | /** 35 | * The interface that defines the interaction between the Arg and Constraint. 36 | */ 37 | template 38 | class Constraint 39 | { 40 | 41 | public: 42 | /** 43 | * Returns a description of the Constraint. 44 | */ 45 | virtual std::string description() const =0; 46 | 47 | /** 48 | * Returns the short ID for the Constraint. 49 | */ 50 | virtual std::string shortID() const =0; 51 | 52 | /** 53 | * The method used to verify that the value parsed from the command 54 | * line meets the constraint. 55 | * \param value - The value that will be checked. 56 | */ 57 | virtual bool check(const T& value) const =0; 58 | 59 | /** 60 | * Destructor. 61 | * Silences warnings about Constraint being a base class with virtual 62 | * functions but without a virtual destructor. 63 | */ 64 | virtual ~Constraint() { ; } 65 | }; 66 | 67 | } //namespace TCLAP 68 | #endif 69 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/HelpVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: HelpVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_HELP_VISITOR_H 23 | #define TCLAP_HELP_VISITOR_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor object that calls the usage method of the given CmdLineOutput 33 | * object for the specified CmdLine object. 34 | */ 35 | class HelpVisitor: public Visitor 36 | { 37 | private: 38 | /** 39 | * Prevent accidental copying. 40 | */ 41 | HelpVisitor(const HelpVisitor& rhs); 42 | HelpVisitor& operator=(const HelpVisitor& rhs); 43 | 44 | protected: 45 | 46 | /** 47 | * The CmdLine the output will be generated for. 48 | */ 49 | CmdLineInterface* _cmd; 50 | 51 | /** 52 | * The output object. 53 | */ 54 | CmdLineOutput** _out; 55 | 56 | public: 57 | 58 | /** 59 | * Constructor. 60 | * \param cmd - The CmdLine the output will be generated for. 61 | * \param out - The type of output. 62 | */ 63 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) 64 | : Visitor(), _cmd( cmd ), _out( out ) { } 65 | 66 | /** 67 | * Calls the usage method of the CmdLineOutput for the 68 | * specified CmdLine. 69 | */ 70 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } 71 | 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Vistor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | CmdLineInterface.h \ 6 | ArgException.h \ 7 | CmdLine.h \ 8 | XorHandler.h \ 9 | MultiArg.h \ 10 | UnlabeledMultiArg.h \ 11 | ValueArg.h \ 12 | UnlabeledValueArg.h \ 13 | Visitor.h Arg.h \ 14 | HelpVisitor.h \ 15 | SwitchArg.h \ 16 | MultiSwitchArg.h \ 17 | VersionVisitor.h \ 18 | IgnoreRestVisitor.h \ 19 | CmdLineOutput.h \ 20 | StdOutput.h \ 21 | DocBookOutput.h \ 22 | ZshCompletionOutput.h \ 23 | OptionalUnlabeledTracker.h \ 24 | Constraint.h \ 25 | ValuesConstraint.h \ 26 | ArgTraits.h \ 27 | StandardTraits.h 28 | 29 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: OptionalUnlabeledTracker.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 26 | 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | class OptionalUnlabeledTracker 32 | { 33 | 34 | public: 35 | 36 | static void check( bool req, const std::string& argName ); 37 | 38 | static void gotOptional() { alreadyOptionalRef() = true; } 39 | 40 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 41 | 42 | private: 43 | 44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 45 | }; 46 | 47 | 48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 49 | { 50 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 51 | throw( SpecificationException( 52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 53 | argName ) ); 54 | 55 | if ( !req ) 56 | OptionalUnlabeledTracker::gotOptional(); 57 | } 58 | 59 | 60 | } // namespace TCLAP 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/VersionVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: VersionVisitor.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_VERSION_VISITOR_H 25 | #define TCLAP_VERSION_VISITOR_H 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Vistor that will call the version method of the given CmdLineOutput 35 | * for the specified CmdLine object and then exit. 36 | */ 37 | class VersionVisitor: public Visitor 38 | { 39 | private: 40 | /** 41 | * Prevent accidental copying 42 | */ 43 | VersionVisitor(const VersionVisitor& rhs); 44 | VersionVisitor& operator=(const VersionVisitor& rhs); 45 | 46 | protected: 47 | 48 | /** 49 | * The CmdLine of interest. 50 | */ 51 | CmdLineInterface* _cmd; 52 | 53 | /** 54 | * The output object. 55 | */ 56 | CmdLineOutput** _out; 57 | 58 | public: 59 | 60 | /** 61 | * Constructor. 62 | * \param cmd - The CmdLine the output is generated for. 63 | * \param out - The type of output. 64 | */ 65 | VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) 66 | : Visitor(), _cmd( cmd ), _out( out ) { } 67 | 68 | /** 69 | * Calls the version method of the output object using the 70 | * specified CmdLine. 71 | */ 72 | void visit() { 73 | (*_out)->version(*_cmd); 74 | throw ExitException(0); 75 | } 76 | 77 | }; 78 | 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/3rdparty/tclap/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/common/cv_ext.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef CV_EXT_HPP_ 33 | #define CV_EXT_HPP_ 34 | 35 | #include "math_spectrums.hpp" 36 | #include "shift.hpp" 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/common/mat_consts.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef MAT_CONSTS_H_ 33 | #define MAT_CONSTS_H_ 34 | 35 | namespace mat_consts 36 | { 37 | template 38 | struct constants 39 | { 40 | const static T c0_5; 41 | const static T c2_0; 42 | }; 43 | 44 | template const T constants::c0_5 = static_cast(0.5); 45 | template const T constants::c2_0 = static_cast(2.0); 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/common/tracker_debug.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef TRACKER_DEBUG_HPP_ 33 | #define TRACKER_DEBUG_HPP_ 34 | 35 | namespace cf_tracking 36 | { 37 | class TrackerDebug 38 | { 39 | public: 40 | virtual ~TrackerDebug(){} 41 | 42 | virtual void init(std::string outputFilePath) = 0; 43 | virtual void printOnImage(cv::Mat& image) = 0; 44 | virtual void printConsoleOutput() = 0; 45 | virtual void printToFile() = 0; 46 | }; 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/dsst/dsst_tracker.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/dsst/dsst_tracker.hpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/kcf/.kcf_tracker.hpp.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/kcf/.kcf_tracker.hpp.swp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/kcf/kcf_tracker.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCF/src/cf_libs/kcf/kcf_tracker.hpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/AUTHORS: -------------------------------------------------------------------------------- 1 | Authors 2 | ======= 3 | 4 | Georg Nebehay 5 | 6 | Contributors 7 | ============ 8 | 9 | Clemens Korner 10 | Bernd Lukatschek 11 | João Silva 12 | Lucas Doyle 13 | Lukas Oberhuber 14 | Michael Rennie 15 | Sebastian Borggrewe 16 | Jonathan Senecal 17 | Huang Xin 18 | Jason Catchpole 19 | Victor Daropoulos 20 | Klaus Haag 21 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/CMakeLists2.txt: -------------------------------------------------------------------------------- 1 | # Open The CMake GUI 2 | # specify the source directory and the binary directory 3 | # press configure. 4 | # 5 | # UNIX Makefile: 6 | # 1) go to the binary folder and type "make" to build the project 7 | # 8 | # Microsoft Visual C++: 9 | # 1) open the .sln file 10 | # 2) build the project "ALL_BUILD" to build the opentld project 11 | 12 | 13 | project(CF_TLD) 14 | cmake_minimum_required(VERSION 2.6) 15 | 16 | # add c++11 support 17 | if(CMAKE_COMPILER_IS_GNUCC) 18 | ADD_DEFINITIONS ( -std=c++11 ) 19 | endif(CMAKE_COMPILER_IS_GNUCC) 20 | 21 | find_package(OpenCV REQUIRED) 22 | # OpenCV 3.0 does currently not include its' includes correctly 23 | include_directories(${OpenCV_DIR}/include) 24 | 25 | 26 | #build type 27 | if(NOT CMAKE_BUILD_TYPE) 28 | set(CMAKE_BUILD_TYPE Release CACHE STRING 29 | "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." 30 | FORCE) 31 | endif(NOT CMAKE_BUILD_TYPE) 32 | 33 | add_definitions(-fPIC) 34 | 35 | 36 | #------------------------------------------------------------------------------- 37 | #add subdirectories 38 | add_subdirectory(src/3rdparty/cf_tracking) 39 | add_subdirectory(src/libopentld) 40 | 41 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/OpenTLDConfig.cmake.in: -------------------------------------------------------------------------------- 1 | find_package(OpenCV) 2 | 3 | set(bin_dir "@PROJECT_BINARY_DIR@") 4 | set(src_dir "@PROJECT_SOURCE_DIR@") 5 | 6 | set(OPENTLD_INCLUDE_DIRS 7 | ${src_dir}/src/3rdparty/cvblobs 8 | ${src_dir}/src/3rdparty/libconfig 9 | ${src_dir}/src/libopentld/tld 10 | ${src_dir}/src/libopentld/mftracker 11 | ${src_dir}/src/libopentld/imacq 12 | ${src_dir}/src/opentld/main) 13 | INCLUDE_DIRECTORIES(${OPENTLD_INCLUDE_DIRS}) 14 | 15 | SET(OPENTLD_LIB_DIRS ${LIBRARY_OUTPUT_PATH}) 16 | LINK_DIRECTORIES(${OPENTLD_LIB_DIRS}) 17 | 18 | set(OPENTLD_LIBS cvblobs libconfig libopentld) 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/launch/kcftld.launch: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | KCFtld 4 | 0.0.0 5 | The KCFtld package 6 | 7 | 8 | 9 | zzy 10 | 11 | 12 | 13 | TODO 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | catkin 34 | cv_bridge 35 | image_transport 36 | message_generation 37 | roscpp 38 | std_msgs 39 | cv_bridge 40 | image_transport 41 | message_runtime 42 | roscpp 43 | std_msgs 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/DSSTtld_sample_image_sequence_linux.sh: -------------------------------------------------------------------------------- 1 | ./cftld -x sample_image_sequence.cfg 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/DSSTtld_sample_image_sequence_windows.bat: -------------------------------------------------------------------------------- 1 | cftld.exe -x sample_image_sequence.cfg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/DSSTtld_sample_video_linux.sh: -------------------------------------------------------------------------------- 1 | ./cftld -x sample_video.cfg 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/DSSTtld_sample_video_windows.bat: -------------------------------------------------------------------------------- 1 | cftld.exe -x sample_video.cfg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/KCFtld_sample_image_sequence_linux.sh: -------------------------------------------------------------------------------- 1 | ./cftld sample_image_sequence.cfg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/KCFtld_sample_image_sequence_windows.bat: -------------------------------------------------------------------------------- 1 | cftld.exe sample_image_sequence.cfg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/KCFtld_sample_video_linux.sh: -------------------------------------------------------------------------------- 1 | ./cftld sample_video.cfg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/KCFtld_sample_video_windows.bat: -------------------------------------------------------------------------------- 1 | cftld.exe sample_video.cfg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/config-sample.cfg: -------------------------------------------------------------------------------- 1 | #Commented entries (lines with # at the beginneng) denote default values unless otherwise stated, 2 | #delete the # to change the parameters. 3 | 4 | # useDsstTracker = true; # if false/commented uses KCF tracker; if true uses DSST tracker 5 | 6 | acq: { 7 | method = "CAM"; #one of CAM, IMGS, VID, LIVESIM required, no default 8 | #imgPath = "/path/to/input/%.5d.png"; #required for IMGS, LIVESIM and VID, no default 9 | #startFrame = 1; 10 | #lastFrame = 0; # 0 Means take all frames 11 | #fps=24.0; 12 | }; 13 | 14 | detector: { 15 | #useProportionalShift = true; #Sets scanwindows off by a percentage value of the window dimensions (specified in proportionalShift) rather than 1px. 16 | #proportionalShift = 0.1; 17 | #minScale = -10; #number of scales smaller than initial object size 18 | #maxScale = 10; #number of scales larger than initial object size 19 | #numFeatures = 10; #number of features 20 | #numTrees = 10; #number of trees 21 | #minSize = 25; #minimum size of scanWindows 22 | #thetaP = 0.55; 23 | #thetaN = 0.5; 24 | #varianceFilterEnabled = true; 25 | #ensembleClassifierEnabled = true; 26 | #nnClassifierEnabled = true; 27 | }; 28 | 29 | #trackerEnabled = true; 30 | #detectorEnabled = true; 31 | #initialBoundingBox = [100, 100, 100, 100]; # No default, initial Bounding Box can be specified here 32 | 33 | #threshold = 0.5; #Threshold for determining positive results 34 | #learningEnabled = true; #Enables learning while processing 35 | #trajectory = 20; #Specifies the number of the last frames which are considered by the trajectory; 0 disables the trajectory 36 | #showOutput = true; #Creates a window displaying results 37 | #showNotConfident=true; #Show bounding box also if confidence is low 38 | #saveOutput = false; #Specifies whether to save visual output 39 | #saveDir = "path/to/output/"; #required if saveOutput = true, no default 40 | #printResults = "/home/georg/Desktop/resultsFile"; #If commented, results will not be printed 41 | #printTiming = "path/to/timingFile"; #If commented, timing will not be printed 42 | #alternating = false; #If set to true, detector is disabled while tracker is running. 43 | #seed=0; 44 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_image_sequence.cfg: -------------------------------------------------------------------------------- 1 | seed = 0; 2 | initialBoundingBox = [261,48,39,65]; 3 | showNotConfident = true; 4 | saveOutput = true; 5 | saveDir = "sample_sequence_compressed"; 6 | printResults = "results_sample_sequence_compressed.txt"; 7 | showOutput = true; 8 | # useDsstTracker = true; # if false/commented uses KCF tracker; if true uses DSST tracker 9 | 10 | acq: { 11 | method = "IMGS"; 12 | imgPath = "sample_sequence_compressed/%.5d.jpg"; 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00001.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00002.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00003.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00004.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00004.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00005.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00005.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00006.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00006.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00007.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00007.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00008.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00008.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00009.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00009.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00010.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00011.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00011.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00012.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00012.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00013.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00013.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00014.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00014.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00015.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00015.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00016.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00016.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00017.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00017.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00018.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00018.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00019.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00019.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00020.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00020.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00021.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00022.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00022.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00023.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00023.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00024.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00024.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00025.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00025.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00026.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00026.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00027.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00027.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00028.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00028.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00029.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00029.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00030.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00030.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00031.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00031.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00032.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00032.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00033.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00033.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00034.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00034.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00035.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00035.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00036.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00036.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00037.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00037.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00038.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00038.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00039.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00039.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00040.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00041.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00041.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00042.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00042.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00043.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00043.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00044.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00044.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00045.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00045.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00046.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00046.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00047.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00047.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00048.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00048.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00049.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00049.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00050.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00050.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00051.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00051.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00052.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00052.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00053.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/00053.jpg -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/sample_sequence_compressed.avi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_sequence_compressed/sample_sequence_compressed.avi -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/sample/sample_video.cfg: -------------------------------------------------------------------------------- 1 | seed = 0; 2 | initialBoundingBox = [261,48,39,65]; 3 | showNotConfident = true; 4 | saveOutput = true; 5 | saveDir = "sample_sequence_compressed"; 6 | printResults = "results_sample_sequence_compressed.txt"; 7 | showOutput = true; 8 | # useDsstTracker = true; # if false/commented uses KCF tracker; if true uses DSST tracker 9 | 10 | acq: { 11 | method = "VID"; 12 | imgPath = "sample_sequence_compressed/sample_sequence_compressed.avi"; 13 | }; 14 | 15 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(CF_CV_EXT "src/3rdparty/cv_ext") 2 | set(CF_PIOTR_DIR "src/3rdparty/piotr/") 3 | 4 | set(CF_HEADER_DIRS 5 | ${CMAKE_CURRENT_SOURCE_DIR}/${CF_CV_EXT} 6 | ${CMAKE_CURRENT_SOURCE_DIR}/${CF_PIOTR_DIR} 7 | ${CMAKE_CURRENT_SOURCE_DIR}/${CF_PIOTR_DIR}/src 8 | ${CMAKE_CURRENT_SOURCE_DIR}/src/cf_libs/kcf 9 | ${CMAKE_CURRENT_SOURCE_DIR}/src/cf_libs/dsst 10 | ${CMAKE_CURRENT_SOURCE_DIR}/src/cf_libs/common 11 | PARENT_SCOPE) 12 | 13 | set(CF_PIOTR_SOURCES 14 | ${CF_PIOTR_DIR}/src/gradientMex.cpp 15 | ${CF_PIOTR_DIR}/gradientMex.hpp 16 | ${CF_PIOTR_DIR}/src/sse.hpp 17 | ${CF_PIOTR_DIR}/src/wrappers.hpp) 18 | 19 | set(CF_LIB_COMMON_SOURCES 20 | src/cf_libs/common/feature_channels.hpp 21 | src/cf_libs/common/mat_consts.hpp 22 | src/cf_libs/common/math_helper.hpp 23 | src/cf_libs/common/math_helper.cpp 24 | src/cf_libs/common/cf_tracker.hpp 25 | src/cf_libs/common/tracker_debug.hpp 26 | src/cf_libs/common/scale_estimator.hpp 27 | src/cf_libs/common/cv_ext.hpp 28 | ${CF_CV_EXT}/shift.cpp 29 | ${CF_CV_EXT}/shift.hpp 30 | ${CF_CV_EXT}/math_spectrums.cpp 31 | ${CF_CV_EXT}/math_spectrums.hpp 32 | ${CF_PIOTR_SOURCES}) 33 | 34 | set(CF_SOURCES_ 35 | src/cf_libs/dsst/dsst_debug.hpp 36 | src/cf_libs/dsst/dsst_tracker.hpp 37 | src/cf_libs/kcf/kcf_debug.hpp 38 | src/cf_libs/kcf/kcf_tracker.hpp 39 | ${CF_LIB_COMMON_SOURCES} 40 | ) 41 | 42 | function(PREFIX prefix list_) 43 | SET(tmp_list) 44 | 45 | foreach(SOURCE_FILE ${${list_}}) 46 | list(APPEND tmp_list "${prefix}${SOURCE_FILE}") 47 | endforeach(SOURCE_FILE) 48 | 49 | set(${list_} ${tmp_list} PARENT_SCOPE) 50 | endfunction(PREFIX) 51 | 52 | PREFIX("${CMAKE_CURRENT_SOURCE_DIR}/" "CF_SOURCES_") 53 | set(CF_SOURCES ${CF_SOURCES_} PARENT_SCOPE) 54 | # message(STATUS ${CF_SOURCES_}) 55 | 56 | 57 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/cv_ext/psr.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/cv_ext/psr.hpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/cv_ext/shift.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2012, Willow Garage, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of Willow Garage, Inc. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | * File: shift.hpp 35 | * Author: Hilton Bristow 36 | * Created: Aug 23, 2012 37 | * + Author: Klaus Haag (split into header/source file) 38 | */ 39 | 40 | #ifndef SHIFT_HPP_ 41 | #define SHIFT_HPP_ 42 | 43 | #include 44 | 45 | void shift(const cv::Mat& src, cv::Mat& dst, cv::Point2f delta, 46 | int fill = cv::BORDER_CONSTANT, 47 | cv::Scalar value = cv::Scalar(0, 0, 0, 0)); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/piotr/README.md: -------------------------------------------------------------------------------- 1 | This module provides the FHOG implementation from 2 | http://vision.ucsd.edu/~pdollar/toolbox/doc/ 3 | with an OpenCV integration. 4 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | original author: Michael E. Smoot 3 | invaluable contributions: Daniel Aarno 4 | more contributions: Erik Zeek 5 | more contributions: Fabien Carmagnac (Tinbergen-AM) 6 | outstanding editing: Carol Smoot 7 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | 26 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = tclap 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/README: -------------------------------------------------------------------------------- 1 | 2 | TCLAP - Templatized Command Line Argument Parser 3 | 4 | This is a simple C++ library that facilitates parsing command line 5 | arguments in a type independent manner. It doesn't conform exactly 6 | to either the GNU or POSIX standards, although it is close. See 7 | docs/manual.html for descriptions of how things work or look at the 8 | simple examples in the examples dir. 9 | 10 | To find out what the latest changes are read the NEWS file in this directory. 11 | 12 | 13 | Any and all feedback is welcome to: Mike Smoot 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/CmdLineOutput.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: CmdLineOutput.h 6 | * 7 | * Copyright (c) 2004, Michael E. Smoot 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_CMDLINEOUTPUT_H 24 | #define TCLAP_CMDLINEOUTPUT_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | namespace TCLAP { 34 | 35 | class CmdLineInterface; 36 | class ArgException; 37 | 38 | /** 39 | * The interface that any output object must implement. 40 | */ 41 | class CmdLineOutput 42 | { 43 | 44 | public: 45 | 46 | /** 47 | * Virtual destructor. 48 | */ 49 | virtual ~CmdLineOutput() {} 50 | 51 | /** 52 | * Generates some sort of output for the USAGE. 53 | * \param c - The CmdLine object the output is generated for. 54 | */ 55 | virtual void usage(CmdLineInterface& c)=0; 56 | 57 | /** 58 | * Generates some sort of output for the version. 59 | * \param c - The CmdLine object the output is generated for. 60 | */ 61 | virtual void version(CmdLineInterface& c)=0; 62 | 63 | /** 64 | * Generates some sort of output for a failure. 65 | * \param c - The CmdLine object the output is generated for. 66 | * \param e - The ArgException that caused the failure. 67 | */ 68 | virtual void failure( CmdLineInterface& c, 69 | ArgException& e )=0; 70 | 71 | }; 72 | 73 | } //namespace TCLAP 74 | #endif 75 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/Constraint.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Constraint.h 5 | * 6 | * Copyright (c) 2005, Michael E. Smoot 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_CONSTRAINT_H 23 | #define TCLAP_CONSTRAINT_H 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace TCLAP { 33 | 34 | /** 35 | * The interface that defines the interaction between the Arg and Constraint. 36 | */ 37 | template 38 | class Constraint 39 | { 40 | 41 | public: 42 | /** 43 | * Returns a description of the Constraint. 44 | */ 45 | virtual std::string description() const =0; 46 | 47 | /** 48 | * Returns the short ID for the Constraint. 49 | */ 50 | virtual std::string shortID() const =0; 51 | 52 | /** 53 | * The method used to verify that the value parsed from the command 54 | * line meets the constraint. 55 | * \param value - The value that will be checked. 56 | */ 57 | virtual bool check(const T& value) const =0; 58 | 59 | /** 60 | * Destructor. 61 | * Silences warnings about Constraint being a base class with virtual 62 | * functions but without a virtual destructor. 63 | */ 64 | virtual ~Constraint() { ; } 65 | }; 66 | 67 | } //namespace TCLAP 68 | #endif 69 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/HelpVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: HelpVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_HELP_VISITOR_H 23 | #define TCLAP_HELP_VISITOR_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor object that calls the usage method of the given CmdLineOutput 33 | * object for the specified CmdLine object. 34 | */ 35 | class HelpVisitor: public Visitor 36 | { 37 | private: 38 | /** 39 | * Prevent accidental copying. 40 | */ 41 | HelpVisitor(const HelpVisitor& rhs); 42 | HelpVisitor& operator=(const HelpVisitor& rhs); 43 | 44 | protected: 45 | 46 | /** 47 | * The CmdLine the output will be generated for. 48 | */ 49 | CmdLineInterface* _cmd; 50 | 51 | /** 52 | * The output object. 53 | */ 54 | CmdLineOutput** _out; 55 | 56 | public: 57 | 58 | /** 59 | * Constructor. 60 | * \param cmd - The CmdLine the output will be generated for. 61 | * \param out - The type of output. 62 | */ 63 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) 64 | : Visitor(), _cmd( cmd ), _out( out ) { } 65 | 66 | /** 67 | * Calls the usage method of the CmdLineOutput for the 68 | * specified CmdLine. 69 | */ 70 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } 71 | 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Vistor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | CmdLineInterface.h \ 6 | ArgException.h \ 7 | CmdLine.h \ 8 | XorHandler.h \ 9 | MultiArg.h \ 10 | UnlabeledMultiArg.h \ 11 | ValueArg.h \ 12 | UnlabeledValueArg.h \ 13 | Visitor.h Arg.h \ 14 | HelpVisitor.h \ 15 | SwitchArg.h \ 16 | MultiSwitchArg.h \ 17 | VersionVisitor.h \ 18 | IgnoreRestVisitor.h \ 19 | CmdLineOutput.h \ 20 | StdOutput.h \ 21 | DocBookOutput.h \ 22 | ZshCompletionOutput.h \ 23 | OptionalUnlabeledTracker.h \ 24 | Constraint.h \ 25 | ValuesConstraint.h \ 26 | ArgTraits.h \ 27 | StandardTraits.h 28 | 29 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: OptionalUnlabeledTracker.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 26 | 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | class OptionalUnlabeledTracker 32 | { 33 | 34 | public: 35 | 36 | static void check( bool req, const std::string& argName ); 37 | 38 | static void gotOptional() { alreadyOptionalRef() = true; } 39 | 40 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 41 | 42 | private: 43 | 44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 45 | }; 46 | 47 | 48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 49 | { 50 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 51 | throw( SpecificationException( 52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 53 | argName ) ); 54 | 55 | if ( !req ) 56 | OptionalUnlabeledTracker::gotOptional(); 57 | } 58 | 59 | 60 | } // namespace TCLAP 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/3rdparty/tclap/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/common/cv_ext.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef CV_EXT_HPP_ 33 | #define CV_EXT_HPP_ 34 | 35 | #include "math_spectrums.hpp" 36 | #include "shift.hpp" 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/common/mat_consts.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef MAT_CONSTS_H_ 33 | #define MAT_CONSTS_H_ 34 | 35 | namespace mat_consts 36 | { 37 | template 38 | struct constants 39 | { 40 | const static T c0_5; 41 | const static T c2_0; 42 | }; 43 | 44 | template const T constants::c0_5 = static_cast(0.5); 45 | template const T constants::c2_0 = static_cast(2.0); 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/common/tracker_debug.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef TRACKER_DEBUG_HPP_ 33 | #define TRACKER_DEBUG_HPP_ 34 | 35 | namespace cf_tracking 36 | { 37 | class TrackerDebug 38 | { 39 | public: 40 | virtual ~TrackerDebug(){} 41 | 42 | virtual void init(std::string outputFilePath) = 0; 43 | virtual void printOnImage(cv::Mat& image) = 0; 44 | virtual void printConsoleOutput() = 0; 45 | virtual void printToFile() = 0; 46 | }; 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/dsst/dsst_tracker.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/dsst/dsst_tracker.hpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/kcf/kcf_tracker.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/cf_tracking/src/cf_libs/kcf/kcf_tracker.hpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #This are the defines for building a static libconfig for windows 2 | if(WIN32) 3 | add_definitions(-DLIBCONFIGXX_STATIC -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H -DYY_USE_CONST -D_CRT_SECURE_NO_DEPRECATE -D_STDLIB_H) 4 | endif(WIN32) 5 | 6 | add_library(config++ 7 | grammar.c 8 | libconfig.c 9 | libconfigcpp.cc 10 | scanctx.c 11 | scanner.c 12 | strbuf.c 13 | grammar.h 14 | libconfig.h 15 | libconfig.hh 16 | parsectx.h 17 | scanctx.h 18 | scanner.h 19 | strbuf.h 20 | wincompat.h) 21 | 22 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/libconfig.hh: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A structured configuration file parsing library 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #include 24 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/libconfigcpp.cc: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A structured configuration file parsing library 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #include "libconfigcpp.c++" 24 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/parsectx.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #ifndef __libconfig_parsectx_h 24 | #define __libconfig_parsectx_h 25 | 26 | #include "libconfig.h" 27 | #include "strbuf.h" 28 | 29 | struct parse_context 30 | { 31 | config_t *config; 32 | config_setting_t *parent; 33 | config_setting_t *setting; 34 | char *name; 35 | strbuf_t string; 36 | }; 37 | 38 | #define parsectx_init(C) \ 39 | memset((C), 0, sizeof(struct parse_context)) 40 | #define parsectx_cleanup(C) \ 41 | free((void *)(strbuf_release(&((C)->string)))) 42 | 43 | #define parsectx_append_string(C, S) \ 44 | strbuf_append(&((C)->string), (S)) 45 | #define parsectx_take_string(C) \ 46 | strbuf_release(&((C)->string)) 47 | 48 | #endif /* __libconfig_parsectx_h */ 49 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/scanctx.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #ifndef __libconfig_scanctx_h 24 | #define __libconfig_scanctx_h 25 | 26 | #include "libconfig.h" 27 | #include "strbuf.h" 28 | 29 | #include 30 | #include 31 | 32 | #define MAX_INCLUDE_DEPTH 10 33 | 34 | struct scan_context 35 | { 36 | config_t *config; 37 | const char *top_filename; 38 | const char *files[MAX_INCLUDE_DEPTH]; 39 | void *buffers[MAX_INCLUDE_DEPTH]; 40 | FILE *streams[MAX_INCLUDE_DEPTH]; 41 | int depth; 42 | strbuf_t string; 43 | const char **filenames; 44 | unsigned int num_filenames; 45 | }; 46 | 47 | extern void scanctx_init(struct scan_context *ctx, const char *top_filename); 48 | extern const char **scanctx_cleanup(struct scan_context *ctx, 49 | unsigned int *num_filenames); 50 | 51 | extern FILE *scanctx_push_include(struct scan_context *ctx, void *prev_buffer, 52 | const char **error); 53 | extern void *scanctx_pop_include(struct scan_context *ctx); 54 | 55 | #define scanctx_append_string(C, S) \ 56 | strbuf_append(&((C)->string), (S)) 57 | 58 | extern char *scanctx_take_string(struct scan_context *ctx); 59 | 60 | extern const char *scanctx_current_filename(struct scan_context *ctx); 61 | 62 | #endif /* __libconfig_scanctx_h */ 63 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/strbuf.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #include "strbuf.h" 24 | 25 | #include 26 | #include 27 | 28 | #define STRING_BLOCK_SIZE 64 29 | 30 | /* ------------------------------------------------------------------------- */ 31 | 32 | char *strbuf_release(strbuf_t *buf) 33 | { 34 | char *r = buf->string; 35 | memset(buf, 0, sizeof(strbuf_t)); 36 | return(r); 37 | } 38 | 39 | /* ------------------------------------------------------------------------- */ 40 | 41 | void strbuf_append(strbuf_t *buf, const char *text) 42 | { 43 | static const size_t mask = ~(STRING_BLOCK_SIZE - 1); 44 | size_t len = strlen(text); 45 | size_t newlen = buf->length + len + 1; /* add 1 for NUL */ 46 | 47 | if(newlen > buf->capacity) 48 | { 49 | buf->capacity = (newlen + (STRING_BLOCK_SIZE - 1)) & mask; 50 | buf->string = (char *)realloc(buf->string, buf->capacity); 51 | } 52 | 53 | strcpy(buf->string + buf->length, text); 54 | buf->length += len; 55 | } 56 | 57 | /* ------------------------------------------------------------------------- */ 58 | /* eof */ 59 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/3rdparty/libconfig/strbuf.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #ifndef __libconfig_strbuf_h 24 | #define __libconfig_strbuf_h 25 | 26 | #include 27 | #include 28 | 29 | typedef struct 30 | { 31 | char *string; 32 | size_t length; 33 | size_t capacity; 34 | } strbuf_t; 35 | 36 | char *strbuf_release(strbuf_t *buf); 37 | 38 | void strbuf_append(strbuf_t *buf, const char *text); 39 | 40 | #endif /* __libconfig_strbuf_h */ 41 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(imacq 2 | tld 3 | ${CF_HEADER_DIRS} 4 | ${OpenCV_INCLUDE_DIRS}) 5 | 6 | link_directories(${OpenCV_LIB_DIR}) 7 | 8 | add_library(libopentld 9 | ${CF_SOURCES} 10 | imacq/ImAcq.cpp 11 | tld/Clustering.cpp 12 | tld/DetectionResult.cpp 13 | tld/DetectorCascade.cpp 14 | tld/EnsembleClassifier.cpp 15 | tld/NNClassifier.cpp 16 | tld/TLD.cpp 17 | tld/TLDUtil.cpp 18 | tld/VarianceFilter.cpp 19 | imacq/ImAcq.h 20 | tld/Clustering.h 21 | tld/DetectionResult.h 22 | tld/DetectorCascade.h 23 | tld/EnsembleClassifier.h 24 | tld/IntegralImage.h 25 | tld/NNClassifier.h 26 | tld/NormalizedPatch.h 27 | tld/TLD.h 28 | tld/TLDUtil.h 29 | tld/VarianceFilter.h) 30 | 31 | target_link_libraries(libopentld ${OpenCV_LIBS}) 32 | 33 | set_target_properties(libopentld PROPERTIES OUTPUT_NAME opentld) 34 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/CMakeLists2.txt: -------------------------------------------------------------------------------- 1 | include_directories(imacq 2 | tld 3 | ${CF_HEADER_DIRS} 4 | ${OpenCV_INCLUDE_DIRS}) 5 | 6 | link_directories(${OpenCV_LIB_DIR}) 7 | 8 | add_library(libopentld 9 | ${CF_SOURCES} 10 | tld/Clustering.cpp 11 | tld/DetectionResult.cpp 12 | tld/DetectorCascade.cpp 13 | tld/EnsembleClassifier.cpp 14 | tld/NNClassifier.cpp 15 | tld/TLD.cpp 16 | tld/TLDUtil.cpp 17 | tld/VarianceFilter.cpp 18 | tld/Clustering.h 19 | tld/DetectionResult.h 20 | tld/DetectorCascade.h 21 | tld/EnsembleClassifier.h 22 | tld/IntegralImage.h 23 | tld/NNClassifier.h 24 | tld/NormalizedPatch.h 25 | tld/TLD.h 26 | tld/TLDUtil.h 27 | tld/VarianceFilter.h) 28 | 29 | target_link_libraries(libopentld ${OpenCV_LIBS}) 30 | 31 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/tld/Clustering.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * Clustering.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef CLUSTERING_H_ 27 | #define CLUSTERING_H_ 28 | 29 | #include 30 | 31 | #include 32 | 33 | #include "DetectionResult.h" 34 | 35 | namespace tld 36 | { 37 | class Clustering 38 | { 39 | void calcMeanRect(std::vector * indices); 40 | void calcDistances(float *distances); 41 | void cluster(float *distances); 42 | public: 43 | int *windows; 44 | int numWindows; 45 | 46 | DetectionResult *detectionResult; 47 | 48 | //Configurable members 49 | float cutoff; 50 | 51 | Clustering(); 52 | virtual ~Clustering(); 53 | void release(); 54 | void clusterConfidentIndices(); 55 | }; 56 | } /* namespace tld */ 57 | #endif /* CLUSTERING_H_ */ 58 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/tld/DetectionResult.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * DetectionResult.h 22 | * 23 | * Created on: Nov 16, 2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef DETECTIONRESULT_H_ 28 | #define DETECTIONRESULT_H_ 29 | 30 | #include 31 | 32 | #include 33 | 34 | namespace tld 35 | { 36 | class DetectionResult 37 | { 38 | public: 39 | bool containsValidData; 40 | std::vector* fgList; 41 | float *posteriors; /* Contains the posteriors for each slding window. Is of size numWindows. Allocated by tldInitClassifier. */ 42 | std::vector* confidentIndices; 43 | int *featureVectors; 44 | float *variances; 45 | int numClusters; 46 | cv::Rect *detectorBB; //Contains a valid result only if numClusters = 1 47 | 48 | DetectionResult(); 49 | virtual ~DetectionResult(); 50 | 51 | void init(int numWindows, int numTrees); 52 | 53 | void reset(); 54 | void release(); 55 | }; 56 | } /* namespace tld */ 57 | #endif /* DETECTIONRESULT_H_ */ 58 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/tld/NNClassifier.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * NNClassifier.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef NNCLASSIFIER_H_ 27 | #define NNCLASSIFIER_H_ 28 | 29 | #include 30 | 31 | #include 32 | 33 | #include "NormalizedPatch.h" 34 | #include "DetectionResult.h" 35 | 36 | namespace tld 37 | { 38 | class NNClassifier 39 | { 40 | float ncc(float *f1, float *f2); 41 | void showWindow(const cv::Mat &img, int windowIdx); 42 | public: 43 | bool enabled; 44 | 45 | int *windows; 46 | float thetaFP; 47 | float thetaTP; 48 | DetectionResult *detectionResult; 49 | std::vector* falsePositives; 50 | std::vector* truePositives; 51 | 52 | NNClassifier(); 53 | virtual ~NNClassifier(); 54 | 55 | void release(); 56 | float classifyPatch(NormalizedPatch *patch); 57 | float classifyBB(const cv::Mat &img, cv::Rect *bb); 58 | float classifyWindow(const cv::Mat &img, int windowIdx); 59 | void learn(std::vector patches); 60 | bool filter(const cv::Mat &img, int windowIdx); 61 | }; 62 | } /* namespace tld */ 63 | #endif /* NNCLASSIFIER_H_ */ 64 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/tld/NormalizedPatch.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * NormalizedPatch.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef NORMALIZEDPATCH_H_ 27 | #define NORMALIZEDPATCH_H_ 28 | 29 | #define TLD_PATCH_SIZE 15 30 | 31 | namespace tld 32 | { 33 | class NormalizedPatch 34 | { 35 | public: 36 | float values[TLD_PATCH_SIZE *TLD_PATCH_SIZE]; 37 | bool positive; 38 | }; 39 | } /* namespace tld */ 40 | #endif /* NORMALIZEDPATCH_H_ */ 41 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/tld/TLD.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * TLD.h 22 | * 23 | * Created on: Nov 17, 2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef TLD_H_ 28 | #define TLD_H_ 29 | 30 | #include 31 | #include 32 | #include 33 | #include "opencv2/core/core.hpp" 34 | #include "cf_tracker.hpp" 35 | #include "DetectorCascade.h" 36 | 37 | namespace tld 38 | { 39 | class TLD 40 | { 41 | private: 42 | void storeCurrentData(); 43 | void fuseHypotheses(const cv::Mat& colorImg); 44 | void learn(); 45 | void initialLearning(); 46 | void deleteCurrentBB(); 47 | std::shared_ptr tracker; 48 | public: 49 | DetectorCascade *detectorCascade; 50 | NNClassifier *nnClassifier; 51 | cv::Mat currImg; 52 | cv::Rect *currBB; 53 | cv::Rect trackerBB; 54 | bool valid; 55 | bool isTrackerValid; 56 | bool runTracker; 57 | float currConf; 58 | bool learning; 59 | 60 | bool hasImageDimensions; 61 | bool trackerEnabled; 62 | bool detectorEnabled; 63 | bool learningEnabled; 64 | bool alternating; 65 | std::shared_ptr rng; 66 | int seed; 67 | 68 | TLD(); 69 | virtual ~TLD(); 70 | void init(bool useDsstTracker); 71 | void release(); 72 | void selectObject(const cv::Mat &img, cv::Rect *bb); 73 | void processImage(cv::Mat &img); 74 | }; 75 | } /* namespace tld */ 76 | #endif /* TLD_H_ */ 77 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/libopentld/tld/VarianceFilter.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * VarianceFilter.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef VARIANCEFILTER_H_ 27 | #define VARIANCEFILTER_H_ 28 | 29 | #include 30 | 31 | #include "IntegralImage.h" 32 | #include "DetectionResult.h" 33 | 34 | namespace tld 35 | { 36 | class VarianceFilter 37 | { 38 | IntegralImage* integralImg; 39 | IntegralImage* integralImg_squared; 40 | 41 | public: 42 | bool enabled; 43 | int *windowOffsets; 44 | 45 | DetectionResult *detectionResult; 46 | 47 | float minVar; 48 | 49 | VarianceFilter(); 50 | virtual ~VarianceFilter(); 51 | 52 | void release(); 53 | void nextIteration(const cv::Mat &img); 54 | bool filter(int idx); 55 | float calcVariance(int *off); 56 | }; 57 | } /* namespace tld */ 58 | #endif /* VARIANCEFILTER_H_ */ 59 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/opentld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | link_directories(${OpenCV_LIB_DIR}) 3 | 4 | include_directories(main 5 | ../libopentld/imacq 6 | ../libopentld/mftracker 7 | ../libopentld/tld 8 | ${CF_HEADER_DIRS} 9 | ${OpenCV_INCLUDE_DIRS}) 10 | 11 | if(NOT USE_SYSTEM_LIBS) 12 | include_directories(../3rdparty/libconfig) 13 | endif(NOT USE_SYSTEM_LIBS) 14 | 15 | #------------------------------------------------------------------------------- 16 | # main 17 | add_library(main 18 | main/Config.cpp 19 | main/Gui.cpp 20 | main/Main.cpp 21 | main/Settings.cpp 22 | main/Trajectory.cpp 23 | main/Config.h 24 | main/Gui.h 25 | main/Main.h 26 | main/Settings.h 27 | main/Trajectory.h 28 | ../3rdparty/cf_tracking/src/cf_libs/common/cf_tracker.hpp) 29 | 30 | target_link_libraries(main libopentld config++ ${OpenCV_LIBS}) 31 | 32 | #------------------------------------------------------------------------------- 33 | # opentld 34 | add_executable(cftld 35 | OpenTLD.cpp) 36 | 37 | target_link_libraries(cftld main libopentld config++ ${OpenCV_LIBS} ${catkin_LIBRARIES}) 38 | 39 | install(TARGETS cftld DESTINATION bin) 40 | 41 | #------------------------------------------------------------------------------- 42 | 43 | 44 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/opentld/main/Gui.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | #ifndef GUI_H_ 21 | #define GUI_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | namespace tld 28 | { 29 | class Gui 30 | { 31 | public: 32 | Gui(); 33 | ~Gui(); 34 | void init(); 35 | void showImage(IplImage *image); 36 | char getKey(); 37 | std::string windowName(); 38 | 39 | private: 40 | std::string m_window_name; 41 | }; 42 | 43 | /** 44 | * Get a bounding box from the user. 45 | * @param img image to display 46 | * @param rect CvRect containing the coordinates of the bounding box 47 | * @param gui initialized gui 48 | * @return PROGRAM_EXIT if 'q' or 'Q' pressed, SUCCESS if everything went right 49 | */ 50 | int getBBFromUser(IplImage *img, CvRect &rect, Gui *gui); 51 | } 52 | 53 | #endif /* GUI_H_ */ 54 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/KCFtld/src/opentld/main/Settings.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | #include "Settings.h" 21 | 22 | using namespace std; 23 | 24 | /** 25 | * @author Clemens Korner 26 | */ 27 | 28 | namespace tld 29 | { 30 | Settings::Settings() : 31 | m_useProportionalShift(true), 32 | m_varianceFilterEnabled(true), 33 | m_ensembleClassifierEnabled(true), 34 | m_nnClassifierEnabled(true), 35 | m_trackerEnabled(true), 36 | m_detectorEnabled(true), 37 | m_selectManually(false), 38 | m_learningEnabled(true), 39 | m_showOutput(true), 40 | m_showNotConfident(true), 41 | m_showColorImage(false), 42 | m_showDetections(false), 43 | m_saveOutput(false), 44 | m_alternating(false), 45 | m_useDsstTracker(false), 46 | m_trajectory(0), 47 | m_method(IMACQ_CAM), 48 | m_startFrame(1), 49 | m_lastFrame(0), 50 | m_minScale(-10), 51 | m_maxScale(10), 52 | m_numFeatures(13), 53 | m_numTrees(10), 54 | m_thetaP(0.55f), 55 | m_thetaN(0.5f), 56 | m_minSize(25), 57 | m_camNo(0), 58 | m_fps(24), 59 | m_seed(0), 60 | m_threshold(0.7f), 61 | m_proportionalShift(0.1f), 62 | m_initialBoundingBox(vector()) 63 | { 64 | } 65 | 66 | Settings::~Settings() 67 | { 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user 2 | .cproject 3 | .project 4 | CMakeCache.txt 5 | CMakeFiles 6 | Makefile 7 | OpenTLDConfig.cmake 8 | TODO 9 | cmake_install.cmake 10 | *.a 11 | build/ 12 | 13 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/AUTHORS: -------------------------------------------------------------------------------- 1 | Authors 2 | ======= 3 | 4 | Georg Nebehay 5 | 6 | Contributors 7 | ============ 8 | 9 | Clemens Korner 10 | Bernd Lukatschek 11 | João Silva 12 | Lucas Doyle 13 | Lukas Oberhuber 14 | Michael Rennie 15 | Sebastian Borggrewe 16 | Jonathan Senecal 17 | Huang Xin 18 | Jason Catchpole 19 | Victor Daropoulos 20 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/OpenTLDConfig.cmake.in: -------------------------------------------------------------------------------- 1 | find_package(OpenCV) 2 | 3 | set(bin_dir "@PROJECT_BINARY_DIR@") 4 | set(src_dir "@PROJECT_SOURCE_DIR@") 5 | 6 | set(OPENTLD_INCLUDE_DIRS 7 | ${src_dir}/src/3rdparty/cvblobs 8 | ${src_dir}/src/3rdparty/libconfig 9 | ${src_dir}/src/libopentld/tld 10 | ${src_dir}/src/libopentld/mftracker 11 | ${src_dir}/src/libopentld/imacq 12 | ${src_dir}/src/opentld/main) 13 | INCLUDE_DIRECTORIES(${OPENTLD_INCLUDE_DIRS}) 14 | 15 | SET(OPENTLD_LIB_DIRS ${LIBRARY_OUTPUT_PATH}) 16 | LINK_DIRECTORIES(${OPENTLD_LIB_DIRS}) 17 | 18 | set(OPENTLD_LIBS cvblobs libconfig libopentld) 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/changelog: -------------------------------------------------------------------------------- 1 | opentld (1.4.0) precise; urgency=low 2 | 3 | * Capture from RTSP streams 4 | * Trajectory 5 | * Bugfixes 6 | * ... 7 | 8 | -- Clemens Korner Wed, 10 Jul 2013 10:10:49 +0200 9 | 10 | opentld (1.3.0) precise; urgency=low 11 | 12 | * New Qt-Config-Dialog 13 | * several fixes 14 | 15 | -- Clemens Korner Wed, 12 Sep 2012 15:42:26 +0200 16 | 17 | opentld (0.1.2) precise; urgency=low 18 | 19 | * Initial Release. 20 | 21 | -- Georg Nebehay Sat, 28 Apr 2012 12:31:36 +0200 22 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/compat: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/control: -------------------------------------------------------------------------------- 1 | Source: opentld 2 | Section: science 3 | Priority: optional 4 | Maintainer: Georg Nebehay 5 | Build-Depends: debhelper (>= 8.0.0), 6 | cmake, 7 | libcv-dev, 8 | libopencv-dev, 9 | libhighgui-dev, 10 | libconfig++8-dev, 11 | libqt4-dev 12 | Standards-Version: 3.9.3 13 | Homepage: https://github.com/gnebehay/OpenTLD 14 | #Vcs-Git: git://github.com/gnebehay/OpenTLD.git 15 | #Vcs-Browser: https://github.com/gnebehay/OpenTLD.git;a=summary 16 | 17 | Package: opentld 18 | Architecture: any 19 | Depends: ${shlibs:Depends}, ${misc:Depends} 20 | Description: C++ implementation of OpenTLD 21 | This is a C++ implementation of OpenTLD that was originally published in 22 | MATLAB by Zdenek Kalal. 23 | . 24 | OpenTLD is used for tracking objects in video streams. What makes this 25 | algorithm outstanding is that it does not make use of any training data. This 26 | implementation is based solely on open source libraries, meaning that you do 27 | not need any commercial products to compile or run it. 28 | . 29 | If you have a webcam attached to your PC, you can simply execute opentld in 30 | order to try it out. 31 | 32 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright 2011-2012 Georg Nebehay 2 | License: GPL-3.0+ 3 | This program is free software: you can redistribute it and/or modify 4 | it under the terms of the GNU General Public License as published by 5 | the Free Software Foundation, either version 3 of the License, or 6 | (at your option) any later version. 7 | . 8 | This package is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | GNU General Public License for more details. 12 | . 13 | You should have received a copy of the GNU General Public License 14 | along with this program. If not, see . 15 | . 16 | On Debian systems, the complete text of the GNU General 17 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 18 | 19 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/docs: -------------------------------------------------------------------------------- 1 | README.md 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/opentld.install: -------------------------------------------------------------------------------- 1 | res/img/opentld.png usr/share/pixmaps 2 | res/packaging/opentld.desktop usr/share/applications/ 3 | res/packaging/qopentld.desktop usr/share/applications/ 4 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/opentld.manpages: -------------------------------------------------------------------------------- 1 | debian/opentld.1 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | # Uncomment this to turn on verbose mode. 5 | #export DH_VERBOSE=1 6 | 7 | override_dh_auto_configure: 8 | dh_auto_configure -- -DBUILD_QOPENTLD=ON -DUSE_SYSTEM_LIBS=ON 9 | 10 | %: 11 | dh $@ 12 | 13 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/launch/opentld.launch: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/StyleGuide.md: -------------------------------------------------------------------------------- 1 | Format the files with astyle: 2 | ``` 3 | astyle --style=allman --indent=spaces=4 --break-blocks --pad-oper --unpad-paren --convert-tabs --align-pointer=name myfile.cpp 4 | ``` 5 | (Examples are taken from [astyle](http://astyle.sourceforge.net/astyle.html) 6 | 7 | __Bracket Style__ 8 | _--style=allman_ 9 | Allman brackset stlye 10 | 11 | ```c++ 12 | int Foo(bool isBar) 13 | { 14 | if (isBar) 15 | { 16 | bar(); 17 | return 1; 18 | } 19 | else 20 | return 0; 21 | } 22 | ``` 23 | 24 | __Indent__ 25 | _--indent=spaces=4_ 26 | indent with 4 spaces 27 | 28 | __Padding Options__ 29 | _--break-blocks_ 30 | Pad empty lines around header blocks (e.g. 'if', 'for', 'while'...). 31 | ```c++ 32 | isFoo = true; 33 | if(isFoo) 34 | { 35 | bar(); 36 | } 37 | else 38 | { 39 | anotherBar(); 40 | } 41 | isBar = false; 42 | 43 | //becomes: 44 | 45 | isFoo = true; 46 | 47 | if(isFoo) 48 | { 49 | bar(); 50 | } 51 | else 52 | { 53 | anotherBar(); 54 | } 55 | 56 | isBar = false; 57 | ``` 58 | 59 | _--pad-oper_ 60 | Insert space padding around operators. Any end of line comments will remain in the original column, if possible. 61 | ```c++ 62 | a=bar((b-c)*a,d--); 63 | 64 | //becomes: 65 | 66 | a = bar((b - c) * a, d--); 67 | ``` 68 | 69 | _--unpad-paren_ 70 | Remove extra space padding around parenthesis on the inside and outside. Any end of line comments will remain in the original column, if possible. 71 | ```c++ 72 | bar ( a, b ); 73 | 74 | //becomes: 75 | 76 | bar(a, b); 77 | ``` 78 | 79 | _--convert-tabs_ 80 | Converts tabs into spaces in the non-indentation part of the line. The number of spaces inserted will maintain the spacing of the tab. The current setting for spaces per tab is used. It may not produce the expected results if convert-tabs is used when changing spaces per tab. Tabs are not replaced in quotes. 81 | 82 | _--align-pointer=name_ 83 | Attach a pointer or reference operator (* or &) to the variable name (right). 84 | ```c++ 85 | char * foo1; 86 | char& foo2; 87 | 88 | //becomes: 89 | char *foo1; 90 | char &foo2; 91 | ``` 92 | 93 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/ico/opentld.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/ico/opentld.ico -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/img/opentld.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/img/opentld.png -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/packaging/README: -------------------------------------------------------------------------------- 1 | Create Manpage: 2 | pod2man --center "C++ implementation of OpenTLD" --date "2012-05-01" --name "OpenTLD" --release "0.1.2" manpage.pod > opentld.1 3 | (Don't forget to adjust the date and the release) 4 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/packaging/opentld.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=OpenTLD 4 | Comment=Tracking-Learning-Detection 5 | Exec=opentld 6 | Icon=opentld.png 7 | Terminal=false 8 | Categories=Education;Science; 9 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/packaging/qopentld.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=QOpenTLD 4 | Comment=Tracking-Learning-Detection 5 | Exec=qopentld 6 | Icon=opentld.png 7 | Terminal=false 8 | Categories=Education;Science; 9 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/res/rcs.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | img/opentld.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobContour.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobContour.cpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobLibraryConfiguration.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobLibraryConfiguration.h -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobOperators.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobOperators.cpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobOperators.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobOperators.h -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobProperties.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobProperties.cpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobProperties.h: -------------------------------------------------------------------------------- 1 | 2 | //! Disable warnings referred to 255 character truncation for the std:map 3 | #pragma warning( disable : 4786 ) 4 | 5 | #ifndef BLOB_PROPERTIES_H_INCLUDED 6 | #define BLOB_PROPERTIES_H_INCLUDED 7 | 8 | #include 9 | #include "BlobLibraryConfiguration.h" 10 | #include "BlobContour.h" 11 | 12 | 13 | #ifdef BLOB_OBJECT_FACTORY 14 | //! Object factory pattern implementation 15 | #include "..\inspecta\DesignPatterns\ObjectFactory.h" 16 | #endif 17 | 18 | 19 | //! Type of labelled images 20 | typedef unsigned int t_labelType; 21 | 22 | //! Max order of calculated moments 23 | #define MAX_MOMENTS_ORDER 3 24 | 25 | 26 | //! Blob class 27 | class CBlobProperties 28 | { 29 | typedef std::list t_contourList; 30 | 31 | public: 32 | 33 | CBlobProperties(); 34 | virtual ~CBlobProperties(); 35 | 36 | //! Get blob area 37 | double GetArea(); 38 | 39 | //! Get blob perimeter 40 | double GetPerimeter(); 41 | 42 | //! Get contour moment (p,q up to MAX_CALCULATED_MOMENTS) 43 | double GetMoment(int p, int q); 44 | 45 | 46 | ////////////////////////////////////////////////////////////////////////// 47 | // Blob contours 48 | ////////////////////////////////////////////////////////////////////////// 49 | 50 | 51 | //! Contour storage memory 52 | CvMemStorage *m_storage; 53 | //! External contour of the blob (crack codes) 54 | CBlobContour m_externalContour; 55 | //! Internal contours (crack codes) 56 | t_contourList m_internalContours; 57 | 58 | private: 59 | 60 | //! Computed area from blob 61 | double m_area; 62 | //! Computed perimeter from blob 63 | double m_perimeter; 64 | // Computed moment from the blob 65 | double m_moment[MAX_MOMENTS_ORDER*MAX_MOMENTS_ORDER]; 66 | 67 | }; 68 | 69 | #endif //!BLOB_PROPERTIES_H_INCLUDED 70 | 71 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobResult.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/BlobResult.cpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(cvblobs 2 | blob.cpp 3 | BlobContour.cpp 4 | BlobOperators.cpp 5 | BlobProperties.cpp 6 | BlobResult.cpp 7 | ComponentLabeling.cpp 8 | blob.h 9 | BlobContour.h 10 | BlobLibraryConfiguration.h 11 | BlobOperators.h 12 | BlobProperties.h 13 | BlobResult.h 14 | ComponentLabeling.h) 15 | 16 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/ComponentLabeling.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/ComponentLabeling.cpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/ComponentLabeling.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/ComponentLabeling.h -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/blob.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/blob.cpp -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/blob.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/cvblobs/blob.h -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | #This are the defines for building a static libconfig for windows 2 | if(WIN32) 3 | add_definitions(-DLIBCONFIGXX_STATIC -DLIBCONFIG_STATIC -DYY_NO_UNISTD_H -DYY_USE_CONST -D_CRT_SECURE_NO_DEPRECATE -D_STDLIB_H) 4 | endif(WIN32) 5 | 6 | add_library(configure++ 7 | grammar.c 8 | libconfig.c 9 | libconfigcpp.cc 10 | scanctx.c 11 | scanner.c 12 | strbuf.c 13 | grammar.h 14 | libconfig.h 15 | libconfig.hh 16 | parsectx.h 17 | scanctx.h 18 | scanner.h 19 | strbuf.h 20 | wincompat.h) 21 | 22 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/libconfig.hh: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A structured configuration file parsing library 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #include 24 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/libconfigcpp.cc: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A structured configuration file parsing library 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Lesser General Public 18 | License along with this library; if not, write to the Free Software 19 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #include "libconfigcpp.c++" 24 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/parsectx.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #ifndef __libconfig_parsectx_h 24 | #define __libconfig_parsectx_h 25 | 26 | #include "libconfig.h" 27 | #include "strbuf.h" 28 | 29 | struct parse_context 30 | { 31 | config_t *config; 32 | config_setting_t *parent; 33 | config_setting_t *setting; 34 | char *name; 35 | strbuf_t string; 36 | }; 37 | 38 | #define parsectx_init(C) \ 39 | memset((C), 0, sizeof(struct parse_context)) 40 | #define parsectx_cleanup(C) \ 41 | free((void *)(strbuf_release(&((C)->string)))) 42 | 43 | #define parsectx_append_string(C, S) \ 44 | strbuf_append(&((C)->string), (S)) 45 | #define parsectx_take_string(C) \ 46 | strbuf_release(&((C)->string)) 47 | 48 | #endif /* __libconfig_parsectx_h */ 49 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/scanctx.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #ifndef __libconfig_scanctx_h 24 | #define __libconfig_scanctx_h 25 | 26 | #include "libconfig.h" 27 | #include "strbuf.h" 28 | 29 | #include 30 | #include 31 | 32 | #define MAX_INCLUDE_DEPTH 10 33 | 34 | struct scan_context 35 | { 36 | config_t *config; 37 | const char *top_filename; 38 | const char *files[MAX_INCLUDE_DEPTH]; 39 | void *buffers[MAX_INCLUDE_DEPTH]; 40 | FILE *streams[MAX_INCLUDE_DEPTH]; 41 | int depth; 42 | strbuf_t string; 43 | const char **filenames; 44 | unsigned int num_filenames; 45 | }; 46 | 47 | extern void scanctx_init(struct scan_context *ctx, const char *top_filename); 48 | extern const char **scanctx_cleanup(struct scan_context *ctx, 49 | unsigned int *num_filenames); 50 | 51 | extern FILE *scanctx_push_include(struct scan_context *ctx, void *prev_buffer, 52 | const char **error); 53 | extern void *scanctx_pop_include(struct scan_context *ctx); 54 | 55 | #define scanctx_append_string(C, S) \ 56 | strbuf_append(&((C)->string), (S)) 57 | 58 | extern char *scanctx_take_string(struct scan_context *ctx); 59 | 60 | extern const char *scanctx_current_filename(struct scan_context *ctx); 61 | 62 | #endif /* __libconfig_scanctx_h */ 63 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/strbuf.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #include "strbuf.h" 24 | 25 | #include 26 | #include 27 | 28 | #define STRING_BLOCK_SIZE 64 29 | 30 | /* ------------------------------------------------------------------------- */ 31 | 32 | char *strbuf_release(strbuf_t *buf) 33 | { 34 | char *r = buf->string; 35 | memset(buf, 0, sizeof(strbuf_t)); 36 | return(r); 37 | } 38 | 39 | /* ------------------------------------------------------------------------- */ 40 | 41 | void strbuf_append(strbuf_t *buf, const char *text) 42 | { 43 | static const size_t mask = ~(STRING_BLOCK_SIZE - 1); 44 | size_t len = strlen(text); 45 | size_t newlen = buf->length + len + 1; /* add 1 for NUL */ 46 | 47 | if(newlen > buf->capacity) 48 | { 49 | buf->capacity = (newlen + (STRING_BLOCK_SIZE - 1)) & mask; 50 | buf->string = (char *)realloc(buf->string, buf->capacity); 51 | } 52 | 53 | strcpy(buf->string + buf->length, text); 54 | buf->length += len; 55 | } 56 | 57 | /* ------------------------------------------------------------------------- */ 58 | /* eof */ 59 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/3rdparty/libconfig/strbuf.h: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | libconfig - A library for processing structured configuration files 3 | Copyright (C) 2005-2010 Mark A Lindner 4 | 5 | This file is part of libconfig. 6 | 7 | This library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public License 9 | as published by the Free Software Foundation; either version 2.1 of 10 | the License, or (at your option) any later version. 11 | 12 | This library is distributed in the hope that it will be useful, but 13 | WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | Lesser General Public License for more details. 16 | 17 | You should have received a copy of the GNU Library General Public 18 | License along with this library; if not, see 19 | . 20 | ---------------------------------------------------------------------------- 21 | */ 22 | 23 | #ifndef __libconfig_strbuf_h 24 | #define __libconfig_strbuf_h 25 | 26 | #include 27 | #include 28 | 29 | typedef struct 30 | { 31 | char *string; 32 | size_t length; 33 | size_t capacity; 34 | } strbuf_t; 35 | 36 | char *strbuf_release(strbuf_t *buf); 37 | 38 | void strbuf_append(strbuf_t *buf, const char *text); 39 | 40 | #endif /* __libconfig_strbuf_h */ 41 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | include_directories(imacq 3 | mftracker 4 | tld 5 | ../3rdparty/cvblobs 6 | ${OpenCV_INCLUDE_DIRS}) 7 | link_directories(${OpenCV_LIB_DIR}) 8 | 9 | add_library(libopentld_gnebehay 10 | imacq/ImAcq.cpp 11 | mftracker/BB.cpp 12 | mftracker/BBPredict.cpp 13 | mftracker/FBTrack.cpp 14 | mftracker/Lk.cpp 15 | mftracker/Median.cpp 16 | tld/Clustering.cpp 17 | tld/DetectionResult.cpp 18 | tld/DetectorCascade.cpp 19 | tld/EnsembleClassifier.cpp 20 | tld/ForegroundDetector.cpp 21 | tld/MedianFlowTracker.cpp 22 | tld/NNClassifier.cpp 23 | tld/TLD.cpp 24 | tld/TLDUtil.cpp 25 | tld/VarianceFilter.cpp 26 | imacq/ImAcq.h 27 | mftracker/BB.h 28 | mftracker/BBPredict.h 29 | mftracker/FBTrack.h 30 | mftracker/Lk.h 31 | mftracker/Median.h 32 | tld/Clustering.h 33 | tld/DetectionResult.h 34 | tld/DetectorCascade.h 35 | tld/EnsembleClassifier.h 36 | tld/ForegroundDetector.h 37 | tld/IntegralImage.h 38 | tld/MedianFlowTracker.h 39 | tld/NNClassifier.h 40 | tld/NormalizedPatch.h 41 | tld/TLD.h 42 | tld/TLDUtil.h 43 | tld/VarianceFilter.h) 44 | 45 | target_link_libraries(libopentld_gnebehay ${OpenCV_LIBS}) 46 | 47 | set_target_properties(libopentld_gnebehay PROPERTIES OUTPUT_NAME opentld_gnebehay) 48 | 49 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/mftracker/BB.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * @file bb.h 22 | * 23 | * Created on: 17.03.2011 24 | * @author: bernd 25 | * @brief 26 | */ 27 | 28 | #ifndef BB_H_ 29 | #define BB_H_ 30 | 31 | /** 32 | * @param bb Bounding box represented through 2 points(x1,y1,x2,y2) 33 | * @param numM Number of points in height direction. 34 | * @param numN Number of points in width direction. 35 | * @param margin margin (in pixel) 36 | * @param pts Contains the calculated points in the form (x1, y1, x2, y2). 37 | * Size of the array must be numM * numN * 2. 38 | */ 39 | int getFilledBBPoints(float *bb, int numM, int numN, int margin, float *pts); 40 | 41 | #endif /* BB_H_ */ 42 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/mftracker/BBPredict.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * @file bb_predict.h 22 | * 23 | * Created on: 28.03.2011 24 | * @author: bernd 25 | * @brief 26 | */ 27 | 28 | #ifndef BBPREDICT_H_ 29 | #define BBPREDICT_H_ 30 | 31 | #include 32 | 33 | /** 34 | * @param bb0 The previous BoundingBox. 35 | * @param pt0 Feature points in the previous BoundingBox. 36 | * @param pt1 Feature points of the new BoundingBox. 37 | * @param nPts Length of pt0/pt1. 38 | * @param bb1 Output, contains predicted BoundingBox. 39 | * @param shift Output, contains relative scale change. 40 | * 1 == no scalechange, experience: if shift == 0 41 | * BoundingBox moved completely out of picture 42 | * (not validated) 43 | */ 44 | int predictbb(float *bb0, CvPoint2D32f *pt0, CvPoint2D32f *pt1, int nPts, 45 | float *bb1, float *shift); 46 | 47 | #endif /* BBPREDICT_H_ */ 48 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/mftracker/FBTrack.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * fbtrack.h 22 | * 23 | * Created on: 29.04.2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef FBTRACK_H_ 28 | #define FBTRACK_H_ 29 | 30 | #include 31 | 32 | /* 33 | * @param imgI Image contain Object with known BoundingBox 34 | * @param imgJ Following Image. 35 | * @param bb Bounding box of object to track in imgI. 36 | * Format x1,y1,x2,y2 37 | * @param scaleshift returns relative scale change of bb 38 | */ 39 | int fbtrack(IplImage *imgI, IplImage *imgJ, float *bb, float *bbnew, float *scaleshift); 40 | 41 | #endif /* FBTRACK_H_ */ 42 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/mftracker/Lk.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * @file lk.h 22 | * 23 | * Created on: 02.03.2011 24 | * @author bernd 25 | */ 26 | 27 | #ifndef LK_H_ 28 | #define LK_H_ 29 | 30 | #include 31 | 32 | /** 33 | * Need before start of trackLK and at the end of the program for cleanup. 34 | */ 35 | void initImgs(); 36 | int trackLK(IplImage *imgI, IplImage *imgJ, float ptsI[], int nPtsI, 37 | float ptsJ[], int nPtsJ, int level, float *fbOut, float *nccOut, 38 | char *statusOut); 39 | 40 | #endif /* LK_H_ */ 41 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/mftracker/Median.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * @file median.h 22 | * 23 | * Created on: 22.03.2011 24 | * @author: bernd 25 | * @brief 26 | */ 27 | 28 | #ifndef MEDIAN_H_ 29 | #define MEDIAN_H_ 30 | 31 | /** 32 | * Returns median of the array. Changes array! 33 | * @param arr the array 34 | * @pram n length of array 35 | */ 36 | float getMedian(float arr[], int n); 37 | 38 | /** 39 | * Calculates Median of the array. Don't change array(makes copy). 40 | * @param arr the array 41 | * @pram n length of array 42 | */ 43 | float getMedianUnmanaged(float arr[], int n); 44 | 45 | #endif /* MEDIAN_H_ */ 46 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/Clustering.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * Clustering.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef CLUSTERING_H_ 27 | #define CLUSTERING_H_ 28 | 29 | #include 30 | 31 | #include 32 | 33 | #include "DetectionResult.h" 34 | 35 | namespace tld 36 | { 37 | 38 | class Clustering 39 | { 40 | void calcMeanRect(std::vector * indices); 41 | void calcDistances(float *distances); 42 | void cluster(float *distances, int *clusterIndices); 43 | public: 44 | int *windows; 45 | int numWindows; 46 | 47 | DetectionResult *detectionResult; 48 | 49 | //Configurable members 50 | float cutoff; 51 | 52 | 53 | 54 | Clustering(); 55 | virtual ~Clustering(); 56 | void release(); 57 | void clusterConfidentIndices(); 58 | }; 59 | 60 | } /* namespace tld */ 61 | #endif /* CLUSTERING_H_ */ 62 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/DetectionResult.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * DetectionResult.h 22 | * 23 | * Created on: Nov 16, 2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef DETECTIONRESULT_H_ 28 | #define DETECTIONRESULT_H_ 29 | 30 | #include 31 | 32 | #include 33 | 34 | namespace tld 35 | { 36 | 37 | class DetectionResult 38 | { 39 | public: 40 | bool containsValidData; 41 | std::vector* fgList; 42 | float *posteriors; /* Contains the posteriors for each slding window. Is of size numWindows. Allocated by tldInitClassifier. */ 43 | std::vector* confidentIndices; 44 | int *featureVectors; 45 | float *variances; 46 | int numClusters; 47 | cv::Rect *detectorBB; //Contains a valid result only if numClusters = 1 48 | 49 | DetectionResult(); 50 | virtual ~DetectionResult(); 51 | 52 | void init(int numWindows, int numTrees); 53 | 54 | void reset(); 55 | void release(); 56 | 57 | }; 58 | 59 | } /* namespace tld */ 60 | #endif /* DETECTIONRESULT_H_ */ 61 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/ForegroundDetector.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * ForegroundDetector.cpp 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #include "ForegroundDetector.h" 27 | 28 | #include "BlobResult.h" 29 | 30 | using namespace cv; 31 | 32 | namespace tld 33 | { 34 | 35 | ForegroundDetector::ForegroundDetector() 36 | { 37 | fgThreshold = 16; 38 | minBlobSize = 0; 39 | } 40 | 41 | ForegroundDetector::~ForegroundDetector() 42 | { 43 | } 44 | 45 | void ForegroundDetector::release() 46 | { 47 | } 48 | 49 | void ForegroundDetector::nextIteration(const Mat &img) 50 | { 51 | if(bgImg.empty()) 52 | { 53 | return; 54 | } 55 | 56 | Mat absImg = Mat(img.cols, img.rows, img.type()); 57 | Mat threshImg = Mat(img.cols, img.rows, img.type()); 58 | 59 | absdiff(bgImg, img, absImg); 60 | threshold(absImg, threshImg, fgThreshold, 255, CV_THRESH_BINARY); 61 | 62 | IplImage im = (IplImage)threshImg; 63 | CBlobResult blobs = CBlobResult(&im, NULL, 0); 64 | 65 | blobs.Filter(blobs, B_EXCLUDE, CBlobGetArea(), B_LESS, minBlobSize); 66 | 67 | std::vector* fgList = detectionResult->fgList; 68 | fgList->clear(); 69 | 70 | for(int i = 0; i < blobs.GetNumBlobs(); i++) 71 | { 72 | CBlob *blob = blobs.GetBlob(i); 73 | CvRect rect = blob->GetBoundingBox(); 74 | fgList->push_back(rect); 75 | } 76 | 77 | } 78 | 79 | bool ForegroundDetector::isActive() 80 | { 81 | return !bgImg.empty(); 82 | } 83 | 84 | } /* namespace tld */ 85 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/ForegroundDetector.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * ForegroundDetector.h 22 | * 23 | * Created on: Nov 16, 2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef FOREGROUNDDETECTOR_H_ 28 | #define FOREGROUNDDETECTOR_H_ 29 | 30 | #include 31 | 32 | #include 33 | 34 | #include "DetectionResult.h" 35 | 36 | namespace tld 37 | { 38 | 39 | class ForegroundDetector 40 | { 41 | public: 42 | int fgThreshold; 43 | int minBlobSize; 44 | cv::Mat bgImg; 45 | DetectionResult *detectionResult; 46 | 47 | ForegroundDetector(); 48 | virtual ~ForegroundDetector(); 49 | void release(); 50 | void nextIteration(const cv::Mat &img); 51 | bool isActive(); 52 | }; 53 | 54 | } /* namespace tld */ 55 | #endif /* FOREGROUNDDETECTOR_H_ */ 56 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/MedianFlowTracker.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * MedianFlowTracker.h 22 | * 23 | * Created on: Nov 17, 2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef MEDIANFLOWTRACKER_H_ 28 | #define MEDIANFLOWTRACKER_H_ 29 | 30 | #include 31 | 32 | namespace tld 33 | { 34 | 35 | class MedianFlowTracker 36 | { 37 | public: 38 | cv::Rect *trackerBB; 39 | 40 | MedianFlowTracker(); 41 | virtual ~MedianFlowTracker(); 42 | void cleanPreviousData(); 43 | void track(const cv::Mat &prevImg, const cv::Mat &currImg, cv::Rect *prevBB); 44 | }; 45 | 46 | } /* namespace tld */ 47 | #endif /* MEDIANFLOWTRACKER_H_ */ 48 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/NNClassifier.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * NNClassifier.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef NNCLASSIFIER_H_ 27 | #define NNCLASSIFIER_H_ 28 | 29 | #include 30 | 31 | #include 32 | 33 | #include "NormalizedPatch.h" 34 | #include "DetectionResult.h" 35 | 36 | namespace tld 37 | { 38 | 39 | class NNClassifier 40 | { 41 | float ncc(float *f1, float *f2); 42 | public: 43 | bool enabled; 44 | 45 | int *windows; 46 | float thetaFP; 47 | float thetaTP; 48 | DetectionResult *detectionResult; 49 | std::vector* falsePositives; 50 | std::vector* truePositives; 51 | 52 | NNClassifier(); 53 | virtual ~NNClassifier(); 54 | 55 | void release(); 56 | float classifyPatch(NormalizedPatch *patch); 57 | float classifyBB(const cv::Mat &img, cv::Rect *bb); 58 | float classifyWindow(const cv::Mat &img, int windowIdx); 59 | void learn(std::vector patches); 60 | bool filter(const cv::Mat &img, int windowIdx); 61 | }; 62 | 63 | } /* namespace tld */ 64 | #endif /* NNCLASSIFIER_H_ */ 65 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/NormalizedPatch.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * NormalizedPatch.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef NORMALIZEDPATCH_H_ 27 | #define NORMALIZEDPATCH_H_ 28 | 29 | #define TLD_PATCH_SIZE 15 30 | 31 | namespace tld 32 | { 33 | 34 | class NormalizedPatch 35 | { 36 | public: 37 | float values[TLD_PATCH_SIZE *TLD_PATCH_SIZE]; 38 | bool positive; 39 | }; 40 | 41 | } /* namespace tld */ 42 | #endif /* NORMALIZEDPATCH_H_ */ 43 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/TLD.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /* 21 | * TLD.h 22 | * 23 | * Created on: Nov 17, 2011 24 | * Author: Georg Nebehay 25 | */ 26 | 27 | #ifndef TLD_H_ 28 | #define TLD_H_ 29 | 30 | #include 31 | 32 | #include "MedianFlowTracker.h" 33 | #include "DetectorCascade.h" 34 | 35 | namespace tld 36 | { 37 | 38 | class TLD 39 | { 40 | void storeCurrentData(); 41 | void fuseHypotheses(); 42 | void learn(); 43 | void initialLearning(); 44 | public: 45 | bool trackerEnabled; 46 | bool detectorEnabled; 47 | bool learningEnabled; 48 | bool alternating; 49 | 50 | MedianFlowTracker *medianFlowTracker; 51 | DetectorCascade *detectorCascade; 52 | NNClassifier *nnClassifier; 53 | bool valid; 54 | bool wasValid; 55 | cv::Mat prevImg; 56 | cv::Mat currImg; 57 | cv::Rect *prevBB; 58 | cv::Rect *currBB; 59 | float currConf; 60 | bool learning; 61 | 62 | TLD(); 63 | virtual ~TLD(); 64 | void release(); 65 | void selectObject(const cv::Mat &img, cv::Rect *bb); 66 | void processImage(const cv::Mat &img); 67 | void writeToFile(const char *path); 68 | void readFromFile(const char *path); 69 | }; 70 | 71 | } /* namespace tld */ 72 | #endif /* TLD_H_ */ 73 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/libopentld/tld/VarianceFilter.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | /* 20 | * VarianceFilter.h 21 | * 22 | * Created on: Nov 16, 2011 23 | * Author: Georg Nebehay 24 | */ 25 | 26 | #ifndef VARIANCEFILTER_H_ 27 | #define VARIANCEFILTER_H_ 28 | 29 | #include 30 | 31 | #include "IntegralImage.h" 32 | #include "DetectionResult.h" 33 | 34 | namespace tld 35 | { 36 | 37 | class VarianceFilter 38 | { 39 | IntegralImage* integralImg; 40 | IntegralImage* integralImg_squared; 41 | 42 | public: 43 | bool enabled; 44 | int *windowOffsets; 45 | 46 | DetectionResult *detectionResult; 47 | 48 | float minVar; 49 | 50 | VarianceFilter(); 51 | virtual ~VarianceFilter(); 52 | 53 | void release(); 54 | void nextIteration(const cv::Mat &img); 55 | bool filter(int idx); 56 | float calcVariance(int *off); 57 | }; 58 | 59 | } /* namespace tld */ 60 | #endif /* VARIANCEFILTER_H_ */ 61 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/opentld/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | link_directories(${OpenCV_LIB_DIR}) 3 | 4 | include_directories(main 5 | ../libopentld/imacq 6 | ../libopentld/mftracker 7 | ../libopentld/tld 8 | ../3rdparty/cvblobs 9 | ${OpenCV_INCLUDE_DIRS}) 10 | 11 | if(NOT USE_SYSTEM_LIBS) 12 | include_directories(../3rdparty/libconfig) 13 | endif(NOT USE_SYSTEM_LIBS) 14 | 15 | #------------------------------------------------------------------------------- 16 | # main 17 | add_library(main_gnebehay 18 | main/Config.cpp 19 | main/Gui.cpp 20 | main/Main.cpp 21 | main/Settings.cpp 22 | main/Trajectory.cpp 23 | main/Config.h 24 | main/Gui.h 25 | main/Main.h 26 | main/Settings.h 27 | main/Trajectory.h) 28 | 29 | target_link_libraries(main_gnebehay libopentld_gnebehay cvblobs configure++ ${OpenCV_LIBS}) 30 | 31 | #------------------------------------------------------------------------------- 32 | # opentld 33 | add_executable(opentld 34 | OpenTLD.cpp) 35 | 36 | target_link_libraries(opentld main_gnebehay libopentld_gnebehay cvblobs configure++ ${OpenCV_LIBS} ${catkin_LIBRARIES}) 37 | 38 | install(TARGETS opentld DESTINATION bin) 39 | 40 | #------------------------------------------------------------------------------- 41 | # qopentld 42 | 43 | 44 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/opentld/QOpenTLD.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * @author Clemens Korner 22 | */ 23 | 24 | #include 25 | 26 | #include "Main.h" 27 | #include "Config.h" 28 | #include "ImAcq.h" 29 | #include "Gui.h" 30 | #include "ConfigDialog.h" 31 | 32 | using tld::Config; 33 | using tld::Gui; 34 | using tld::Settings; 35 | 36 | int main(int argc, char **argv) 37 | { 38 | 39 | Main *main = new Main(); 40 | ImAcq *imAcq = imAcqAlloc(); 41 | Gui *gui = new Gui(); 42 | Settings *settings = new Settings(); 43 | 44 | main->gui = gui; 45 | main->imAcq = imAcq; 46 | 47 | if(!getSettingsFromConfigDialog(argc, argv, settings)) 48 | { 49 | return EXIT_FAILURE; 50 | } 51 | 52 | fprintf(stdout, "OpenTLD appeares soon...\n"); 53 | 54 | Config config(*settings); 55 | config.configure(main); 56 | delete settings; 57 | settings = NULL; 58 | 59 | srand(main->seed); 60 | 61 | imAcqInit(imAcq); 62 | 63 | if(main->showOutput) 64 | { 65 | gui->init(); 66 | } 67 | 68 | main->doWork(); 69 | 70 | delete main; 71 | main = NULL; 72 | delete gui; 73 | gui = NULL; 74 | 75 | return EXIT_SUCCESS; 76 | } 77 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/opentld/main/Gui.h: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | #ifndef GUI_H_ 21 | #define GUI_H_ 22 | 23 | #include 24 | 25 | #include 26 | 27 | namespace tld 28 | { 29 | 30 | class Gui 31 | { 32 | public: 33 | Gui(); 34 | ~Gui(); 35 | void init(); 36 | void showImage(IplImage *image); 37 | char getKey(); 38 | std::string windowName(); 39 | 40 | private: 41 | std::string m_window_name; 42 | }; 43 | 44 | /** 45 | * Get a bounding box from the user. 46 | * @param img image to display 47 | * @param rect CvRect containing the coordinates of the bounding box 48 | * @param gui initialized gui 49 | * @return PROGRAM_EXIT if 'q' or 'Q' pressed, SUCCESS if everything went right 50 | */ 51 | int getBBFromUser(IplImage *img, CvRect &rect, Gui *gui); 52 | 53 | } 54 | 55 | #endif /* GUI_H_ */ 56 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/KCF_TLD/OpenTLD/src/opentld/main/Settings.cpp: -------------------------------------------------------------------------------- 1 | /* Copyright 2011 AIT Austrian Institute of Technology 2 | * 3 | * This file is part of OpenTLD. 4 | * 5 | * OpenTLD is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * OpenTLD is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with OpenTLD. If not, see . 17 | * 18 | */ 19 | 20 | #include "Settings.h" 21 | 22 | using namespace std; 23 | 24 | /** 25 | * @author Clemens Korner 26 | */ 27 | 28 | 29 | namespace tld 30 | { 31 | 32 | Settings::Settings() : 33 | m_useProportionalShift(true), 34 | m_varianceFilterEnabled(true), 35 | m_ensembleClassifierEnabled(true), 36 | m_nnClassifierEnabled(true), 37 | m_loadModel(false), 38 | m_trackerEnabled(true), 39 | m_selectManually(false), 40 | m_learningEnabled(true), 41 | m_showOutput(true), 42 | m_showNotConfident(true), 43 | m_showColorImage(false), 44 | m_showDetections(false), 45 | m_showForeground(false), 46 | m_saveOutput(false), 47 | m_alternating(false), 48 | m_exportModelAfterRun(false), 49 | m_trajectory(0), 50 | m_method(IMACQ_CAM), 51 | m_startFrame(1), 52 | m_lastFrame(0), 53 | m_minScale(-10), 54 | m_maxScale(10), 55 | m_numFeatures(13), 56 | m_numTrees(10), 57 | m_thetaP(0.65), 58 | m_thetaN(0.5), 59 | m_minSize(25), 60 | m_camNo(0), 61 | m_fps(24), 62 | m_seed(0), 63 | m_threshold(0.7), 64 | m_proportionalShift(0.1), 65 | m_modelExportFile("model"), 66 | m_initialBoundingBox(vector()) 67 | { 68 | } 69 | 70 | Settings::~Settings() 71 | { 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Machine Perception and Interaction Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/README.md: -------------------------------------------------------------------------------- 1 | # kcf_tld_tracking_ros 2 | Visual target tracking with KCF and TLD. 3 | Three packages including KCF, KCFtld and OpenTLD. you can run these three packages using Kinect. 4 | 5 | # How to build 6 | ## Dependencies 7 | * [ROS](http://www.ros.org) 8 | * OpenCV 3.0 9 | * CMake 10 | * Kinect Dirver [freenect](http://wiki.ros.org/freenect_launch) 11 | 12 | put the package into src folder of ros workspace then build it. 13 | 14 | #How to run 15 | ``` 16 | roslaunch KCF kcf.launch 17 | roslaunch KCFtld kcftld.launch 18 | roslaunch OpenTLD opentld.launch 19 | ``` 20 | Thanks to [Klaus Haag](https://github.com/klahaag/CFtld)! 21 | ## Contributor 22 | ------------------- 23 | - 张子洋: [zzy@mpig.com.cn](zzy@mpig.com.cn) 24 | 25 | --------- 26 | Cheers! 27 | :panda_face: 28 | -------------------------------------------------------------------------------- /kcf_tld_tracking_ros/data_opentld.txt: -------------------------------------------------------------------------------- 1 | cmd_linear=0.25,cmd_turn=0.25 2 | -------------------------------------------------------------------------------- /kcf_tracking_ros/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | -------------------------------------------------------------------------------- /kcf_tracking_ros/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Machine Perception and Interaction Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /kcf_tracking_ros/README.md: -------------------------------------------------------------------------------- 1 | # 利用Kinect进行KCF目标追踪在[ROS](http://www.ros.org)下的在线实现及在Turtlebot 2平台上的验证 2 | 该代码为[MPIG](www.mpig.com.cn) 2016届硕士生张子洋硕士论文《基于视觉追踪的跟随机器人研究》部分实验代码,旨在进行Turtlebot 2平台上的视觉伺服。 3 | ![following test](./follower/turtlebot_follower2_20160518121904.JPG) 4 | 实验视频观看地址:[Turtlebot 2 视觉伺服](http://v.youku.com/v_show/id_XMTU2NjEyODQ2OA==.html?tpa=dW5pb25faWQ9MTAzMjUyXzEwMDAwMV8wMV8wMQ) 5 | ## 1.KCF目标追踪 6 | #### 参考文献: 7 | * HENRIQUES J F, CASEIRO R, MARTINS P, et al.. High-speed tracking with kernelized correlation filters [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(3): 583-596. 8 | * BOLME D S, BEVERIDGE J R, DRAPER B A, et al.. Visual object tracking using adaptive correlation filters[C]. 23rd IEEE Conference on Computer Vision and Pattern Recognition(CVPR), 2010, 13-18. 9 | * 本项目中使用了原作者[Klaus Haag](https://github.com/klahaag/cf_tracking)的开源代码 . 十分感谢! 10 | 11 | ## 2.双轮差速控制 12 | #### 通过RGB图像目标追踪获取的目标位置与Depth图像获取的目标距离对Turtlebot进行伺服控制。 13 | 14 | ## Contributor 15 | ------------------- 16 | - 张子洋: [zzy@mpig.com.cn](www.mpig.com.cn) 17 | 18 | --------- 19 | Cheers! 20 | :panda_face: 21 | -------------------------------------------------------------------------------- /kcf_tracking_ros/data.txt: -------------------------------------------------------------------------------- 1 | 315 2 | 315 3 | 316 4 | 315 5 | 316 6 | 317 7 | 316 8 | 317 9 | 318 10 | 316 11 | 315 12 | 317 13 | 318 14 | 317 15 | 317 16 | 316 17 | 316 18 | 312 19 | 313 20 | 315 21 | 317 22 | 314 23 | 317 24 | 317 25 | 314 26 | 315 27 | 315 28 | 314 29 | 314 30 | 314 31 | 314 32 | 316 33 | 317 34 | 317 35 | 317 36 | 315 37 | 315 38 | 316 39 | 316 40 | 315 41 | 315 42 | 315 43 | 317 44 | 316 45 | 317 46 | 316 47 | 316 48 | 316 49 | 315 50 | 316 51 | 315 52 | 316 53 | 316 54 | 316 55 | 316 56 | 315 57 | 314 58 | 316 59 | 316 60 | 315 61 | 315 62 | 315 63 | 315 64 | 315 65 | 315 66 | 315 67 | 314 68 | 315 69 | 315 70 | 315 71 | 315 72 | 315 73 | 315 74 | 315 75 | 315 76 | 316 77 | 316 78 | 316 79 | 316 80 | 315 81 | 316 82 | 315 83 | 316 84 | 315 85 | 315 86 | 316 87 | 316 88 | 317 89 | 316 90 | 315 91 | 315 92 | 316 93 | 315 94 | 316 95 | 316 96 | 316 97 | 314 98 | 314 99 | 315 100 | 315 101 | 316 102 | 316 103 | 315 104 | 315 105 | 316 106 | 315 107 | 316 108 | 315 109 | 315 110 | 316 111 | 316 112 | 316 113 | 317 114 | 316 115 | 316 116 | 315 117 | 315 118 | 316 119 | 315 120 | 316 121 | 315 122 | 316 123 | 315 124 | 316 125 | 315 126 | 316 127 | 315 128 | 315 129 | 316 130 | 315 131 | 316 132 | 315 133 | 315 134 | 316 135 | 315 136 | 316 137 | 315 138 | 315 139 | 315 140 | 315 141 | 315 142 | 315 143 | 315 144 | 315 145 | 315 146 | 315 147 | 315 148 | 315 149 | 315 150 | 317 151 | 316 152 | 315 153 | 315 154 | 315 155 | 315 156 | 316 157 | 316 158 | 316 159 | 315 160 | 315 161 | 315 162 | 315 163 | 315 164 | 315 165 | 315 166 | 315 167 | 315 168 | 315 169 | 315 170 | 315 171 | 315 172 | 315 173 | 316 174 | 315 175 | 315 176 | 315 177 | 316 178 | 316 179 | 315 180 | 316 181 | 315 182 | 316 183 | 316 184 | 315 185 | 315 186 | 315 187 | 315 188 | 315 189 | 315 190 | 316 191 | 316 192 | 315 193 | 316 194 | 316 195 | -------------------------------------------------------------------------------- /kcf_tracking_ros/follower/launch/includes/safety_controller.launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | -------------------------------------------------------------------------------- /kcf_tracking_ros/follower/launch/includes/velocity_smoother.launch.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /kcf_tracking_ros/follower/launch/turtlebot_KCF_follower.launch: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /kcf_tracking_ros/follower/package.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | follower 4 | 0.0.0 5 | The follower package 6 | 7 | 8 | 9 | 10 | zzy 11 | 12 | 13 | 14 | 15 | 16 | TODO 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | catkin 43 | geometry_msgs 44 | roscpp 45 | std_msgs 46 | geometry_msgs 47 | roscpp 48 | std_msgs 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /kcf_tracking_ros/follower/turtlebot_follower2_20160518121904.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tracking_ros/follower/turtlebot_follower2_20160518121904.JPG -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/msg/BoundingBox.msg: -------------------------------------------------------------------------------- 1 | Header header 2 | float64 controlTurn 3 | float64 controlSpeed 4 | int32 x 5 | int32 y 6 | float32 z 7 | int32 width 8 | int32 height 9 | 10 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/cv_ext/psr.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/cv_ext/psr.hpp -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/cv_ext/shift.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright (c) 2012, Willow Garage, Inc. 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * * Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * * Redistributions in binary form must reproduce the above 14 | * copyright notice, this list of conditions and the following 15 | * disclaimer in the documentation and/or other materials provided 16 | * with the distribution. 17 | * * Neither the name of Willow Garage, Inc. nor the names of its 18 | * contributors may be used to endorse or promote products derived 19 | * from this software without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 25 | * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 31 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | * POSSIBILITY OF SUCH DAMAGE. 33 | * 34 | * File: shift.hpp 35 | * Author: Hilton Bristow 36 | * Created: Aug 23, 2012 37 | * + Author: Klaus Haag (split into header/source file) 38 | */ 39 | 40 | #ifndef SHIFT_HPP_ 41 | #define SHIFT_HPP_ 42 | 43 | #include 44 | 45 | void shift(const cv::Mat& src, cv::Mat& dst, cv::Point2f delta, 46 | int fill = cv::BORDER_CONSTANT, 47 | cv::Scalar value = cv::Scalar(0, 0, 0, 0)); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/piotr/README.md: -------------------------------------------------------------------------------- 1 | This module provides the FHOG implementation from 2 | http://vision.ucsd.edu/~pdollar/toolbox/doc/ 3 | with an OpenCV integration. 4 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/AUTHORS: -------------------------------------------------------------------------------- 1 | 2 | original author: Michael E. Smoot 3 | invaluable contributions: Daniel Aarno 4 | more contributions: Erik Zeek 5 | more contributions: Fabien Carmagnac (Tinbergen-AM) 6 | outstanding editing: Carol Smoot 7 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/COPYING: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright (c) 2003 Michael E. Smoot 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 22 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | 25 | 26 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = tclap 2 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/README: -------------------------------------------------------------------------------- 1 | 2 | TCLAP - Templatized Command Line Argument Parser 3 | 4 | This is a simple C++ library that facilitates parsing command line 5 | arguments in a type independent manner. It doesn't conform exactly 6 | to either the GNU or POSIX standards, although it is close. See 7 | docs/manual.html for descriptions of how things work or look at the 8 | simple examples in the examples dir. 9 | 10 | To find out what the latest changes are read the NEWS file in this directory. 11 | 12 | 13 | Any and all feedback is welcome to: Mike Smoot 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/CmdLineOutput.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: CmdLineOutput.h 6 | * 7 | * Copyright (c) 2004, Michael E. Smoot 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | #ifndef TCLAP_CMDLINEOUTPUT_H 24 | #define TCLAP_CMDLINEOUTPUT_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | namespace TCLAP { 34 | 35 | class CmdLineInterface; 36 | class ArgException; 37 | 38 | /** 39 | * The interface that any output object must implement. 40 | */ 41 | class CmdLineOutput 42 | { 43 | 44 | public: 45 | 46 | /** 47 | * Virtual destructor. 48 | */ 49 | virtual ~CmdLineOutput() {} 50 | 51 | /** 52 | * Generates some sort of output for the USAGE. 53 | * \param c - The CmdLine object the output is generated for. 54 | */ 55 | virtual void usage(CmdLineInterface& c)=0; 56 | 57 | /** 58 | * Generates some sort of output for the version. 59 | * \param c - The CmdLine object the output is generated for. 60 | */ 61 | virtual void version(CmdLineInterface& c)=0; 62 | 63 | /** 64 | * Generates some sort of output for a failure. 65 | * \param c - The CmdLine object the output is generated for. 66 | * \param e - The ArgException that caused the failure. 67 | */ 68 | virtual void failure( CmdLineInterface& c, 69 | ArgException& e )=0; 70 | 71 | }; 72 | 73 | } //namespace TCLAP 74 | #endif 75 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/Constraint.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Constraint.h 5 | * 6 | * Copyright (c) 2005, Michael E. Smoot 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_CONSTRAINT_H 23 | #define TCLAP_CONSTRAINT_H 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | namespace TCLAP { 33 | 34 | /** 35 | * The interface that defines the interaction between the Arg and Constraint. 36 | */ 37 | template 38 | class Constraint 39 | { 40 | 41 | public: 42 | /** 43 | * Returns a description of the Constraint. 44 | */ 45 | virtual std::string description() const =0; 46 | 47 | /** 48 | * Returns the short ID for the Constraint. 49 | */ 50 | virtual std::string shortID() const =0; 51 | 52 | /** 53 | * The method used to verify that the value parsed from the command 54 | * line meets the constraint. 55 | * \param value - The value that will be checked. 56 | */ 57 | virtual bool check(const T& value) const =0; 58 | 59 | /** 60 | * Destructor. 61 | * Silences warnings about Constraint being a base class with virtual 62 | * functions but without a virtual destructor. 63 | */ 64 | virtual ~Constraint() { ; } 65 | }; 66 | 67 | } //namespace TCLAP 68 | #endif 69 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/HelpVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: HelpVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | #ifndef TCLAP_HELP_VISITOR_H 23 | #define TCLAP_HELP_VISITOR_H 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Visitor object that calls the usage method of the given CmdLineOutput 33 | * object for the specified CmdLine object. 34 | */ 35 | class HelpVisitor: public Visitor 36 | { 37 | private: 38 | /** 39 | * Prevent accidental copying. 40 | */ 41 | HelpVisitor(const HelpVisitor& rhs); 42 | HelpVisitor& operator=(const HelpVisitor& rhs); 43 | 44 | protected: 45 | 46 | /** 47 | * The CmdLine the output will be generated for. 48 | */ 49 | CmdLineInterface* _cmd; 50 | 51 | /** 52 | * The output object. 53 | */ 54 | CmdLineOutput** _out; 55 | 56 | public: 57 | 58 | /** 59 | * Constructor. 60 | * \param cmd - The CmdLine the output will be generated for. 61 | * \param out - The type of output. 62 | */ 63 | HelpVisitor(CmdLineInterface* cmd, CmdLineOutput** out) 64 | : Visitor(), _cmd( cmd ), _out( out ) { } 65 | 66 | /** 67 | * Calls the usage method of the CmdLineOutput for the 68 | * specified CmdLine. 69 | */ 70 | void visit() { (*_out)->usage(*_cmd); throw ExitException(0); } 71 | 72 | }; 73 | 74 | } 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/IgnoreRestVisitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: IgnoreRestVisitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_IGNORE_REST_VISITOR_H 24 | #define TCLAP_IGNORE_REST_VISITOR_H 25 | 26 | #include 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | /** 32 | * A Vistor that tells the CmdLine to begin ignoring arguments after 33 | * this one is parsed. 34 | */ 35 | class IgnoreRestVisitor: public Visitor 36 | { 37 | public: 38 | 39 | /** 40 | * Constructor. 41 | */ 42 | IgnoreRestVisitor() : Visitor() {} 43 | 44 | /** 45 | * Sets Arg::_ignoreRest. 46 | */ 47 | void visit() { Arg::beginIgnoring(); } 48 | }; 49 | 50 | } 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | libtclapincludedir = $(includedir)/tclap 3 | 4 | libtclapinclude_HEADERS = \ 5 | CmdLineInterface.h \ 6 | ArgException.h \ 7 | CmdLine.h \ 8 | XorHandler.h \ 9 | MultiArg.h \ 10 | UnlabeledMultiArg.h \ 11 | ValueArg.h \ 12 | UnlabeledValueArg.h \ 13 | Visitor.h Arg.h \ 14 | HelpVisitor.h \ 15 | SwitchArg.h \ 16 | MultiSwitchArg.h \ 17 | VersionVisitor.h \ 18 | IgnoreRestVisitor.h \ 19 | CmdLineOutput.h \ 20 | StdOutput.h \ 21 | DocBookOutput.h \ 22 | ZshCompletionOutput.h \ 23 | OptionalUnlabeledTracker.h \ 24 | Constraint.h \ 25 | ValuesConstraint.h \ 26 | ArgTraits.h \ 27 | StandardTraits.h 28 | 29 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/OptionalUnlabeledTracker.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | /****************************************************************************** 4 | * 5 | * file: OptionalUnlabeledTracker.h 6 | * 7 | * Copyright (c) 2005, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_OPTIONAL_UNLABELED_TRACKER_H 25 | #define TCLAP_OPTIONAL_UNLABELED_TRACKER_H 26 | 27 | #include 28 | 29 | namespace TCLAP { 30 | 31 | class OptionalUnlabeledTracker 32 | { 33 | 34 | public: 35 | 36 | static void check( bool req, const std::string& argName ); 37 | 38 | static void gotOptional() { alreadyOptionalRef() = true; } 39 | 40 | static bool& alreadyOptional() { return alreadyOptionalRef(); } 41 | 42 | private: 43 | 44 | static bool& alreadyOptionalRef() { static bool ct = false; return ct; } 45 | }; 46 | 47 | 48 | inline void OptionalUnlabeledTracker::check( bool req, const std::string& argName ) 49 | { 50 | if ( OptionalUnlabeledTracker::alreadyOptional() ) 51 | throw( SpecificationException( 52 | "You can't specify ANY Unlabeled Arg following an optional Unlabeled Arg", 53 | argName ) ); 54 | 55 | if ( !req ) 56 | OptionalUnlabeledTracker::gotOptional(); 57 | } 58 | 59 | 60 | } // namespace TCLAP 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/VersionVisitor.h: -------------------------------------------------------------------------------- 1 | // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- 2 | 3 | /****************************************************************************** 4 | * 5 | * file: VersionVisitor.h 6 | * 7 | * Copyright (c) 2003, Michael E. Smoot . 8 | * All rights reverved. 9 | * 10 | * See the file COPYING in the top directory of this distribution for 11 | * more information. 12 | * 13 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 18 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19 | * DEALINGS IN THE SOFTWARE. 20 | * 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef TCLAP_VERSION_VISITOR_H 25 | #define TCLAP_VERSION_VISITOR_H 26 | 27 | #include 28 | #include 29 | #include 30 | 31 | namespace TCLAP { 32 | 33 | /** 34 | * A Vistor that will call the version method of the given CmdLineOutput 35 | * for the specified CmdLine object and then exit. 36 | */ 37 | class VersionVisitor: public Visitor 38 | { 39 | private: 40 | /** 41 | * Prevent accidental copying 42 | */ 43 | VersionVisitor(const VersionVisitor& rhs); 44 | VersionVisitor& operator=(const VersionVisitor& rhs); 45 | 46 | protected: 47 | 48 | /** 49 | * The CmdLine of interest. 50 | */ 51 | CmdLineInterface* _cmd; 52 | 53 | /** 54 | * The output object. 55 | */ 56 | CmdLineOutput** _out; 57 | 58 | public: 59 | 60 | /** 61 | * Constructor. 62 | * \param cmd - The CmdLine the output is generated for. 63 | * \param out - The type of output. 64 | */ 65 | VersionVisitor( CmdLineInterface* cmd, CmdLineOutput** out ) 66 | : Visitor(), _cmd( cmd ), _out( out ) { } 67 | 68 | /** 69 | * Calls the version method of the output object using the 70 | * specified CmdLine. 71 | */ 72 | void visit() { 73 | (*_out)->version(*_cmd); 74 | throw ExitException(0); 75 | } 76 | 77 | }; 78 | 79 | } 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/3rdparty/tclap/tclap/Visitor.h: -------------------------------------------------------------------------------- 1 | 2 | /****************************************************************************** 3 | * 4 | * file: Visitor.h 5 | * 6 | * Copyright (c) 2003, Michael E. Smoot . 7 | * All rights reverved. 8 | * 9 | * See the file COPYING in the top directory of this distribution for 10 | * more information. 11 | * 12 | * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS 13 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 | * DEALINGS IN THE SOFTWARE. 19 | * 20 | *****************************************************************************/ 21 | 22 | 23 | #ifndef TCLAP_VISITOR_H 24 | #define TCLAP_VISITOR_H 25 | 26 | namespace TCLAP { 27 | 28 | /** 29 | * A base class that defines the interface for visitors. 30 | */ 31 | class Visitor 32 | { 33 | public: 34 | 35 | /** 36 | * Constructor. Does nothing. 37 | */ 38 | Visitor() { } 39 | 40 | /** 41 | * Destructor. Does nothing. 42 | */ 43 | virtual ~Visitor() { } 44 | 45 | /** 46 | * Does nothing. Should be overridden by child. 47 | */ 48 | virtual void visit() { } 49 | }; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/common/cv_ext.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef CV_EXT_HPP_ 33 | #define CV_EXT_HPP_ 34 | 35 | #include "math_spectrums.hpp" 36 | #include "shift.hpp" 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/common/mat_consts.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef MAT_CONSTS_H_ 33 | #define MAT_CONSTS_H_ 34 | 35 | namespace mat_consts 36 | { 37 | template 38 | struct constants 39 | { 40 | const static T c0_5; 41 | const static T c2_0; 42 | }; 43 | 44 | template const T constants::c0_5 = static_cast(0.5); 45 | template const T constants::c2_0 = static_cast(2.0); 46 | } 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/common/tracker_debug.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | // License Agreement (3-clause BSD License) 3 | // Copyright (c) 2015, Klaus Haag, all rights reserved. 4 | // Third party copyrights and patents are property of their respective owners. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, 7 | // are permitted provided that the following conditions are met: 8 | // 9 | // * Redistributions of source code must retain the above copyright notice, 10 | // this list of conditions and the following disclaimer. 11 | // 12 | // * Redistributions in binary form must reproduce the above copyright notice, 13 | // this list of conditions and the following disclaimer in the documentation 14 | // and/or other materials provided with the distribution. 15 | // 16 | // * Neither the names of the copyright holders nor the names of the contributors 17 | // may be used to endorse or promote products derived from this software 18 | // without specific prior written permission. 19 | // 20 | // This software is provided by the copyright holders and contributors "as is" and 21 | // any express or implied warranties, including, but not limited to, the implied 22 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 23 | // In no event shall copyright holders or contributors be liable for any direct, 24 | // indirect, incidental, special, exemplary, or consequential damages 25 | // (including, but not limited to, procurement of substitute goods or services; 26 | // loss of use, data, or profits; or business interruption) however caused 27 | // and on any theory of liability, whether in contract, strict liability, 28 | // or tort (including negligence or otherwise) arising in any way out of 29 | // the use of this software, even if advised of the possibility of such damage. 30 | */ 31 | 32 | #ifndef TRACKER_DEBUG_HPP_ 33 | #define TRACKER_DEBUG_HPP_ 34 | 35 | namespace cf_tracking 36 | { 37 | class TrackerDebug 38 | { 39 | public: 40 | virtual ~TrackerDebug(){} 41 | 42 | virtual void init(std::string outputFilePath) = 0; 43 | virtual void printOnImage(cv::Mat& image) = 0; 44 | virtual void printConsoleOutput() = 0; 45 | virtual void printToFile() = 0; 46 | }; 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/dsst/dsst_tracker.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/dsst/dsst_tracker.hpp -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/kcf/.kcf_tracker.hpp.swp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/kcf/.kcf_tracker.hpp.swp -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/kcf/kcf_tracker.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DavidHan008/KCF_TLD_Tracking_ros/97dcd0ee456137bd1e95cb4765dcb5f4c2aa9187/kcf_tracking_ros/turtlebot_cf_tracking/src/cf_libs/kcf/kcf_tracker.hpp -------------------------------------------------------------------------------- /kcf_tracking_ros/turtlebot_cf_tracking/src/main/.~lock.main_kcf.cpp#: -------------------------------------------------------------------------------- 1 | ,davidhan,davidhan-ThinkPad-E460,23.06.2017 18:50,file:///home/davidhan/.config/libreoffice/4; -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | 首先 roslaunch openni_launch openni.launch 2 | 其次 使用rosun 来启动节点 不要用roslaunch 3 | OPentld: rosrun OpenTLD opentld 4 | KCF: rosrun KCFtld cftld 5 | 速度发布机制已经添加了。 6 | --------------------------------------------------------------------------------