Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Make faces big by Vision and CoreGraphics
Search
naru-jpn
March 02, 2018
Technology
540
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Make faces big by Vision and CoreGraphics
“Can you make faces big?”
naru-jpn
March 02, 2018
More Decks by naru-jpn
See All by naru-jpn
配信アプリのためのリアルタイムプッシュ通知ぼかしの夢
narujpn
3
1.2k
PiPを応用した配信コメントバー機能の開発秘話と技術の詳解 / pip_streaming_comment_bar
narujpn
3
5k
Updating an App to Use Swift Concurrency 解説
narujpn
2
410
PiP で実現するミラティブの配信コメントバー / pip-streaming-comment-bar
narujpn
0
1.4k
App Extension のスタックトレース情報からクラッシュを解析/集計する / Analyzing app extension's stack trace
narujpn
3
1.9k
ミラティブとWebRTC - WebRTC framework の中身を覗いてみよう / WebRTC framework AudioUnit Processing
narujpn
1
2.3k
CoreML3のオンデバイストレーニングでつくる母音推定
narujpn
0
500
AltConfと周辺の歩き方
narujpn
0
2.1k
エンジニア経験を活かしたスクラムマスターとして 開発チームとプロダクトを成長させる
narujpn
1
450
Other Decks in Technology
See All in Technology
20260930_Gemma4_Hands-on
tsho
0
230
[2026 Oracle Technical Deep Dive] OCI AI Resilience -OCIのセキュリティ対策機能をきちんと使いこなす- (2026年9月17日開催)
oracle4engineer
PRO
0
130
Deep Data Security 機能解説
oracle4engineer
PRO
2
710
Futexes the good, the bad, the ugly
ennael
PRO
0
130
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
370
Google Cloud Next Tokyo 26登壇時のスクリプト
recruitengineers
PRO
0
200
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
480
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
210
生成AIで高い生産性を求められて、 悩み、乗り越えた話
mot_techtalk
2
130
形式手法を使って仕様をコーディングしよう
mikanichinose
0
180
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
490
Incremental HTTP
kazuho
5
2.1k
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
910
Paper Plane (Part 1)
katiecoart
PRO
2
11k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
What's in a price? How to price your products and services
michaelherold
247
13k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Ethics towards AI in product and experience design
skipperchong
2
410
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
450
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Transcript
Make faces big by Vision and CoreGraphics VisionͱCoreGraphicsͰإΛσΧ͘͢Δ Naruki Chigira,
Timers inc. @naruchigi Try! Swift 2018
“Can you make faces big?”
“In about a week.”
None
Core Image want actual
Core ML too much learning cost (also for me) …
Vision
Vision ɾFace Detection and Recognition ɾBarcode Detection ɾText Detection ɾHorizon
Detection ɾObject Detection and Tracking
VNFaceLandmarkRegion2D Class 2D geometry information for a specific facial feature.
VNFaceObservation Class Face or facial-feature information detected by an image analysis request.
Face Couture [CGPoint]
// 1. Create VNDetectFaceLandmarksRequest let request = VNDetectFaceLandmarksRequest() { (request,
error) in guard let results = request.results else { return } let faceObservations = results.flatMap({ $0 as? VNFaceObservation }) // 3. Handle results // … } // 2. Create VNImageRequestHandler and perform let handler = VNImageRequestHandler(cgImage: cgImage, options: [:]) try! handler.perform([request]) How to get VNFaceLandmarkRegion2D
Face Couture
None
None
None
None
None
Core Graphics
CGPoint Structure A structure that contains a point in a
two-dimensional coordinate system.
CGAffineTransform Structure An affine transformation matrix for use in drawing
2D graphics.
CGPoint Structure Instance Method func applying(_ t: CGAffineTransform) -> CGPoint
O
O 1. translate
O 1. translate 2. rotate
O 1. translate 2. rotate 3. reverse + joint
O 1. translate 2. rotate 3. reverse + joint 4.
rotate-1
O 1. translate 2. rotate 3. reverse + joint 4.
rotate-1 5. translate-1
O A A-1 } } 1. translate 2. rotate 3.
reverse + joint 4. rotate-1 5. translate-1
Modify [CGPoint] in Swift // 1. Create CGAffineTransform A let
A = CGAffineTransform(rotationAngle: -theta).translatedBy(x: x, y: y) // 2. Apply A let transformed = points.map { $0.applying(A) } // 3. Reverse & Joint let oval = transformed + transformed.map { CGPoint(x: -$0.x, y: -$0.y) } // 4. Apply A-1 let result = oval.map { $0.applying(A.inverted()) }
Result
None
None
Summary Get facial features from Vision (iOS 11.0~) Process data
using CoreGraphics (iOS 2.0~) +
Thank you!