SlideShare a Scribd company logo
iOS 9 の新機能
Core Image 編
堤 修一 @shu223
2015.6.19 WWDC After Party
• iOS専業フリーランス
• ブログ『Over&Out その後』
• 著書
- 『iOS×BLE Core Bluetoothプログラミング』
- 『iOSアプリ開発 達人のレシピ100』
堤 修一
お手伝いしたプロダクト(BLE関連)
Music for the Deaf
iOS 9 / watchOS 2 関連の
これまでのアウトプット
おさらい
API Diffs から見る iOS 9 の新機能
• 基調講演やニュース記事を見
るだけではわからない、iOS 9
の細かい新機能を「API Diffs」
「What’s new」から抜粋
• http://d.hatena.ne.jp/
shu223/20150609/1433813938
watchOS-2-Sampler
• watchOS 2 の新機能のサンプルコード集
- Accelerometer
- Gyroscope
- Pedometer
- Heart Rate
- Table Animations
- Animated Properties
- Audio Rec & Play
- Picker Styles
- Taptic Engine
- Alert
- Animation with Digital Crown
- Interactive Messaging
- Open System URL
- Audio File Player
• GitHub で公開中
- github.com/shu223/watchOS-2-Sampler
• 紹介記事
- d.hatena.ne.jp/shu223/20150614/1434313771
watchOS 2 新機能の細かい話5つ
• watchOS-2-Sampler 実装にあたって気付いた細かい
諸々について
- 2つのアセットカタログの 使い分け
- メディアデータの 保存場所
- WKAudioFilePlayer
- ウォッチ側 Bluetooth の (直接)利用
- Watch Connectivity のメッセージ送信可否の条件
• 『potatotips #18』での発表
• slideshare.net/t26v0748/uiux-watchos-2-3
• d.hatena.ne.jp/shu223/20150616/1434454680
UI/UX に影響の大きい watchOS 2 の新機能 3つ
• watchOS 2 の数ある新機能の中で、
UI/UX に影響の大きそうな機能を3
つ抜粋して紹介
• 『UI Crunch #5』というデザイナー
さん、ディレクターさんも来る勉強
会での発表
- (なのでコードは出てきません)
• http://www.slideshare.net/t26v0748/
uiux-watchos-2-3
今日の発表内容:
Core Image の新機能
※Appleの公開ドキュメントの範囲で発表します
1. CIDetector
iOS 9 の新機能 Core Image 編
iOS 9 の新機能 Core Image 編
CIDetector で文字認識(OCR)
が可能になった!?
CIDetector で文字認識(OCR)
が可能になった!?
→ NO!
CIFeature
CIFeature
• CIDetector による処理結果が格納されるクラス
CIFeature
• CIDetector による処理結果が格納されるクラス
• 例)iOS 8 で追加された CIFeatureTypeQRCode による
処理結果、CIQRCodeFeature の場合
CIFeature
• CIDetector による処理結果が格納されるクラス
• 例)iOS 8 で追加された CIFeatureTypeQRCode による
処理結果、CIQRCodeFeature の場合
CIFeature
• CIDetector による処理結果が格納されるクラス
• 例)iOS 8 で追加された CIFeatureTypeQRCode による
処理結果、CIQRCodeFeature の場合
CIFeature
• CIDetector による処理結果が格納されるクラス
• 例)iOS 8 で追加された CIFeatureTypeQRCode による
処理結果、CIQRCodeFeature の場合
ここに読み取ったメッセージの文字列が
入ってくる
CITextFeature
• CIFeatureTypeText による処理結果が格納される
CITextFeature
• CIFeatureTypeText による処理結果が格納される
文字列の認識結果を格納するプロパティがない!
CITextFeature
• CIFeatureTypeText による処理結果が格納される
文字列の認識結果を格納するプロパティがない!
→ CIDetectorTypeText は、文字の「内容」を認識
するのではなく、文字の「領域」を検出する
実装
• Core Image では左下が原点となることに注意
文字検出結果
• シミュレータでは動作不可/実
機ではOK
検出結果画像
(会場のみ)
文字検出結果
• シミュレータでは動作不可/実
機ではOK
• 元画像と、パースのかかった写
真では結果に大きく差が出た
検出結果画像
(会場のみ)
2. CIFilter
新フィルタの抽出方法
新フィルタの抽出方法
• Core Image Filter Reference は、すぐには更新されない
新フィルタの抽出方法
• Core Image Filter Reference は、すぐには更新されない
• なので(毎年)以下の方法で新フィルタを抽出しています
新フィルタの抽出方法
• Core Image Filter Reference は、すぐには更新されない
• なので(毎年)以下の方法���新フィルタを抽出しています
1. BuiltInカテゴリに属するフィルタ名を、新 iOS バージョン(iOS 9)、
旧 iOS バージョン(iOS 8)両方で出力
新フィルタの抽出方法
• Core Image Filter Reference は、すぐには更新されない
• なので(毎年)以下の方法で新フィルタを抽出しています
1. BuiltInカテゴリに属するフィルタ名を、新 iOS バージョン(iOS 9)、
旧 iOS バージョン(iOS 8)両方で出力
新フィルタの抽出方法
• Core Image Filter Reference は、すぐには更新されない
• なので(毎年)以下の方法で新フィルタを抽出しています
1. BuiltInカテゴリに属するフィルタ名を、新 iOS バージョン(iOS 9)、
旧 iOS バージョン(iOS 8)両方で出力
2. diff コマンドで差分を抽出
新フィルタの抽出方法
• Core Image Filter Reference は、すぐには更新されない
• なので(毎年)以下の方法で新フィルタを抽出しています
1. BuiltInカテゴリに属するフィルタ名を、新 iOS バージョン(iOS 9)、
旧 iOS バージョン(iOS 8)両方で出力
2. diff コマンドで差分を抽出
(新フォントも同様の方法で洗い出しています)
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
48
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
94
48
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
115
94
48
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
127
115
94
48
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
127
115
94
48
最近伸びが鈍化していた
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
170
127
115
94
48
最近伸びが鈍化していた
フィルタ数の変遷
0
45
90
135
180
iOS 5 iOS 6 iOS 7 iOS 8 iOS 9
170
127
115
94
48
最近伸びが鈍化していた
ひさしぶりの大幅増!!
Demo
• 会場のみ
• iOS 9 Sampler に追加予定
- 秋の正式リリース時に公開予定
まとめ
Core Image の新機能
• CIDetectorTypeText, CITextFeature
- いわゆる文字認識ではなく、文字領域検出
• CIFilter の新フィルタ
- ひさしぶりの大量追加
watchOS-2-Sampler
GitHub: shu223/watchOS-2-Sampler
Blog: watchOS 2 の新機能のサンプルコード集『watchOS-2-Sampler』
watchOS 2 新機能のサンプルコード集
- Accelerometer
- Gyroscope
- Pedometer
- Heart Rate
- Table Animations
- Animated Properties
- Audio Rec & Play
- Picker Styles
- Taptic Engine
- Alert
- Animation with Digital Crown
- Interactive Messaging
- Open System URL
- Audio File Player

More Related Content

iOS 9 の新機能 Core Image 編