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.1k
CameraX
CameraX
Moyuru Aizawa
May 21, 2019
Tweet
Share
More Decks by Moyuru Aizawa
See All by Moyuru Aizawa
graphicsLayer
lvla
0
110
BluetoothDevice.getName()に裏切られた話
lvla
0
140
Jetpack Composeで画像クロップ機能を実装する
lvla
0
750
Jetpack Compose drag gesture and pinch gesture
lvla
1
2.2k
Jetpack Compose Layout API
lvla
1
540
BLEを使ったアプリを継続的に開発するために
lvla
0
810
RecyclerView.ItemAnimator
lvla
1
250
RecycledViewPool
lvla
1
120
Hack RecyclerView.ItemDecoration
lvla
5
540
Other Decks in Programming
See All in Programming
Snowflakeで眠ったデータを起こそう!
estie
0
120
Apache Hive 4 on Treasure Data
ryukobayashi
0
250
使ってみよう Azure AI Document Intelligence
kosmosebi
2
300
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.3k
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
490
VSCodeでのDatabricks開発もお勧めしたい/I would also recommend Databricks development with VSCode.
kazumain
0
250
エンターテイメント業界で利用されるAWS
demuyan
0
210
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
240
Code Reviews
bkuhlmann
4
890
#phpcon_odawara オープン・クローズドなテストフィクスチャを求めて / open closed test fixtures
77web
3
230
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
SIMD Parallel Programming with the Vector API
josepaumard
0
170
Featured
See All Featured
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
The Invisible Customer
myddelton
114
12k
Git: the NoSQL Database
bkeepers
PRO
422
63k
The Invisible Side of Design
smashingmag
294
49k
Building Adaptive Systems
keathley
31
1.9k
Facilitating Awesome Meetings
lara
42
5.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
659
120k
Thoughts on Productivity
jonyablonski
58
3.8k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Designing for Performance
lara
601
67k
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