イメージ (cv::Mat) から feat を取得するためのベース クラス。
入力はイメージ (cv::Mat) です。
出力はイメージの reid feat です。
サンプル コード:
if(argc < 3){
cerr<<"need two images"<<endl;
return -1;
}
Mat imgx = imread(argv[1]);
if(imgx.empty()){
cerr<<"can't load image! "<<argv[1]<<endl;
return -1;
}
Mat imgy = imread(argv[2]);
if(imgy.empty()){
cerr<<"can't load image! "<<argv[2]<<endl;
return -1;
}
auto det = vitis::ai::Reid::create
("reid");
Mat featx = det->run(imgx).feat;
Mat featy = det->run(imgy).feat;
double dismat= cosine_distance(featx, featy);
printf("dismat : %.3lf \n", dismat);
関数クイック リファレンス
次の表に、vitis::ai::Reid
クラスに定義されているすべての関数を示します。
タイプ | メンバー | 引数 |
---|---|---|
std::unique_ptr<
Reid
> |
create |
|
ReidResult
|
run |
|
std::vector<
ReidResult
> |
run |
|
std::vector<
ReidResult
> |
run |
|