如何访问Apple的“照片"应用中使用的“人物"相册 [英] How to access People album used in Apple's Photos app

查看:132
本文介绍了如何访问Apple的“照片"应用中使用的“人物"相册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apple的Photo应用程序具有面部识别功能.我想知道是否存在API来访问已由应用分类的照片的关联数据.

Apple's Photo app has facial recognition capabilities. I would like to know if an API exists to access the associated data for photos which have been classified by the app.

(用API标记,不确定哪个标记.)

(tagged with API, not sure which tags.)

谢谢!

推荐答案

Apple发布了用于访问Apple Photos的SDK,名为

Apple released an SDK for accessing Apple Photos called Photo Kit. In the documentation, you will find API access to the photos application and photos cloud. However, if you are looking for an HTTP API I do not believe one has been announced publicly.

如果您只需要访问Photos MacOS应用程序上的数据,建议您浏览照片库数据库目录中的SQLite photos.db.

If you only need access to is data on Photos MacOS app I would recommend digging through the SQLite photos.db located in the photos library database directory.

/Users/[yourUserName]/Pictures/Photos Library.photoslibrary/database/photos.db

我这个周末正在研究一个项目,该项目需要类似的人脸数据,并将记录我的进度.这是一个示例SQLite查询,可用于获取所有面孔,照片和对应的人:

I am working on a project this weekend that requires similar face data and will document my progress. Here is a sample SQLite query you can use to get all faces, photos, and corresponding person:

SELECT *, RKFace.modelId AS fId
FROM RKFace
JOIN RKMaster ON RKMaster.modelId = RKFace.imageModelId
LEFT JOIN RKFaceGroup ON RKFaceGroup.modelId = RKFace.faceGroupId
LEFT JOIN RKFaceCrop ON RKFaceCrop.faceId = RKFace.imageModelId
LEFT JOIN RKFacePrint ON RKFacePrint.faceId = RKFace.imageModelId
LEFT JOIN RKPerson ON RKPerson.modelId = RKFace.personId;

我希望这会有所帮助. :-)

I hope this helps. :-)

这篇关于如何访问Apple的“照片"应用中使用的“人物"相册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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