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
56
graphicsLayer
lvla
0
180
BluetoothDevice.getName()に裏切られた話
lvla
0
300
Jetpack Composeで画像クロップ機能を実装する
lvla
0
1k
Jetpack Compose drag gesture and pinch gesture
lvla
1
3.5k
Jetpack Compose Layout API
lvla
1
620
BLEを使ったアプリを継続的に開発するために
lvla
0
950
RecyclerView.ItemAnimator
lvla
1
290
RecycledViewPool
lvla
1
190
Other Decks in Programming
See All in Programming
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
280
[JAWS DAYS 2025] 最近の DB の競合解決の仕組みが分かった気になってみた
maroon1st
0
140
なぜイベント駆動が必要なのか - CQRS/ESで解く複雑系システムの課題 -
j5ik2o
14
4.7k
コードを読んで理解するko build
bells17
1
110
DevNexus - Create AI Infused Java Apps with LangChain4j
kdubois
0
120
Drawing Heighway’s Dragon- Recursive Function Rewrite- From Imperative Style in Pascal 64 To Functional Style in Scala 3
philipschwarz
PRO
0
100
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
もう僕は OpenAPI を書きたくない
sgash708
6
1.9k
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
250
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
480
DRFを少しずつ オニオンアーキテクチャに寄せていく DjangoCongress JP 2025
nealle
2
280
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.6k
Designing Experiences People Love
moore
140
23k
Embracing the Ebb and Flow
colly
84
4.6k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Testing 201, or: Great Expectations
jmmastey
42
7.2k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Why Our Code Smells
bkeepers
PRO
336
57k
Unsuck your backbone
ammeep
669
57k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
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