VisionImage image = VisionImage.fromBitmap(dstbmp);
ArrayList<BodySkeletons> mBodySkeletons = new ArrayList<>();
int resultCode = mDetector.detect(image, mBodySkeletons, null);
json:{
"resultCode":0,
"PoseEstimationResult":"[
{\"id\":0,\"skeletons\":[{\"x\":507,\"y\":109},{\"x\":459,\"y\":203},{\"x\":399,\"y\":218},{\"x\":350,\"y\":312},{\"x\":326,\"y\":343},{\"x\":507,\"y\":250},{\"x\":568,\"y\":265},{\"x\":616,\"y\":250},{\"x\":362,\"y\":437},{\"x\":338,\"y\":625},{\"x\":229,\"y\":875},{\"x\":435,\"y\":453},{\"x\":532,\"y\":734},{\"x\":507,\"y\":750}]},
{\"id\":1,\"skeletons\":[{\"x\":580,\"y\":578},{\"x\":616,\"y\":640},{\"x\":592,\"y\":671},{\"x\":544,\"y\":718},{\"x\":0,\"y\":0},{\"x\":653,\"y\":625},{\"x\":713,\"y\":546},{\"x\":0,\"y\":0},{\"x\":737,\"y\":781},{\"x\":713,\"y\":937},{\"x\":0,\"y\":0},{\"x\":749,\"y\":765},{\"x\":713,\"y\":937},{\"x\":0,\"y\":0}]},
{\"id\":2,\"skeletons\":[{\"x\":60,\"y\":171},{\"x\":60,\"y\":218},{\"x\":0,\"y\":0},{\"x\":0,\"y\":0},{\"x\":0,\"y\":0},{\"x\":169,\"y\":203},{\"x\":205,\"y\":187},{\"x\":229,\"y\":156},{\"x\":72,\"y\":500},{\"x\":60,\"y\":703},{\"x\":12,\"y\":890},{\"x\":157,\"y\":500},{\"x\":217,\"y\":671},{\"x\":145,\"y\":875}]}]"}
可以的,在detect()方法中会默认启动引擎,如果引擎已经启动则不会再次启动,开发者可以放心使用。
当前,人体关键点识别API只支持搭载麒麟990芯片的手机。
人体关键点识别API为端侧能力,在无网络连接的环境下仍可正常使用。