I would like to get access to pixels in the dwImageNvMedia structure which is used for GMSL camera reading for further processing.
I saw that it holds a pointer on NvMediaImage structure, and then I cannot find where are pixels.
Hi sacha,
All the data structures in Nvmedia are of abstract type. NvMediaImage does not directly expose the pointer to the image data. One way to modify the Image data contents is to use NvMediaImagePutBits API. Another way is, if the application sets NVM_SURF_ATTR_CPU_ACCESS_CACHED/UNCACHED,Then application can call NvMediaImageLock API and get the pointer information from NvMediaImageSurfaceMap structure. Please refer to Autonomous Vehicle Development Platforms | NVIDIA Docs to know more about NVmedia API. Please take a look at some Nvmedia samples to know how to modify image.
Thank you very much for your answer, it is helpful.
Most of the driveworks processing functions needs a dwImageCUDA parameter, e.g. dwStereoRectifier_rectify.
Therefore, I would like to ask you whether there is a simple way to convert the dwImageNvMedia into dwImageCUDA.
Currently we have a segmentation fault when calling the dwStereoRectifier_rectify function.
We tried, however, we still have a segmentation fault. We try to modify the sample “camera_multiple_gmsl” to add the stereo rectification.
Could you please share some similar code, or give some more detail on how to solve our issue?