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
80
graphicsLayer
lvla
0
200
BluetoothDevice.getName()に裏切られた話
lvla
0
330
Jetpack Composeで画像クロップ機能を実装する
lvla
0
1.1k
Jetpack Compose drag gesture and pinch gesture
lvla
1
3.7k
Jetpack Compose Layout API
lvla
1
640
BLEを使ったアプリを継続的に開発するために
lvla
0
990
RecyclerView.ItemAnimator
lvla
1
310
RecycledViewPool
lvla
1
210
Other Decks in Programming
See All in Programming
ts-morph実践:型を利用するcodemodのテクニック
ypresto
1
530
ワイがおすすめする新潟の食 / 20250530phpconf-niigata-eve
kasacchiful
0
180
TypeScript Language Service Plugin で CSS Modules の開発体験を改善する
mizdra
PRO
3
2.4k
AI時代のリアーキテクチャ戦略 / Re-architecture Strategy in the AI Era
dachi023
0
190
がんばりすぎないコーディングルール運用術
tsukakei
1
180
人には人それぞれのサービス層がある
shimabox
3
460
バランスを見極めよう!実装の意味を明示するための型定義 TSKaigi 2025 Day2 (5/24)
whatasoda
2
770
UPDATEがシステムを複雑にする? イミュータブルデータモデルのすすめ
shimomura
0
170
Reactive Thinking with Signals, Resource API, and httpResource @Devm.io Angular 20 Launch Party
manfredsteyer
PRO
0
130
TypeScript製IaCツールのAWS CDKが様々な言語で実装できる理由 ~他言語変換の仕組み~ / cdk-language-transformation
gotok365
7
380
技術的負債と戦略的に戦わざるを得ない場合のオブザーバビリティ活用術 / Leveraging Observability When Strategically Dealing with Technical Debt
yoshiyoshifujii
0
160
Agent Rules as Domain Parser
yodakeisuke
1
330
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
269
20k
Automating Front-end Workflow
addyosmani
1370
200k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Agile that works and the tools we love
rasmusluckow
329
21k
Side Projects
sachag
454
42k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Language of Interfaces
destraynor
158
25k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Rails Girls Zürich Keynote
gr2m
94
13k
How GitHub (no longer) Works
holman
314
140k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.6k
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