Scale dwImageCuda (normalize) before sending to engine as input


I have a dwImageCuda object, i would like to perform a simple normalization ( scale by 1/255 ) for the image it holds before sending it as input to my TensorRT engine (on the DrivePX2 AutoChauffer).

Of course we would like a solution that still allows to cross-compile for the DrivePX2.

What would be the best way to do this?

Note: we would rather avoid using OpenCV / other external libraries.

Thanks in advance

Dear deanzadok,
Please check modifying CUDA buffers directly(you can write CUDA kernel or copy the buffer to CPU and modify the values and copy back to CUDA buffer) by accessing CUDA device pointer from dwImageCUDA object.
You can check /usr/local/driveworks-0.6/samples/src/image/image_streamer_multi sample to know how to modify dwImageCUDA buffer using a kernel.