The Class of
Segmentation8UC3
, this class run function run(const cv::Mat& image)
return a cv::Mat with the type is cv_8UC3 Sample code : auto det =
vitis::ai::Segmentation8UC3::create(vitis::ai::SEGMENTATION_FPN);
auto img = cv::imread("sample_segmentation.jpg");
int width = det->getInputWidth();
int height = det->getInputHeight();
cv::Mat image;
cv::resize(img, image, cv::Size(width, height), 0, 0,
cv::INTER_LINEAR);
auto result = det->run(image);
cv::imwrite("segres.jpg",result.segmentation);
Quick Function Reference
The following table lists all the functions defined in the vitis::ai::Segmentation8UC3
class:
Type | Name | Arguments |
---|---|---|
std::unique_ptr< Segmentation8UC3 > |
create |
|
int | getInputWidth |
|
int | getInputHeight |
|
size_t | get_input_batch |
|
SegmentationResult
|
run |
|
std::vector< SegmentationResult > |
run |
|