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.5k
2
Share
CameraX
CameraX
Moyuru Aizawa
May 21, 2019
More Decks by Moyuru Aizawa
See All by Moyuru Aizawa
BLUETOOTH_SCAN and iBeacon
lvla
1
150
graphicsLayer
lvla
0
280
BluetoothDevice.getName()に裏切られた話
lvla
0
410
Jetpack Composeで画像クロップ機能を実装する
lvla
0
1.3k
Jetpack Compose drag gesture and pinch gesture
lvla
1
4.3k
Jetpack Compose Layout API
lvla
1
710
BLEを使ったアプリを継続的に開発するために
lvla
0
1.1k
RecyclerView.ItemAnimator
lvla
1
370
RecycledViewPool
lvla
1
280
Other Decks in Programming
See All in Programming
cloudnative conference 2026 flyle
azihsoyn
0
180
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
520
継続的な負荷検証を目指して
pyama86
3
1.2k
SkillsをS3 Filesに置く時のあれこれ
watany
3
1.6k
My daily life on Ruby
a_matsuda
3
390
Back to the roots of date
jinroq
0
850
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
1
190
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
460
🦞OpenClaw works with AWS
licux
1
360
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
Import assertionsが消えた日~ECMAScriptの仕様はどう決まり、なぜ覆るのか~
bicstone
2
180
〜バイブコーディングを超えて〜 チームで実験し続けたAI駆動開発
tigertora7571
0
210
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
Paper Plane (Part 1)
katiecoart
PRO
0
7.6k
Ethics towards AI in product and experience design
skipperchong
2
270
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3k
WCS-LA-2024
lcolladotor
0
590
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Bash Introduction
62gerente
615
210k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
GitHub's CSS Performance
jonrohan
1033
470k
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