- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to convert my (working) program from a synchronous-pipe-based approach to an asynchronous-callback appraoch.
I have reviewed the document in https://github.com/IntelRealSense/librealsense/blob/master/doc/rs400_support.md , and I am using to convert my program.
The snippet shown below illustrate my code. The line that starts with " _Sensor.start" throws and exception.
1) Can anyone provide a "Hello world" application that simply perform asynchronous capture, or just correct my code below?
2) Also, it is not clear to me how the callback is defined and called. The document does not have adequate information
Thanks,
Mo
void ALV_IntelRealSenseRS2_Initialize()
{
rs2::context context;
auto devices = context.query_devices();
// Get the 1st device
auto RealSenseDevice = devices[0];
std::vector<rs2::sensor> Sensors = RealSenseDevice.query_sensors();
for (rs2::sensor Sensor : Sensors)
{
if (!strncmp("Stereo Module", Sensor.get_info(RS2_CAMERA_INFO_NAME), strlen("Stereo Module")))
{
printf("ALV_IntelRealsenseRS2 : ALV_IntelRealSenseRS2_Initialize : Found the Stereo Module Sensor\n");
_Sensor = Sensor;
break;
}
}
_Sensor.start([](rs2::frame frame) {
auto pixels = frame.get_data(); // pointer to frame data
});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The subject of asynchronous capture is discussed in the link below.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The subject of asynchronous capture is discussed in the link below.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page