Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
After I/O Istanbul Jetpack CameraX
Search
Hadi Tok
June 29, 2019
Technology
80
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
130
Introduction to Functional Programing in Kotlin and Arrow
oshamahue
0
210
Kotlin for Java developers.
oshamahue
0
120
Kotlin Java interop and Kotlin Migration
oshamahue
0
91
Finding the View
oshamahue
0
160
Mocking Kotlin with MockK
oshamahue
0
150
After I/O Kabul Android summary
oshamahue
0
100
Mocking Kotlin with MockK
oshamahue
0
230
RxJava vs Coroutines
oshamahue
1
670
Other Decks in Technology
See All in Technology
「Docker Desktop不要の時代」は 来たのか?
ueponx
0
770
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
420
サブエージェントと Claude Mods で作る独自 Advisor ツールの話
kenichiodo
2
160
Browser Spec: Testing Hotwire with Ruby
takahashim
1
120
JAWS-UGグッズ職人仕事の流儀
kentapapa
0
110
Temporal 最高!でも改めて「日付」について調べたら人類の負債すぎる件
riyaamemiya
0
150
今さら理解するウェブフォントver.2026
takanorip
3
820
Metadata - Section 1: HTML Basics
mohab1
0
120
パッチ更新でterraform initが落ちた日
grimoh
1
140
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
140
Refining Active Record
shugo
0
160
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
170
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Faster Mobile Websites
deanohume
310
32k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Odyssey Design
rkendrick25
PRO
2
870
Are puppies a ranking factor?
jonoalderson
2
4.1k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Everyday Curiosity
cassininazir
0
350
Git: the NoSQL Database
bkeepers
PRO
433
67k
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