Base class for detecting rcan from an image (cv::Mat).
Input is an image (cv::Mat).
Output is the enlarged image.
Sample code:
Note: The input image size is 640x360
if (argc < 2) {
cerr << "usage: " << argv[0] << " modelname image_file_url " << endl;
abort();
}
Mat input_img = imread(argv[2]);
if (input_img.empty()) {
cerr << "can't load image! " << argv[2] << endl;
return -1;
}
auto det = vitis::ai::Rcan::create
(argv[1]);
Mat ret_img = det->run(input_img).feat;
imwrite("sample_rcan_result.png", ret_img);
Display of the model results:
Figure 1. result image

Quick Function Reference
The following table lists all the functions defined in the vitis::ai::Rcan
class:
Type | Member | Arguments |
---|---|---|
std::unique_ptr<
Rcan
> |
create |
|
RcanResult
|
run |
|
std::vector<
RcanResult
> |
run |
|
std::vector<
RcanResult
> |
run |
|