How to draw a mask on the road with new driveworks

I’m currently plotting the track mask on my main image using the nvidia Renderer example. But with driveworks updates, how could I make this mask in this new version?

Dear bruno.araujo,

We provide driveworks sample sources, I think you can refer to the DriveWorks samples sources.
Could you please see the sample_object_detector source code for your topic?

Hi Steven, I have the following code:

typedef struct
  float32_t x;
  float32_t y;
  dwRenderEngineColorRGBA color;
  } Point2D;
Point2D points[1];

points[0].x = xQ;
points[0].y = yQ; //getRandom();

points[0].color = {1.0f, 0.0f, 0.0f, 0.3f};

dwRenderEngine_setPointSize(2.1f, m_renderEngine);

dwRenderEngine_setColor({0.0f, 1.0f, 1.0f, 1.0f}, m_renderEngine);
dwRenderEngine_setColorByValue(DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_ATTRIBUTE_RGBA, 1.0f, m_renderEngine);

dwRenderEngine_setColor({1.0f, 0.0f, 0.0f, 1.0f}, m_renderEngine);
dwRenderEngine_setColorByValue(DW_RENDER_ENGINE_COLOR_BY_VALUE_MODE_INTENSITY, 1.0f, m_renderEngine);

with this code, I can do this:

but I do not know how to put the camera image in the background along with the mask, so I comment the following code:


dwVector2f range{};
range.x = m_imgGl->prop.width;
range.y = m_imgGl->prop.height;
CHECK_DW_ERROR(dwRenderEngine_setCoordinateRange2D(range, m_renderEngine));
CHECK_DW_ERROR(dwRenderEngine_renderImage2D(m_imgGl, {0.0f, 0.0f, range.x, range.y}, m_renderEngine));


when I remove the comment, the points are rendered in zero positions, i have the following image

Thank you, my English is in the progress.