vitis::ai::RGBDsegmentation - 1.4.1 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2021-12-11
Version
1.4.1 English
Base class for RGBDsegmentation.

Input is a pair images which are RGB image (cv::Mat) and HHA map generated with depth map (cv::Mat).

Output is a heatmap where each pixels is predicted with a semantic category, like chair, bed, usual object in indoor.

Sample code:

Mat img_bgr = cv::imread("sample_rgbdsegmentation_bgr.jpg");
Mat img_hha = cv::imread("sample_rgbdsegmentation_hha.jpg");

auto segmentation = vitis::ai::RGBDsegmentation::create("SA-Gate_pt", true);

auto result = segmentation->run(img_bgr, img_hha);

imwrite("result.jpg", result.segmentation);

Display of the model results: width=\textwidth

Figure 1. out image
Image sample_RGBDsegmentation_result.jpg

Quick Function Reference

The following table lists all the functions defined in the vitis::ai::RGBDsegmentation class:

Table 1. Quick Function Reference
Type Name Arguments
std::unique_ptr< RGBDsegmentation > create
  • const std::string & model_name
  • bool need_preprocess
SegmentationResult run
  • const cv::Mat & image_bgr
  • const cv::Mat & image_hha