Hi,
I am new to Driver PX2 platform and want to use nvmedia sample app ipp_bayerdgpu. Currently in the sample app the output of CUDA consumer is being saved in a file. But I want to render the output to the HDMI monitor instead of saving in the file.
Please suggest me how to do it.
Hi Ashutosh,
Please check CUDA_EGLStreams_Interop sample in CUDA. It uses CUDA as both producer and consumer. You need to replace CUDA consumer calls with openGL-EGL API calls for rendering. CUDA buffers are wrapped as openGL Texture to render it on screen.
Hi Siva,
Thanks a lot for your inputs. As I am new to this thing, just want your help to validate my approach.
In my usecase, I will get a RAW image from an image sensor and then I need to do some processing on this RAW image for which the code will be written in CUDA and then I need to render the processed image onto a display.
Given this is my usecase, I am thinking I should use NvMediaImageProducer and connect it to CUDA consumer using interop and then render the CUDA processed buffer on to a display over HDMI.
I found nvmipp_bayerdgpu sample closest to my usecase. In the cuda_consumer.c file, I need to place my code in cudaprocThreadFunc and as per your suggestion change the output currently being written to the file and use OpenGL-EGL API for rendering. I will study more about this rendering part.
Dear Ashutosh,
Did you get a chance to see nvm_eglStream sample. It can take CUDA as producer and GL as consumer. When CUDA is producer you can give .rgba file as input. So you can combine ipp_bayerdgpu and nvm_eglstream sample apps into a single application for your use case. You may have to set EGLStream attribute EGL_SUPPORT_REUSE_NV to false to allow return of last frame from EGLStream.
Hi Ashutosh,
Please check image_streamer_multi sample also if it suits your requirement. External Media
You can use dwImageNVMedia instead of dwImageCPU
Thanks for pointing me to the source code location. Currently I want to go ahead with VibranteSDK. I have following queries about our earlier suggestion to combine ipp_bayerdgpu and nvm_eglstream applications.
If I understand correctly the CUDA consumer in ipp_bayerdgpu app will generate a .rgba file as an output which can given as an input to CUDA producer in nvm_eglstream app and the gl_consumer in this app will render it on the screen. Have I understood correctly? But writing the output file is an overhead whcih I want to avoid. IS there a way to achieve it without really writing into a file?
Is it possible to have two producer-consumer relations in a single app and how can we connect the two?
Can I attach GL_consumer code (not as a consumer but more as a renderer) with CUDA consumer of ipp_bayerdgpu to achieve my goal? Do you think there is any better approach?
I could not find much information about EGLStream attribute EGL_SUPPORT_REUSE_NV. What does it do and how will it help incase we combile ipp_bayerdpgu and nvm_egl_stream app?
One more thing I tried the nvm_eglstream sample app with CUDA producer and GL_Consumer but I always got an error saying “Invalid EGL Pipeline, please use CUDA consumer with CUDA producer”.
So it seems we cannot use any other consumer with CUDA producer.
Is this intended behavior or am I missing something?
Dear ashutosh,
The first strategy is a bit complicated as you have to deal with EGL streams directly. So I suggested you to look into image_streamer_multi sample in driveworks. It does similar to what you want and reduces your efforts. Instead of CPUImage you can use NvmediaImage in the sample.
Is there any specific reason you want to use NVmedia API only?
Thanks. You are right even I feel the first strategy is bit complicated.
I used DriveInstall (V4.1) to build and flash the image into the DrivePx2. When I checked /usr/local/ on my ubuntu machine I found driveworks-0.2.1 version and inside that I could not find image_streamer_multi sample app.
I think I need to upgrade so can you tell me which DriveInstall version I should use to get the Driverworks-0.6 version? Also can you just give me brief idea about the differences in VibranteSDK and Driveworks SDK.
Drivworks SDK provides a set of API to build autonomous applications, object detection and path planning algorithms etc. It also has tools to acquire the data and calibration. Moore information about driveworks is available at /usr/local/driveworks-0.6/doc.
I could create my application. I am getting NvMediaImage from sensor then streaming it to CUDA and then sending it to GL for display. Currently I am using ar0231-rccb sensor as it is supported. I need your help in following issues
When I run my application, I get the following error “Driveworks exception thrown: DW_SAL_CANNOT_CREATE_SENSOR :CameraGMSL: cannot connect to camera” . But if I run the app agaian then sometimes in the nest try or sometimes after couple of tries my app works. Even I tried the sample gmsl camera app and there also I saw this issue. How can I resolve it?
Currently I am using ar0231 sensor as it is the one which is supporte on this platform. Is there any reference docuemnt to show how to write and integrate own iamge sensor driver so that my sensor is also available and can list as supported sensors when I run sample_sensor_info app?
Dear Ashutosh,
Can you please file a bug with source code and relevant information to reproduce it on our side.
Please login to https://developer.nvidia.com/drive with your credentials. Please check MyAccount->MyBugs->Submit a new bug to file bug.
Please share ID here to follow up