Base class for getting feat from an image (cv::Mat).
Input is an image (cv::Mat).
Output image reid feat.
Sample code:
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);
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::Reid
class:
Type | Name | Arguments |
---|---|---|
std::unique_ptr< Reid > |
create |
|
ReidResult
|
run |
|
std::vector< ReidResult > |
run |
|
std::vector< ReidResult > |
run |
|