マルチトラックアルゴリズム#
Multi-trackは、メリーランド大学カレッジパーク校のCollective Dynamics and Control LabのDerek Paley博士のためにSteve Shermanが開発した、CMUcam3向けのシンプルな複数物体トラッキングアルゴリズムです。アルゴリズムの中核は、画像フレームの小さな領域に対してシンプルなカラートラックを呼び出し、返されたバウンディングボックスを再びマージして、見つかった物体のリストを提供することです。
典型的な3チャンネルのフル解像度画像では、multitrackの実行に約450 msかかります。これは、simple_color_trackの300ms、基本的な明るいピクセル検索の200msと比較したものです。フル解像度の単一チャンネル画像では、multitrackは約340ms、simple color trackは約200ms、明るいピクセルは約150msかかります。多くの最適化ができると思いますので、お気軽にアルゴリズムをいじって改善してください。
multitrackの呼び出しの例:
multitrack_pkt_t tracker;
cc3_pixbuf_load(); //takes picture
multitrack(&tracker);
//make sure to free the memory after you are done to prevent a memory leak
free(tracker.objects);
tracker.entries=0;
各multitrack_pkt_tは次のように定義されます:
typedef struct {
uint8_t entries; // the number of objects
cc3_track_pkt_t* objects;//pointer to the array of objects
cc3_track_pkt_t base; //the reference color data
uint8_t divh; //number of rows of blocks
uint8_t divw; //number of columns of blocks
uint16_t tolerance; //max distance track_pkts must be to merge
uint8_t minpix; // minimum number of pixels to not be filtered
uint8_t mindensity; //minimum density to not be filtered
uint8_t minwidth; //minimum dimension of a track pkt
} multitrack_pkt_t;
詳細なドキュメントはソース内で、サンプルのmainファイルとともに入手できるはずですが、ご質問があればフォーラムでお気軽にお尋ねください。