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
画像フィルタリング高速化するよ@iOS
Search
Tomoki Kobayashi
July 30, 2016
Programming
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
画像フィルタリング高速化するよ@iOS
Tomoki Kobayashi
July 30, 2016
More Decks by Tomoki Kobayashi
See All by Tomoki Kobayashi
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
3.6k
Liquid Glass を Metal Shader で描きたいだけの人生だった…
temoki
0
300
Skip Skip Run Run Run ♫
temoki
0
1.1k
さようならRxSwift こんにちは*****
temoki
1
670
Androidで不安定なPlatform Viewsとの闘い
temoki
0
1.3k
iOSパッケージマネージャー奮闘記 完結編
temoki
2
800
事業譲渡を受けたアプリとの統合で失敗、 そしてユーザーからの評価回復に至るまで
temoki
1
840
Apple Vision Proデベロッパラボに参加してきた
temoki
0
650
年末年始の成果、そして現状の紹介
temoki
0
350
Other Decks in Programming
See All in Programming
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
460
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
740
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
380
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
370
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
240
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
290
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
250
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
650
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
120
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
140
App Intentsのビルドプロセスを支える技術
kntkymt
0
490
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Discover your Explorer Soul
emna__ayadi
2
1.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
Deep Space Network (abreviated)
tonyrice
0
350
New Earth Scene 8
popppiees
4
2.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Statistics for Hackers
jakevdp
799
230k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Transcript
ը૾ϑΟϧλϦϯά ߴԽ͢ΔΑˏJ04 !UFNPLJ
ը૾ϑΟϧλϦϯάͬͯԿʁ ը૾ϑΟϧλϦϯάͷ࣮ ը૾ϑΟϧλϦϯάΛߴԽʂ
ը૾ϑΟϧλϦϯάͬͯԿʁ ը૾ϑΟϧλϦϯάͷ࣮ ը૾ϑΟϧλϦϯάΛߴԽʂ
͜ͷϨφ͞ΜࣸਅΛ
΅͔ͨ͠Γ
ྠֲͱΓͩͨ͠Γ
ϞβΠΫ ͔͚ͨΓ ͢ΔͭͰ͢ ը૾αϯϓϧʮϨφʯͷਖ਼ମʮ1-":#0:ʯࢽͷ ࠷ଟൢച෦Λهͨ͠ϓϨΠϝΠτ IUUQHJHB[JOFOFUOFXT@MFOOB
ը૾ϑΟϧλϦϯάͬͯԿʁ ը૾ϑΟϧλϦϯάͷ࣮ ը૾ϑΟϧλϦϯάΛߴԽʂ
Ұൠతͳը૾σʔλ
QJYFM 3(#"
QJYFM 3FE(SFFO#MVF"MQIB νϟϯωϧʹόΠτʹdͷ ܭνϟϯωϧʹόΠτ
ը૾શମ 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#"
3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#" 3(#"3(#"3(#"3(#"3(#"3(#"3(#"3(#"
ΈࠐΈԋࢉ
ΈࠐΈΧʔωϧ
ೖྗը૾ ग़ྗ º º º º º º º º º × º
ΈࠐΈΧʔωϧ $POWPMVUJPO,FSOFM
ྫ͑ɺ
΅͔͠ʢҠಈฏۉʣ
΅͔͠ʢՙॏฏۉʣ
Τοδநग़ʢਫฏʣ
Τοδநग़ʢਨʣ
ઌӶԽ
αΠζ͍Ζ͍Ζ
ΨγΞϯΧʔωϧº
˞ઌ΄Ͳͷʮ΅͔͠ʢՙॏฏۉʣʯͱಉ͡
ΨγΞϯΧʔωϧº
ΨγΞϯΧʔωϧº
ܭࢉྔ
for ( x of image ) { for ( y
of image ) { for ( x of kernel ) { for ( y of kernel ) { for ( channel ) { operation } } } } }
ສճͷԋࢉ w ೖྗը૾ɿ3(#"Y w ΧʔωϧɿΨγΞϯΧʔωϧº w ºººº
ॲཧ࣌ؒ
͜ΜͳΞϓϦ ͭͬͯ͘ݕূ
'14 w σόΠεɿJ1IPOF w ೖྗը૾ɿ3(#"Y w ΧʔωϧɿΨγΞϯΧʔωϧº
͑ͨΜ͡Όͳ͍ʜ
ը૾ϑΟϧλϦϯάͬͯԿʁ ը૾ϑΟϧλϦϯάͷ࣮ ը૾ϑΟϧλϦϯάΛߴԽʂ
ߴԽ w ΞϧΰϦζϜͷͰܭࢉྔΛݮΒ͢ w σόΠεͷܭࢉࢿݯΛ࠷େݶʹར༻
ߴԽ w ΞϧΰϦζϜͷͰܭࢉྔΛݮΒ͢ w σόΠεͷܭࢉࢿݯΛ࠷େݶʹར༻ ˠͪ͜Β͕͜ͷεϥΠυͷςʔϚͰ͢ɻ
ϚϧνίΞ w ը૾ΛෳͷΤϦΞʹׂ͢Δ ʢྫʣը૾ͷࠨͷӈ w σόΠεͷίΞεϨουΛ࡞͠ ֤εϨουʹΤϦΞΛׂΓͯΔ
ˣ'14ˣ w J1IPOFίΞˠεϨου w εϨουॲཧ($%Ͱ؆୯ʹ w εϨουͷΦʔόʔϔου͕େ͖͍ʁ ͬͱ͕ΜΕΔͣʜ w ͞ΕͲίΞͰخ͠͞ബ͍
4*.% w 4JOHMF*OTUSVDUJPO.VMUJQMF%BUB w ͷ໋ྩͰෳͷσʔλΛԋࢉ w ϕΫτϧԋࢉɺύοΫυԋࢉ w $16ͷ֦ு໋ྩͱͯ͠ Yͷ..944&
"3.ͷ/&0/
ී௨ͷࢉ int a[4] = { 1, 2, 3, 4 };
int b[4] = { 5, 6, 7, 8 }; int c[4]; for ( int i=0; i<4; i++) { c[i] = a[i] * b[i]; }
"3./&0/Ͱࢉ ʢίϯύΠϥΈࠐΈؔʣ int32_t a = { 1, 2, 3, 4
}; int32_t b = { 5, 6, 7, 8 }; int32_t c; c = vmulq_s32( a, b ); IUUQXXXBSNDPNKBQSPEVDUTQSPDFTTPSTUFDIOPMPHJFTOFPOQIQ
ˢ'14ˢ w গ͘͠ͳͬͨʁ w ॲཧΛ࠷దԽ͢Εͬͱ͍͚Δʁ
ͦͯ͠ɺϝχʔίΞ
ϚϧνίΞ $PSF $PSF $PSF $PSF γϯάϧίΞ $PSF ϝχʔίΞ
ϝχʔίΞ w େྔͷίΞΛ࣋ͭϓϩηοαͰܭࢉ w (16/7*%*" ".% *OUFM *NBHJOBUJPO w *OUFM9FPO1IJ
(16Ͱը૾ॲཧ!J04 w J1IPOFͷ(161PXFS73 w $PSF*NBHFGSBNFXPSLͷ$*'JMUFS w "DDFMFSBUFGSBNFXPSLͷW*NBHF w 0QFO$-ʢJ04Ͱ͍ʹͳΒͳ͍ʣ w
0QFO(-(-4-Ͱ͕ΜΔʢ໘ʜʣ 6*&WPMVUJPOதౡ૱ࢯͷ7JEFP4IBEFSΞϓϦ(16*NBHFϥΠϒϥϦ(-4-Ͱ͕Μͬͯ·͢
$*'JMUFS ˢˢ'14ˢˢ ʂ CIImage * src = [CIImage imageWithCVPixelBuffer:imageBuffer]; CIFilter
* filter = [CIFilter filterWithName:@"CIGaussianBlur"]; [filter setValue:src forKey:@"inputImage"]; [filter setValue:[NSNumber numberWithFloat:1.f] forKey:@"inputRadius"]; CIImage * dst = filter.outputImage; ˞ΧʔωϧαΠζ͕ෆ໌ͷͨΊຊདྷൺֱ͖͢Ͱͳ͍͕ʜ
W*NBHF ˢˢˢ'14ˢˢˢ രʂ const vImage_Buffer src = { CVPixelBufferGetBaseAddress(buffer), height,
width, bytesPerRow }; const vImage_Buffer dst = { malloc(bufferSize), height, width, bytesPerRow }; Pixel_8888 backgroundColor = {0,0,0,0}; vImageConvolve_ARGB8888(&src, &dst, NULL, 0, 0, gaussianKernel, 7, 7, divisor, backgroundColor, kvImageCopyInPlace);
(16͏Ͱ͠ΐʂ
ͪͳΈʹ0QFO$7 ˠ'14 w ී௨ʹ$16Ͱԋࢉ w $6%"࣮͕͋ΔΒ͍͠HQV(QV.BU w 0QFO$-࣮͕͋ΔΒ͍͠PDM.BU cv::Mat src
= cv::Mat(height, width, CV_8UC4, baseAddress); cv::Mat dst = cv::Mat(height, width, CV_8UC4); cv::Size kernelSize(7, 7); cv::GaussianBlur(src, dst, kernelSize, 1.f);
͓ΘΓ