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
Moyuru Aizawa
May 21, 2019
Programming
2
2.3k
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
66
graphicsLayer
lvla
0
190
BluetoothDevice.getName()に裏切られた話
lvla
0
310
Jetpack Composeで画像クロップ機能を実装する
lvla
0
1.1k
Jetpack Compose drag gesture and pinch gesture
lvla
1
3.6k
Jetpack Compose Layout API
lvla
1
630
BLEを使ったアプリを継続的に開発するために
lvla
0
970
RecyclerView.ItemAnimator
lvla
1
300
RecycledViewPool
lvla
1
190
Other Decks in Programming
See All in Programming
JavaOne 2025: Advancing Java Profiling
jbachorik
1
320
RubyKaigiで手に入れた HHKB Studioのための HIDRawドライバ
iberianpig
0
1.1k
List とは何か? / PHPerKaigi 2025
meihei3
0
590
趣味全開のAITuber開発
kokushin
0
140
なぜselectはselectではないのか
taiyow
2
320
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
510
AI Agents with JavaScript
slobodan
0
190
体得しよう!RSA暗号の原理と解読
laysakura
3
550
CTFのWebにおける⾼難易度問題について
hamayanhamayan
1
1k
私の愛したLaravel 〜レールを超えたその先へ〜
kentaroutakeda
12
3.7k
SideKiqでジョブが二重起動した事象を深堀りしました
t_hatachi
0
270
AI時代のプログラミング教育 / programming education in ai era
kishida
23
21k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
33
6.5k
Designing for humans not robots
tammielis
251
25k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.5k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
What's in a price? How to price your products and services
michaelherold
245
12k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Making Projects Easy
brettharned
116
6.1k
GraphQLの誤解/rethinking-graphql
sonatard
70
10k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.8k
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