Skip to content

Guikunzhi/BeautifyFaceDemo

Repository files navigation

BeautifyFaceDemo

中文介绍

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.

Flow Chart

alt text

Sample Code

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];

ScreenShot

alt textalt text

Reference

https://www.csie.ntu.edu.tw/~fuh/personal/FaceBeautificationandColorEnhancement.A2-1-0040.pdf

https://m.blog.csdn.net/article/details?id=50496969

About

A simple demo of realtime face beautification based on GPUImage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published