We had a question regarding the dwSensorSerializer_serializeImage() function of the driveworks SDK. It seems like a great function to make our own video output of images which we made ourselves during driving. For this we use the following example code:
dwSensorHandle_t camera = DW_NULL_HANDLE; // Code to setup the camera interface dwSensorSerializerHandle_t serializer; dwSensorSerializer_initialize(&serializer, &serializerParams, camera); dwSensorCamera_readFrame(&frame, 0, 66000, camera); dwImageHandle_t image; dwSensorCamera_getImage(&image, DW_CAMERA_OUTPUT_CUDA_RGBA_UINT8, frame); dwImage_getCUDA(&frameCUDA, image); // Running of a CUDA kernel to alter the image buffer dwSensorSerializer_serializeImage(image, serializer); dwSensorCamera_returnFrame(&frame);
So as is clear we try to take an image of the camera and do some editing on it and try to store it with the serializer. But running this code returns a segmentation fault in the Driveworks SDK libraries.
In the past we used the function dwSensorSerializer_serializeCameraFrameAsync() with great success to just store the video feed of the camera’s, as in the sample programs, with no problem.
We believe the issue lies in the fact the serializer is initialized with the camera sensor in the dwSensorSerializer_initialize() function. Nevertheless we do not know what type of sensor to initialize the selializer with for the use of the dwSensorSerializer_serializeImage() function.
Could you provide us with any sample code or some explanation how to use the dwSensorSerializer_serializeImage() function successfully?