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
79
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
90
Finding the View
oshamahue
0
150
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
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
520
事業課題から技術的負債に向き合う
sansantech
PRO
2
1.8k
30座EKS, 180次升級淬煉的EKS Upgrade Skill 的歷程
eric8230
0
160
AI時代の「技術的負債」の変質ー概念の終焉と再解釈、エージェントと共に向かう先
nwiizo
0
2.6k
iOSDC Japan 2026 day1 TrackC 10:50
feedtailor
1
160
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
1
890
LTのテーマ どうきめてる?〜5つの型と私のやり方〜
yama3133
1
100
AIネイティブプロダクトで顧客価値を最大化するプロダクトエンジニアとFDEの協働
righttouch
PRO
0
310
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
140
白金鉱業Meetup Vol.25 アウトカムが二値のデータに対するCausal Impact
brainpadpr
0
200
Reactの設計論
uhyo
24
13k
10分で知る最近のOmarchy
komagata
0
320
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
410
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
510
So, you think you're a good person
axbom
PRO
2
2.2k
Designing Powerful Visuals for Engaging Learning
tmiket
1
550
Game over? The fight for quality and originality in the time of robots
wayneb77
1
280
Bash Introduction
62gerente
615
220k
The browser strikes back
jonoalderson
0
1.7k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
500
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
480
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