Skip to content

This sample code uses Portrait Effect Matte as a mask image to extract a person.

Notifications You must be signed in to change notification settings

kentat01/PortraitEffectsMatteSample

Repository files navigation

PortraitEffectsMatteSample

Platform Language License

This sample code uses Portrait Effects Matte added from iOS 12 as a mask image to extract only people.

Requirement

This app requires a portrait photo. So you need an iPhone that supports dual camera (e.g. iPhone 8 Plus) or a True Depth camera (e.g. IPhone X). After shooting a human in portrait mode, please try this app.

How to use

#1 Open PortraitEffectsMatteSample.xcodeproj, Build, Run.

#2 Select “Select portrait photo” button

#3 Select a portrait photo taken in advance .

#4 The masked photo is displayed at the top of the screen.The selected photo is displayed at the lower left of the screen, and Portrait Effects Matte is displayed at the lower right of the screen.

#5 You can change the background to transparent, white, or black in the UISegmentedControl below the masked image.

#6 Press the Save button at the top left of the screen to save the masked photo in "Photos".

#7 Press the upper right share button to display the share screen.  

About

This sample code uses Portrait Effect Matte as a mask image to extract a person.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages