简体   繁体   English

检测旋转的面孔Microsoft认知服务

[英]detect rotated faces microsoft cognitive services

I'm currently using Microsoft Cognitive Services to detect and verify faces. 我目前正在使用Microsoft认知服务来检测和验证面孔。 Ive seen that faces are detected ONLY IF the face is turned in the following direction. 我已经看到,只有当脸部朝以下方向转动时,才可以检测到脸部。

在此处输入图片说明

I currently have an Html page that allow to load an image into a canvas, and a button to make a request to Microsoft api. 我目前有一个HTML页面,该页面允许将图像加载到画布中,还有一个按钮向Microsoft api发出请求。

Now, I have thought a solution but i think that it's not the best for sure. 现在,我想到了一个解决方案,但我认为这并不是最好的解决方案。 My idea was to send image (in the worst case 3 times) until the api returns me the id of the face detected (which means the image is rotated correctly), but it's a little bit complex. 我的想法是发送图像(在最坏的情况下3次),直到api将检测到的面部ID返回给我(这意味着图像已正确旋转)为止,但这有点复杂。

So, my question is, how can I automatically rotate the image in the right direction client side? 因此,我的问题是,如何在正确的方向客户端自动旋转图像?

Sorry for my bad english and thank you in advance for answers. 对不起,我的英语不好,谢谢你的回答。

If the image contains rotation information in exif, the Face API will rotate it automatically. 如果图像在exif中包含旋转信息,则Face API将自动旋转图像。 So do you get any specific error? 那么您会得到任何特定的错误吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM