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
sug1t0m0
December 20, 2018
Technology
0
710
20181130.pdf
sug1t0m0
December 20, 2018
Tweet
Share
More Decks by sug1t0m0
See All by sug1t0m0
ECS+S3でスクレイピングを試してみた
sug1t0m0
0
1k
単純パーセプトロンで遊んでみたかった
sug1t0m0
0
730
渡る世間はナベばかり」でカルタ遊びをしてみての感想(大津の手法で「ナベ」カードを検出してみた)
sug1t0m0
0
890
Other Decks in Technology
See All in Technology
[ JAWS-UG 東京 CommunityBuilders Night #2 ]SlackとAmazon Q Developerで 運用効率化を模索する
sh_fk2
3
420
Language Update: Java
skrb
2
300
OCI Oracle Database Services新機能アップデート(2025/06-2025/08)
oracle4engineer
PRO
0
140
Terraformで構築する セルフサービス型データプラットフォーム / terraform-self-service-data-platform
pei0804
1
170
S3アクセス制御の設計ポイント
tommy0124
3
200
「Linux」という言葉が指すもの
sat
PRO
4
130
roppongirb_20250911
igaiga
1
220
MCPで変わる Amebaデザインシステム「Spindle」の開発
spindle
PRO
3
3.2k
Django's GeneratedField by example - DjangoCon US 2025
pauloxnet
0
150
Function Body Macros で、SwiftUI の View に Accessibility Identifier を自動付与する/Function Body Macros: Autogenerate accessibility identifiers for SwiftUI Views
miichan
2
180
250905 大吉祥寺.pm 2025 前夜祭 「プログラミングに出会って20年、『今』が1番楽しい」
msykd
PRO
1
890
企業の生成AIガバナンスにおけるエージェントとセキュリティ
lycorptech_jp
PRO
2
170
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
525
40k
The Pragmatic Product Professional
lauravandoore
36
6.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
13k
Unsuck your backbone
ammeep
671
58k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Building an army of robots
kneath
306
46k
Fireside Chat
paigeccino
39
3.6k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Balancing Empowerment & Direction
lara
3
620
Designing for humans not robots
tammielis
253
25k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
840
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 দҪ͞Μ