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
20181130.pdf
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
sug1t0m0
December 20, 2018
Technology
760
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
20181130.pdf
sug1t0m0
December 20, 2018
More Decks by sug1t0m0
See All by sug1t0m0
ECS+S3でスクレイピングを試してみた
sug1t0m0
0
1.1k
単純パーセプトロンで遊んでみたかった
sug1t0m0
0
790
渡る世間はナベばかり」でカルタ遊びをしてみての感想(大津の手法で「ナベ」カードを検出してみた)
sug1t0m0
0
960
Other Decks in Technology
See All in Technology
コーチングの奥義 何もしないテクニック
jinwatanabe
0
150
私がブラウザを自作したくなった理由
supurazako
1
280
AI開発に用いられるHPC技術について
gpuunite_official
0
250
【GCC2026】鉄拳8でのVFX開発事例
bandainamcostudios
PRO
0
240
国家プロジェクトを支える「さくらONE」 大規模LLM開発におけるGPU障害を乗り越えるクラスター運用戦略
gpuunite_official
0
250
三人寄ればチューリング完全
puhitaku
6
2.8k
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.6k
Invisible to AI? Making TYPO3 Sites Quotable by AI Search Systems
wolfgangwagner
0
240
AI時代のアウトプット――変わったこと、変わらないこと / Devsumi 2026 Kansai #devsumi
jnchito
0
500
地震情報アプリを作ってみた
yama3133
1
110
NANDでも描画したい!
nichica906
2
510
Adding Right-to-Left support to your web application with CSS logical properties — Lessons from Redmine
vividtone
0
170
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Raft: Consensus for Rubyists
vanstee
141
7.6k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
380
My Coaching Mixtape
mlcsv
0
260
Writing Fast Ruby
sferik
630
63k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
360
Fireside Chat
paigeccino
42
4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
380
Transcript
͜͜Λ͜͏ͨ͠Β͘ͳͬͨ!! (OpenCVͷαϯϓϧίʔυΛ ίϐϖ͔Γ͍͕ͯͨ͠ ؾ͍ͮͯΑ͔ͬͨͱࢥ͏͜ͱ) Sugiyama.T (@sug1t0m0_agrict) #WaterCell Tech Night #2
Python OpenCVͷجૅ ըૉͷΞΫηε (άάΔͱ͙͢ʹग़ͯ͘Δͭ) • ըૉ͝ͱʹ৭Λऔಘ͢Δ blue = img[10, 20,
0] green = img[10, 20, 1] red = img[10, 20, 2] pixelValue = img[Y࠲ඪ, X࠲ඪ, νϟϯωϧ] • ըૉͷॻ͖͑ img[10, 20, 0] = 255 img[10, 20, 1] = 255 img[10, 20, 2] = 255 img[10, 20] = [255, 255, 255] or
Python OpenCVͷجૅ ըૉͷΞΫηε (NumpyΛ͏ͱ) • img_1ͷըૉ(x,y)͕50Ҏ্ͷͱ͖ img_2ͷըૉ(x,y)ͷΛ52ʹ͍ͨ͠ for y in
range(height): for x in range(weight): if img_1[y, x, 0] >= 50 : img_2[y, x, 0] = 52 ɹɹɹɹɹɹɹɹɹɹɹɹɹͱͬͯ͠·͏ • ͰnumpyΛ͏ͱɺɺɺ cond = img_1 >= 50 img_2[cond] = 52 ɹɹɹɹɹɹɹɹɹɹͰɺ͍͚Δʂ
ͬ͘͟Γ(͔ͳΓదʹ)ൺֱ for y in range(height): for x in range(weight): if
img_1[y, x, 0] >= 50 : img_2[y, x, 0] = 52 • time : 0.779437780380249[sec] cond = img_1 >= 50 img_2[cond] = 52 • time : 0.004307746887207031[sec] • Pythonͷfor͍ • ΠϯλϓϦλͷΦʔόʔϔουʁ • ੩తͳܕఆٛΛ࣋ͨͳ͍͔Βʁ
͜ΕBoolean Indexͱ͍͏ͷΒ͍͠ • numpyͷྻൺֱԋࢉࢠͰܭࢉΛߦ͏ͱਅ ِͷྻʹɺɺɺ • ্هͷਅِͷྻΛ͏͜ͱͰɺըૉͷॻ ͖͕͑ߴʹߦ͑Δɺɺɺ
5 5 ' 5 ' 5 5 5 ' =< 2 img [ ]=2 EW W EW EW 5 5 ' 5 ' 5 5 5 '
To দҪ͞Μ