1

我正在为狼疮患者开发 Apple ResearchKit 应用程序。我已经放了一些调查和步行活动的任务。

现在我需要频繁地捕捉皮疹的图像,仅将其保存在应用程序中(而不是在照片应用程序中)并将最新图像与最后拍摄的图像进行比较。

我需要知道我是否可以使用 ResearchKit 来完成上述任务。如何使用ResearchKit打开 iPhone 相机并拍摄图像?我知道图像比较是 ResearchKit 之外的任务。但我的首要任务是在 ResearchKit 中捕获图像。是否可以使用 ResearchKit 或者我必须在 RK 范围之外执行此任务。如果可用,请向我提供任何代码或任何链接。

提前致谢

4

1 回答 1

2

@pratek ResearchKit 有一个图像捕获步骤,可以满足您的要求。您还必须在任务视图控制器中为捕获的图像声明一个输出目录。下面的示例代码。

ORKImageCaptureStep *imageCaptureStep = [[ORKImageCaptureStep alloc] initWithIdentifier:@"ImageCaptureStep"];
imageCaptureStep.title = /*Title for the step*/;

ORKTaskViewController *taskViewController = [[ORKTaskViewController alloc] initWithTask:imageCaptureStep taskRunUUID:nil];
taskViewController.delegate = self;
taskViewController.outputDirectory = /*where to store your image*/;

并且不要忘记为任务视图控制器实现“ORKTaskViewControllerDelegate”。

于 2015-11-17T15:29:55.817 回答