I am trying to write the same python app (gen2-deeplabv3_person) in a C++ application. When I get the vector by calling getLayerInt32, I want to generate the color cv::Mat. I can't figure out how to write the following python code into C++:
class_colors = [[0,0,0], [0,255,0]]
class_colors = np.asarray(class_colors, dtype=np.uint8)
output = output_tensor.reshape(nn_shape,nn_shape)
output_colors = np.take(class_colors, output, axis=0)
Does anybody have an idea how this can be written in C++? I will appreciate any hints anybody can provide.