整理卡死的问题

This commit is contained in:
xsl
2026-04-21 00:03:27 +08:00
parent 5d8e108306
commit 7ab4274e4f
9 changed files with 31 additions and 42 deletions
@@ -94,12 +94,12 @@ public class FaceActivity extends GameActivity implements FaceLandmarkerHelper.L
{
detectFace(image);
}
else
{
image.close();
}
// else
// {
// image.close();
// }
} finally {
//image.close(); // 确保在这里关闭
image.close(); // 确保在这里关闭
//Log.d("Camera", "Image closed, ready for next frame");
}
}
@@ -192,7 +192,7 @@ class FaceLandmarkerHelper(
Bitmap.Config.ARGB_8888
)
imageProxy.use { bitmapBuffer.copyPixelsFromBuffer(imageProxy.planes[0].buffer) }
imageProxy.close()
//imageProxy.close()
val matrix = Matrix().apply {
// Rotate the frame received from the camera to be in the same direction as it'll be shown