vitis::ai::RGBDsegmentation - 3.5 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2023-06-29
Version
3.5 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
out image

Quick Function Reference

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

Table 1. Quick Function Reference
Type Member 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