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
39
graphicsLayer
lvla
0
170
BluetoothDevice.getName()に裏切られた話
lvla
0
260
Jetpack Composeで画像クロップ機能を実装する
lvla
0
970
Jetpack Compose drag gesture and pinch gesture
lvla
1
3.3k
Jetpack Compose Layout API
lvla
1
610
BLEを使ったアプリを継続的に開発するために
lvla
0
920
RecyclerView.ItemAnimator
lvla
1
290
RecycledViewPool
lvla
1
170
Other Decks in Programming
See All in Programming
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
260
Recoilを剥がしている話
kirik
5
6.7k
php-conference-japan-2024
tasuku43
0
270
MCP with Cloudflare Workers
yusukebe
2
220
Haze - Real time background blurring
chrisbanes
1
510
StarlingMonkeyを触ってみた話 - 2024冬
syumai
3
270
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
900
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
5
1.2k
선언형 UI에서의 상태관리
l2hyunwoo
0
160
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
210
42 best practices for Symfony, a decade later
tucksaun
1
180
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
Code Review Best Practice
trishagee
65
17k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Writing Fast Ruby
sferik
628
61k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
450
BBQ
matthewcrist
85
9.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
RailsConf 2023
tenderlove
29
940
Agile that works and the tools we love
rasmusluckow
328
21k
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