I believe this what you are looking for I have pointed out with an arrow.
//This function extract data from the image and return FaceLandmarks Object
private ArrayList<FaceLandmarks> faceLandmarkDetection(Bitmap bitmap) {
ArrayList<Point> singleFaceLandmarks = new ArrayList<>();
ArrayList<FaceLandmarks> multipleFacesLandmarks = new ArrayList<>();
//Calling FaceDet class loading landmarks file.
FaceDet faceDet = new FaceDet(mTargetPath);
//This array contain multiple faces landmarks
//extracting the results from the image
Bitmap rotateBitmap = rotateImage(bitmap);
List<VisionDetRet> results = faceDet.detect(rotateBitmap);
//Running on the image faces extracting information.
for (VisionDetRet ret : results) {
int rectLeft = ret.getLeft();
int rectTop = ret.getTop();
int rectRight = ret.getRight();
int rectBottom = ret.getBottom();
int imageWidth = rotateBitmap.getWidth();
int imageHeight = rotateBitmap.getHeight();
//We do image correction, if the face is out of the entire image frame
if(rectRight > imageWidth){
rectRight = imageWidth;
}
//We do image correction, if the face is out of the entire image frame
if(rectBottom > imageHeight){
rectBottom = imageHeight;
}
==> int faceWidth = rectRight - rectLeft;
==> int faceHeight = rectBottom - rectTop;
==> Bitmap croppedBmp = Bitmap.createBitmap(rotateBitmap, rectLeft, rectTop, faceWidth, faceHeight);
List<VisionDetRet> improvedResults = faceDet.detect(croppedBmp);
//This array contain single face landmarks: Get 68 landmark points
for (VisionDetRet improvedRet : improvedResults) {
singleFaceLandmarks = improvedRet.getFaceLandmarks();
}
multipleFacesLandmarks.add(new FaceLandmarks(singleFaceLandmarks));
}
return multipleFacesLandmarks;
}