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
After I/O Istanbul Jetpack CameraX
Search
Hadi Tok
June 29, 2019
Technology
76
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
After I/O Istanbul Jetpack CameraX
Hadi Tok
June 29, 2019
More Decks by Hadi Tok
See All by Hadi Tok
Android Async Programming
oshamahue
0
120
Introduction to Functional Programing in Kotlin and Arrow
oshamahue
0
200
Kotlin for Java developers.
oshamahue
0
120
Kotlin Java interop and Kotlin Migration
oshamahue
0
76
Finding the View
oshamahue
0
140
Mocking Kotlin with MockK
oshamahue
0
140
After I/O Kabul Android summary
oshamahue
0
93
Mocking Kotlin with MockK
oshamahue
0
220
RxJava vs Coroutines
oshamahue
1
660
Other Decks in Technology
See All in Technology
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
cccccc
moznion
0
1.8k
攻撃者がいなくてもAIエージェントはインシデントを起こす
nomizone
0
200
ローカルLLMとLINE Botの組み合わせ その3 / LINE DC Generative AI Meetup #8
you
PRO
0
110
Empower GenAI with Agile - あなたのアジャイルが生成AIのバフになる仕組み
hageyahhoo
0
130
完全自律ロボットを作りたくて、先に開発を自律させた話(ROS Japan UG #63 LT)
rryz09
0
370
環境凍結という Toil を倒す -セルフサービス型 Ephemeral テスト環境の 設計と実践
shirouz
1
690
どうして今サーバーサイドKotlinを選択したのか
nealle
0
210
Why is RC4 still being used?
tamaiyutaro
0
300
FinOps X 2026 Recap from Engineer Side #JapanFinOps
chacco38
0
260
デジタル・デザイン:次の50年を描く「進化する青写真」
y150saya
0
820
最近評価が難しくなった
maroon8021
0
250
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Language of Interfaces
destraynor
162
27k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
350
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
Docker and Python
trallard
47
3.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
460
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
My Coaching Mixtape
mlcsv
0
170
Transcript
Jetpack CameraX GDG Istanbul After I/O 2019
Jetpack CameraX Hadi Tok CitizenMe @hadi_tok
Android versiyonlari End Android Kamera API Problemleri Cihaz ve Üretici
Çeşitliliği Karmaşık API
CameraX nedir? • Daha kolay kamera uygulamaları geliştirmeye yardımcı •
Açık kaynak • Alpha
Android 5+ End CameraX Tüm köşe senaryolar kapsanmış Arka planda
Camera2 API kullanan basit API
CameraX • Lifecycle ile uyumlu • Portrait, HDR, Night, ve
Beauty • Eklenti alabiliyor
CameraX Ön İzleme Görüntü Analizi Görüntü Yakalama
Ön İzleme
val viewFinderConfig = PreviewConfig.Builder().build()
val viewFinderConfig = PreviewConfig.Builder().build() val preview = AutoFitPreviewBuilder.build(viewFinderConfig, viewFinder)
val viewFinderConfig = PreviewConfig.Builder().build() val preview = AutoFitPreviewBuilder.build(viewFinderConfig, viewFinder) preview.setOnPreviewOutputUpdateListener
{ previewOutput -> //use previewOutput.surfaceTexture if needed }
val viewFinderConfig = PreviewConfig.Builder().build() val preview = AutoFitPreviewBuilder.build(viewFinderConfig, viewFinder) preview.setOnPreviewOutputUpdateListener
{ previewOutput -> //use previewOutput.surfaceTexture if needed } CameraX.bindToLifecycle(this, preview)
val viewFinderConfig = PreviewConfig.Builder().build() val preview = AutoFitPreviewBuilder.build(viewFinderConfig, viewFinder) preview.setOnPreviewOutputUpdateListener
{ previewOutput -> //use previewOutput.surfaceTexture if needed } CameraX.bindToLifecycle(this, preview)
Görüntü Analizi
val imageAnalysisConfig = ImageAnalysisConfig.Builder() .setTargetResolution(Size(1280, 730)) .build()
val imageAnalysisConfig = ImageAnalysisConfig.Builder() .setTargetResolution(Size(1280, 730)) .build() val imageAnalysis =
ImageAnalysis(imageAnalysisConfig)
val imageAnalysisConfig = ImageAnalysisConfig.Builder() .setTargetResolution(Size(1280, 730)) .build() val imageAnalysis =
ImageAnalysis(imageAnalysisConfig) imageAnalysis.setAnalyzer { imageProxy, rotationDegrees -> //do image analysis }
val imageAnalysisConfig = ImageAnalysisConfig.Builder() .setTargetResolution(Size(1280, 730)) .build() val imageAnalysis =
ImageAnalysis(imageAnalysisConfig) imageAnalysis.setAnalyzer { imageProxy, rotationDegrees -> //do image analysis } CameraX.bindToLifecycle(this, imageAnalysis, preview)
val imageAnalysisConfig = ImageAnalysisConfig.Builder() .setTargetResolution(Size(1280, 730)) .build() val imageAnalysis =
ImageAnalysis(imageAnalysisConfig) imageAnalysis.setAnalyzer { imageProxy, rotationDegrees -> //do image analysis } CameraX.bindToLifecycle(this, imageAnalysis, preview)
Görüntü Yakalama
val imageCaptureConfig = ImageCaptureConfig.Builder() .build()
val imageCaptureConfig = ImageCaptureConfig.Builder() .build() val imageCapture = ImageCapture(imageCaptureConfig)
val imageCaptureConfig = ImageCaptureConfig.Builder() .build() val imageCapture = ImageCapture(imageCaptureConfig) CameraX.bindToLifecycle(
this, preview, imageCapture, imageAnalyzer)
val imageCaptureConfig = ImageCaptureConfig.Builder() .build() val imageCapture = ImageCapture(imageCaptureConfig) CameraX.bindToLifecycle(
this, preview, imageCapture, imageAnalyzer)
val imageSaveListener = object : ImageCapture.OnImageSavedListener { override fun onImageSaved(file:
File) { //use the image file } override fun onError(useCaseError: ImageCapture.UseCaseError, message: String, cause: Throwable?) { //handle error } }
val imageSaveListener = object : ImageCapture.OnImageSavedListener { override fun onImageSaved(file:
File) { //use the image file } override fun onError(useCaseError: ImageCapture.UseCaseError, message: String, cause: Throwable?) { //handle error } } val photoFile = createFile(outputDirectory, FILENAME, PHOTO_EXTENSION)
val imageSaveListener = object : ImageCapture.OnImageSavedListener { override fun onImageSaved(file:
File) { //use the image file } override fun onError(useCaseError: ImageCapture.UseCaseError, message: String, cause: Throwable?) { //handle error } } val photoFile = createFile(outputDirectory, FILENAME, PHOTO_EXTENSION) imageCapture.takePicture(photoFile, imageSaveListener)
val imageSaveListener = object : ImageCapture.OnImageSavedListener { override fun onImageSaved(file:
File) { //use the image file } override fun onError(useCaseError: ImageCapture.UseCaseError, message: String, cause: Throwable?) { //handle error } } val photoFile = createFile(outputDirectory, FILENAME, PHOTO_EXTENSION) imageCapture.takePicture(photoFile, imageSaveListener)
Kaynaklar • https://developer.android.com/training/camerax • https://www.youtube.com/watch?v=kuv8uK-5CLY • https://github.com/android/camera/tree/master/CameraXBasic
Hadi Tok, CitizenMe @hadi_tok Teşekkürler
Soru-Cevap