Guikunzhi / BeautifyFaceDemo
- суббота, 7 мая 2016 г. в 03:12:32
Objective-C
None
It's a simple demo of realtime face beautification based on GPUImage
GPUImageBeautifyFilter is my custom beauty filter which can be used to beautify live video or static images.
You can easily beautify a live video using the following code:
GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack];
videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
GPUImageView *filterView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, viewWidth, viewHeight)];
GPUImageBeautifyFilter *beautifyFilter = [[GPUImageBeautifyFilter alloc] init];
[videoCamera addTarget:beautifyFilter];
[beautifyFilter addTarget:filterView];
[videoCamera startCameraCapture];
http://www.csie.ntu.edu.tw/~fuh/personal/FaceBeautificationandColorEnhancement.A2-1-0040.pdf