我们可以通过两种方式使用人脸检测: 1. 通过 url 2. 通过上传图片。
我需要使用第二个。
我得到了类似 php 的代码
<form action="path_to_facedetect" method="POST" enctype="multipart/form-data"> <input type="file" id="pic" name="pic" /> <input type="text" id="url_object_store" name="url_object_store" /> <input type="submit" value="Send it..." /> </form>
来自链接: http://map.hpl.hp.com/face-detection/api.html
谁能告诉我如何在 iPhone 中传递数据?
我需要通过:
1.url_object_store 2.X-Auth-Token 3.bytes图片数组
最佳答案
创建发布请求并传递数据,如 this 或 this来自 iphone 的链接。
另一种方法我会建议用 base64 字符串对您的图像进行编码,然后将其与来自 iphone 的 post 请求一起发送。从 php webservice 解码相同的字符串以创建图像并将其存储到服务器。
关于php - 我想使用 HpCloud for iphone sdk 的人脸检测 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19653310/