ARDetector 0.1.2

ARDetector 0.1.2

测试已测试
Lang语言 Obj-CObjective C
许可 MIT
发布最新发布2015年9月

alexruperez 维护。




Dependency Status Analytics

概述

CIDetector、AVCaptureVideoDataOutput 和 AVCaptureMetadataOutput 类别。包括面部、矩形、二维码,以及未来的文本 CIDetector 和 AVCaptureOutput 处理的块。

安装

ARDetector 可通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 即可。

    pod "ARDetector"

要运行示例项目,克隆仓库,然后首先在 Example 目录中运行 pod install

示例

    AVCaptureSession *captureSession = AVCaptureSession.new;

    AVCaptureVideoDataOutput *videoOutput = AVCaptureVideoDataOutput.new;

    [videoOutput setSampleBufferBlock:^(AVCaptureOutput *captureOutput, CMSampleBufferRef sampleBuffer, BOOL dropped, AVCaptureConnection *connection) {
        // DO SOMETHING
    }];

    if (videoOutput && [captureSession canAddOutput:videoOutput])
    {
        [captureSession addOutput:videoOutput];
    }

    AVCaptureMetadataOutput *metadataOutput = AVCaptureMetadataOutput.new;

    [metadataOutput setMetadataObjectsBlock:^(AVCaptureOutput *captureOutput, NSArray *metadataObjects, AVCaptureConnection *connection) {
        // DO SOMETHING
    }];

    if (metadataOutput && [captureSession canAddOutput:metadataOutput])
    {
        [captureSession addOutput:metadataOutput];
    }

    [metadataOutput detectAllAvailableMetadataObjectTypes];

    CIDetector *detector = [CIDetector faceDetectorWithAccuracy:ARDetectorAccuracyHigh tracking:YES minFeatureSize:nil];

其他

  • 欢迎贡献力量。
  • 感谢致谢(让我们一起传播这个信息!),但不是强制性的。

使用它?喜欢/讨厌它?

通过 @alexruperez 给作者发推文,查看 alexruperez 的博客:http://alexruperez.com

许可

ARDetector 可在 MIT 许可下使用。有关更多信息,请参阅 LICENSE 文件。