从图像裁剪脸部

时间:2019-07-06 16:23:46

标签: android xamarin google-vision

因此,我一直在尝试从Xamarin.Android中拍摄的图像中裁剪出面部。我正在使用Google Vision来检测人脸及其坐标。使用以下代码,可以正确绘制面部周围的画布,但无法正确裁剪图像。

   Bitmap croppedBitmap = Bitmap.CreateBitmap(rotatedBmp, x,y,w,h);

为正确裁剪图像,x,y,w,h的值应该是多少?

现在我已经使用x = face.Position()。X,y = face.Position()。Y,w = face.Width,h = face.Height

0 个答案:

没有答案