我有一个Java应用程序需要从ARCore获取相机图像以进行自定义渲染。最近,ARCore(v1.1.0)中增加了两个新的API,它们应该支持这一点。好吧,除了这两个电话,其他一切都适合我。两个调用都失败并出现相同的错误(SIGINIT): SIGINIT
我在Logcat中有这条消息:
04-18 14:52:32.007 32623-32623 / A / Ion:[java / com / google / vr / dynamite / client / native / dynamite_client.cc:74]检查失败:表达式=&# 39;" env"'
04-18 14:52:32.007 32623-32623 / A / Ion:倾销堆:
相关代码是:
try
{
// Obtain the current frame from session.
mSession.setCameraTextureName( mTextureId );
Frame frame = mSession.update();
TrackingState trackingState = frame.getCamera().getTrackingState();
if ( trackingState == TrackingState.TRACKING )
{
// Compute lighting, this is also crashing
//final float[] colorCorrectionRgba = new float[4];
//frame.getLightEstimate().getColorCorrection( colorCorrectionRgba, 0 );
//getPixelIntensity works fine
float lightIntensity = frame.getLightEstimate().getPixelIntensity();
Log.d( TAG, " light intensity is " + lightIntensity );
//This is also crashing
android.media.Image image = frame.acquireCameraImage();
//do something useful with the image
image.close();
app level build.gradle在依赖项下有以下条目:
实施' com.google.ar:核心:1.1.0'
我尝试启用和禁用了proguard。
有人能发现我做错了吗?
PS:如果不清楚,拨打失败的电话为frame.acquireCameraImage()
和frame.getLightEstimate().getColorCorrection()
。