Giter VIP home page Giter VIP logo

mtfacedetectorvideocamera's Introduction

MTFaceDetectorCamera

Support  platform 

一个基于GPUImage封装的简单的子类MTFaceDetectorCamera,增加人脸检测功能

Features

  • GPUImage人脸检测
  • 人脸检测rect根据不同旋转情况计算后的返回

Requirements

- iOS 7.0+
- Xcode 7.3

Usage example

Objective-C

self.videoCamera = [[MTFaceDetectorCamera alloc] init];
[self.videoCamera openFaceDetector];

// 在代理方法中返回人脸数据
- (void)faceDetectorCaptureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection {
	// 数据处理
}

// 每一个人脸框的Rect
CGRect rect = [MTCalculateFaceRect calculateFaceRectWithFaceObject:faceObj 
														parentView:self.filterImageView
														outputImageOrientation:[[UIApplication sharedApplication] statusBarOrientation]                                                           	cameraPosition:self.videoCamera.cameraPosition
														cameraMirror:self.videoCamera.horizontallyMirrorFrontFacingCamera];
										

// 显示人脸框(优化过的)										
[[MTFaceViewManager shareFaceViewManager] showFaceViewAtIndex:index faceCount:metadataObjects.count rect:rect parentView:self.filterImageView];

// 隐藏所有的人脸框
[[MTFaceViewManager shareFaceViewManager] hideAllFaceViewWithParentView:self.filterImageView];

Release History

mtfacedetectorvideocamera's People

Contributors

coderii avatar

Stargazers

 avatar 欧阳荣 avatar  avatar Ivan lee avatar 石玉龙 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.