Storing a pointer to image data captured by camera to a file

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.8.1
[*] DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
[*] Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
[*] DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
[*] other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hi all, I have read a usb camera using a usb camera sample provided by driveworks. But suppose if i want to store a pointer pointing to the image captured by camera into a file so that i can further perform some operations on image data by giving it as a input to other application, how am I supposed to do it? Because raw file is getting generated when i am trying to save it to a file
usb_cam_updated.txt (16.1 KB)
I have made some changes in the code.
Seeking for help so could you please advice?

Dear @akshay.tupkar,
I notice saveImageToFile() function the shared file.
imageCUDA->dptr[0] will hold the GPU buffer that needs to be passed for further GPU processing. The data is stored in RGBA format in each pixel.

do i need to convert image from cuda to cpu?

Dear @akshay.tupkar,
If the openCV algorithm uses CPU, the GPU buffers need to be copied to CPU.

okay got it
In the source code, screenshot support is provided by pressing key ‘S’ and the format of screenshot is png. But I could not see any statement which claims that our application is capturing an image. Should I assume the same screenshot as a captured image if i want to give this as a input to opencv for driver drowsiness?

Dear @akshay.tupkar,
Yes. you can pass that png image to openCV module.

Okay Thanks for your support @SivaRamaKrishnaNV

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.