You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If faces are not detected, try this solution by @aznxed. The issue is that face are only detected when you take a picture in landscape mode which makes the usability of the app - and the code we learn - very limited, outright broken. This solution rotates the portrait images so that they are usable and face detection works as intended.
Try this in addition to line 73 in BitmapUtils.java, tested in portrait mode on Google Pixel 2
Matrix matrix = new Matrix();
matrix.postRotate(-90);
Bitmap bitmapOrg = BitmapFactory.decodeFile(imagePath);
Bitmap scaledBitmap = Bitmap.createScaledBitmap(bitmapOrg, bitmapOrg.getWidth(), bitmapOrg.getHeight(), true);
Bitmap rotatedBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.getWidth(), scaledBitmap.getHeight(), matrix, true);
return rotatedBitmap;
If faces are not detected, try this solution by @aznxed. The issue is that face are only detected when you take a picture in landscape mode which makes the usability of the app - and the code we learn - very limited, outright broken. This solution rotates the portrait images so that they are usable and face detection works as intended.
Originally posted by @aznxed in #1 (comment)
The text was updated successfully, but these errors were encountered: