如何从Face API获取原始图像的方向? [英] How can I get original image's orientation from Face API?

查看:64
本文介绍了如何从Face API获取原始图像的方向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://api.projectoxford.ai/face/v1.0/detect

返回json数据

"faceRectangle": { "width": 78, "height": 78, "left": 394, "top": 54 },

此位置数据是正确方向的数据。

原始照片的面部位置与 faceRectangle的位置。

There is a difference between the original photo's face location and faceRectangle's location.

然后,我想显示正方形而不是正确的位置。

我需要照片旋转,但我没有方向信息。

I need photo rotation but I don't have orientation information.

如何从Face API获取原始照片的方向?

这张照片是原始照片和Face api的
faceRectangle数据。

this photo is original photo and Face api's faceRectangle data.

这张照片是旋转的照片和面部api的  < span style ="font-family:Menlo,Monaco,Consolas,'Courier New',monospace;字体大小:14.76px;行高:22.14px; white-space:pre"> faceRectangle data。

this photo is rotated photo and Face api's faceRectangle data.

但是, 

为了旋转屏幕,我需要原创图片的方向信息。

In order to rotate the screen, I need original picture's orientation information.

如何获得
original Face API的照片方向?

推荐答案

很抱歉,我们无法从中获取图像方向Face API。

Sorry that we cannot get the image orientation from Face API.

在上面的情况中,原始图像数据的方向是正确的,但是(图像的)方向标记是错误设置的.API只是使用右边的原始数据。

In the case above, the orientation of the original image data is right, but the orientation flag (of the image) is wrongly set. The API just uses the right original data.

要获得照片的方向,请尝试其他图像处理库。谢谢!

To get the photo's orientation, please try other image processing libraries. Thanks!


这篇关于如何从Face API获取原始图像的方向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆