Я реализовал Firebase ML kit, можете ли вы, ребята, помочь мне, как я могу создать растровое изображение из этой информации и показать его в виде изображения?Пожалуйста, помогите мне, как я могу создать растровое изображение на этом этапе и сохранить его в памяти устройства?Я попробовал этот код, помогите мне пойти глубже.
public void onSuccess(List<FirebaseVisionFace> faces) {
// Task completed successfully
// ...
Log.d("Success: ", "success");
for (FirebaseVisionFace face : faces) {
Rect bounds = face.getBoundingBox();
float rotY = face.getHeadEulerAngleY(); // Head is rotated to the right rotY degrees
float rotZ = face.getHeadEulerAngleZ(); // Head is tilted sideways rotZ degrees
Log.d("rotY: ", ""+rotY);
Log.d("rotZ: ", ""+rotZ);
// If landmark detection was enabled (mouth, ears, eyes, cheeks, and
// nose available):
FirebaseVisionFaceLandmark leftEar = face.getLandmark(FirebaseVisionFaceLandmark.LEFT_EAR);
if (leftEar != null) {
FirebaseVisionPoint leftEarPos = leftEar.getPosition();
}
// If contour detection was enabled:
List<FirebaseVisionPoint> leftEyeContour =
face.getContour(FirebaseVisionFaceContour.LEFT_EYE).getPoints();
List<FirebaseVisionPoint> upperLipBottomContour =
face.getContour(FirebaseVisionFaceContour.UPPER_LIP_BOTTOM).getPoints();
// If classification was enabled:
if (face.getSmilingProbability() != FirebaseVisionFace.UNCOMPUTED_PROBABILITY) {
float smileProb = face.getSmilingProbability();
}
if (face.getRightEyeOpenProbability() != FirebaseVisionFace.UNCOMPUTED_PROBABILITY) {
float rightEyeOpenProb = face.getRightEyeOpenProbability();
}
// If face tracking was enabled:
if (face.getTrackingId() != FirebaseVisionFace.INVALID_ID) {
int id = face.getTrackingId();
}
}
}