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
75
Finding the View
oshamahue
0
140
Mocking Kotlin with MockK
oshamahue
0
140
After I/O Kabul Android summary
oshamahue
0
91
Mocking Kotlin with MockK
oshamahue
0
220
RxJava vs Coroutines
oshamahue
1
660
Other Decks in Technology
See All in Technology
データサイエンスを価値につなげるプロジェクト設計 〜 DS一年目が現場で得た気づき 〜
ysd113
1
280
スタートアップにAmazon EKSは早すぎる? マルチプロダクト戦略を加速する Platform Engineeringの実践 / Is Amazon EKS Too Soon for Startups? Practical Platform Engineering to Accelerate a Multi-Product Strategy
elmodev09
0
370
アンオフィシャルな、オフィシャルからのお願い
wyamazak_devrel
0
140
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
1
2.5k
2026 TECHFRESH 畢業分享會 - AI-Native 重塑軟體工程與虛擬講師
line_developers_tw
PRO
0
1.3k
ぼっちではじめた登壇が「51名」「241件」の発信に化けた
subroh0508
1
240
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
270
AI-DLCを “そのまま導入しなかった”話 ~組織に合わせてアジャストした 私たちの実践共有~
hiroramos4
PRO
0
210
あなたの知らないPDFのアクセシビリティ
lycorptech_jp
PRO
0
220
Agent Skills設計で柔軟性と硬さのバランスが難しい話
nassy20
0
140
Claude Codeをどのように キャッチアップしているか
oikon48
13
8.6k
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
320
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
150
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
750
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Evolving SEO for Evolving Search Engines
ryanjones
0
220
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
240
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Being A Developer After 40
akosma
91
590k
Practical Orchestrator
shlominoach
191
11k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
How GitHub (no longer) Works
holman
316
150k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
310
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