Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CameraX
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Moyuru Aizawa
May 21, 2019
Programming
2
2.5k
CameraX
CameraX
Moyuru Aizawa
May 21, 2019
Tweet
Share
More Decks by Moyuru Aizawa
See All by Moyuru Aizawa
BLUETOOTH_SCAN and iBeacon
lvla
1
140
graphicsLayer
lvla
0
260
BluetoothDevice.getName()に裏切られた話
lvla
0
390
Jetpack Composeで画像クロップ機能を実装する
lvla
0
1.2k
Jetpack Compose drag gesture and pinch gesture
lvla
1
4.2k
Jetpack Compose Layout API
lvla
1
700
BLEを使ったアプリを継続的に開発するために
lvla
0
1.1k
RecyclerView.ItemAnimator
lvla
1
350
RecycledViewPool
lvla
1
260
Other Decks in Programming
See All in Programming
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
550
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
500
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
320
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
340
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
980
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
170
TipKitTips
ktcryomm
0
160
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
330
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
170
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
210
文字コードの話
qnighy
44
17k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
0
170
Featured
See All Featured
Claude Code のすすめ
schroneko
67
220k
Optimizing for Happiness
mojombo
378
71k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
The Curse of the Amulet
leimatthew05
1
9.7k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
120
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
820
Measuring & Analyzing Core Web Vitals
bluesmoon
9
770
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Code Reviewing Like a Champion
maltzj
528
40k
GitHub's CSS Performance
jonrohan
1032
470k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
61
52k
Transcript
CameraX
MoyuruAizawa Moyuru Aizawa A Software House Pairs Div. Eureka Inc.
FRESH LIVE Div CyberAgent Inc. CATS Div. CyberAgent Inc. https://moyuru.io https://cinematic.fm
CameraX uses Camera2 API
API 21+
Consistent across devices
‣Automated CameraX test lab ‣Google tests hundreds of devices across
all OS layers. ‣Tests run 24 hours a day, seven days a week.
‣This test suite is open sourced. ‣You can benchmark …
‣Photo capture latency ‣Startup/shutdown latency ‣…
Easy to use
‣Provide a use case based API ‣Displays up on screen
‣Gives high quality frames to analyze ‣Takes a picture or a video ‣Lifecycle aware
‣Reduced device specific testing ‣75% reduction in lines of code
‣Easier to read code ‣Smaller apk size In case of Camera360 https://play.google.com/store/apps/details?id=vStudio.Android.Camera360
val previewConfig = PreviewConfig.Builder().build() val preview = Preview(previewConfig) preview.setOnPreviewOutputUpdateListener {
output -> textureView.surfaceTexture = output.surfaceTexture } CameraX.bindToLifecycle(this as LifecycleOwner, preview)
val imageAnalysisConfig = ImageAnalysisConfig.Builder() .setTargetResolution(Size(1280, 720)) .build val imageAnalysis =
ImageAnalysis(imageAnalysisConfig) imageAnalysis.setAnalyzer { image, rotationDegrees -> // analyze } CameraX.bindToLifecycle(this as LifecycleOwner, imageAnalysis, preview)
val imageCaptureConfig = ImageCaptureConfig.Builder() .setTargetRotation(windowManager.defaultDisplay.rotation) .build() val imageCapture = ImageCapture(imageCaptureConfig)
CameraX.bindToLifecycle(this as LifecycleOwner, imageCapture, imageAnalysis, preview)
val file = File(...) imageCapture.takePicture(file, object: ImageCapture.OnImageSavedListener { override fun
onError( error: ImageCapture.UseCaseError, message: String, e: Throwable?) { } override fun onImageSaved(file: File) { } } )
CameraX Extensions
Portrait
Portrait Night
Portrait Night HDR
Portrait Night HDR Beauty
None
Thank you https://www.youtube.com/watch?v=kuv8uK-5CLY