我正在尝试通过使用注册回调函数来检索 TANGO_CAMERA_COLOR 图像像素数据
static void onFrameAvailable( void* context, const TangoCameraId id, const TangoImageBuffer* buffer )
{
LOGVI( "\nGOOGLE TANGO FRAME AVAILABLE" );
}
...
if(TangoService_connectOnFrameAvailable( TANGO_CAMERA_COLOR, NULL, onFrameAvailable ) == TANGO_SUCCESS)
{
LOGVI( "\nGOOGLE TANGO ONFRAMEAVAILABLE CONNECTED" );
}
我实际上将我的成功日志作为输出,但从未调用过回调函数。
输出:
01-13 12:04:02.655: I/tango_client_api(187): Tango Service: connect, internal status 0
01-13 12:04:02.655: I/VR(8529): GOOGLE TANGO CONNECTED
01-13 12:04:02.655: I/VR(8529): GOOGLE TANGO EVENT HANDLER CONNECTED
01-13 12:04:02.656: I/tango_client_api(187): Tango Service: getCameraIntrinsics, internal status 0
01-13 12:04:02.656: I/VR(8529): GOOGLE TANGO CAMERA IMAGE WIDTH 1280
01-13 12:04:02.656: I/VR(8529): GOOGLE TANGO CAMERA IMAGE HEIGHT 720
01-13 12:04:02.656: I/VR(8529): GOOGLE TANGO CAMERA IMAGE FOCAL X 1039.630000
01-13 12:04:02.656: I/VR(8529): GOOGLE TANGO CAMERA IMAGE FOCAL Y 1039.900000
01-13 12:04:02.656: I/VR(8529): GOOGLE TANGO CAMERA IMAGE PRINCIPAL X 634.922000
01-13 12:04:02.656: I/VR(8529): GOOGLE TANGO CAMERA IMAGE PRINCIPAL Y 362.981000
01-13 12:04:02.656: I/tango_client_api(187): Tango Service: connectSurface, internal status 0
01-13 12:04:02.657: I/VR(8529): GOOGLE TANGO ONFRAMEAVAILABLE CONNECTED
01-13 12:04:02.694: I/chromium(8529): [INFO:async_pixel_transfer_manager_android.cc(56)] Async pixel transfers not supported
01-13 12:04:02.823: I/Camera3-OutputStream(168): enqueue first Preview frame or first video frame
01-13 12:04:02.825: I/native-camera(187): Dropping VGA with too much latency 92240.015085 > 0.000000 + 2 * 0.033328
01-13 12:04:02.899: I/native-camera(187): VGA Stats: 3 frames, 0 locked_buffer_drops, 0 sensor_hub_drops, 1 ambiguous, 0 feature_tracking_drops
01-13 12:04:02.899: I/native-camera(187): COLOR Stats: 0 frames, 0 locked_buffer_drops, 0 sensor_hub_drops, 0 ambiguous
... what follows are only event notifications like FisheyeUnderExposed, TooFewFeaturesTracked
我正在使用 C-API 版本的笛卡尔。清单中的权限已定义。回调工作需要什么(初始化、连接、..)?