Skip to content

Instantly share code, notes, and snippets.

@yogox
Last active October 6, 2020 06:31
Show Gist options
  • Save yogox/8f8a715e1cff1bdae7422d997a27b52a to your computer and use it in GitHub Desktop.
Save yogox/8f8a715e1cff1bdae7422d997a27b52a to your computer and use it in GitHub Desktop.
func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
// skin, hair, teethのsemanticSegmentationMatteを取得
if let skinMatte = photo.semanticSegmentationMatte(for: .skin)
, let hairMatte = photo.semanticSegmentationMatte(for: .hair)
, let teethMatte = photo.semanticSegmentationMatte(for: .teeth)
{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment