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
Rubyで画像ファイルから様々なオブジェクトを検出する / ruby-opencv-heiseirb-2
Search
Tomoki Ishimaru
March 14, 2019
Programming
1
650
Rubyで画像ファイルから様々なオブジェクトを検出する / ruby-opencv-heiseirb-2
Tomoki Ishimaru
March 14, 2019
Tweet
Share
More Decks by Tomoki Ishimaru
See All by Tomoki Ishimaru
RubyとOpenCVで始める画像処理 / ruby-opencv-megurorb-23
thomi40
1
440
Netatmo API × Rubyで オフィスのCO2濃度をSlackに通知する / Netatmo API × Ruby × Slack
thomi40
0
250
WebVRをはじめよう
thomi40
0
70
Other Decks in Programming
See All in Programming
SRE チーム立ち上げ前に考えたこと・取り組んだこと / Considerations and Preparations Before Establishing an SRE Team
mackey0225
3
320
リハビリmruby
kishima
1
160
英語
s_shimotori
1
220
Temporalを取り巻く仕様を整理する
sajikix
0
120
Async Await: Mastering Python's Time-Bending Tricks - EuroPython2024
yanbo
1
290
Google's Recipe for Scaling (Web) Security – LocoMocoSec 2024
lweichselbaum
0
170
Namespace on read
tagomoris
2
370
生成AIをkintoneに連携してみた
hideg
0
230
유연한 Composable 설계
l2hyunwoo
0
380
CSC307 Lecture 12
javiergs
PRO
0
220
Rustのweb開発を助ける 便利なツール紹介
yuki0418
1
190
Findy - エンジニア向け会社紹介 / Findy Letter for Engineers
findyinc
2
81k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
178
21k
BBQ
matthewcrist
82
9k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
2.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
44
4.7k
Building Effective Engineering Teams - LeadDev
addyosmani
47
2.2k
5 minutes of I Can Smell Your CMS
philhawksworth
200
19k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
26
1.8k
Rails Girls Zürich Keynote
gr2m
93
13k
Git: the NoSQL Database
bkeepers
PRO
423
64k
Web Components: a chance to create the future
zenorocha
307
41k
Creatively Recalculating Your Daily Design Routine
revolveconf
214
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
13
430
Transcript
RubyͰը૾ϑΝΠϧ͔Β ༷ʑͳΦϒδΣΫτΛݕग़͢Δ 2019/03/14 ฏ.rb #2 @MedPeer, Inc. Tomoki Ishimaru /
@thom_i40
ࣗݾհ • Tomoki Ishimaru • GMO AD Marketing Inc. •
ϑϩϯτΤϯυ / αʔόʔαΠυ • झຯԻָͱࣸਅͱΔ͜ͱ @thom_i40
ࠓ͢͜ͱ • ը૾ॲཧϥΠϒϥϦʮOpenCVʯͷ֓ཁ • ruby-opencvͷ֓ཁ • ruby-opencvΛ༻͍ͨମೝࣝ • ruby-opencvΛ׆༻ͨ͠Ռ
ࠓ͞ͳ͍͜ͱ • ಈըͷೖग़ྗ੍ޚ • ػցֶशͱOpenCV • ruby-opencvͷΈ • ίϯϐϡʔλϏδϣϯͷΈ
None
• Πϯςϧ͕։ൃ • Φʔϓϯιʔεͷը૾/ө૾ॲཧϥΠϒϥϦ • ΫϩεϓϥοτϑΥʔϜࢦͰઃܭ • C++, Java, Python,
MATLABΛαϙʔτ • ༷ʑͳόΠϯσΟϯά͕ଘࡏ OpenCV
ruby-opencv • Ruby༻ͷOpenCVϥούʔ • Ruby 2ܥ / OpenCV 2.4.13Λαϙʔτ •
RubyDoc.infoͰυΩϡϝϯτΛఏڙ https://www.rubydoc.info/gems/ruby-opencv/frames
ڥߏங(OS X) • HomebrewͰOpenCVΛΠϯετʔϧ • gem install Ͱ ruby-opencv Λಋೖ
https://github.com/ruby-opencv/ruby-opencv
ࠓճհ͢Δػೳ • إݕग़ • ԁݕग़ • ઢݕग़ • දతͳը૾ॲཧػೳ •
ςϯϓϨʔτϚονϯά
άϨʔεέʔϧ / ೋԽॲཧ src = CvMat.load('Sailboat.bmp') gray = src.BGR2GRAY bin
= gray.threshold(128, 255, :binary)
ԁݕग़
ԁݕग़
HaarྨثʹΑΔإݕग़
HaarྨثʹΑΔإݕग़
HaarྨثʹΑΔإݕग़ ͨͬͨߦͰ࣮Մೳ
ઢݕग़
ઢݕग़
ςϯϓϨʔτϚονϯά
ςϯϓϨʔτϚονϯά
ࠓճ࡞ͬͨՌ
ָේը૾͔ΒϝϩσΟΛநग़
ָේը૾͔ΒϝϩσΟΛநग़
ָේը૾͔ΒϝϩσΟΛநग़
ͬͨػೳ
ೋԽॲཧ
ઢݕग़
ςϯϓϨʔτϚονϯά
ϝϩσΟΛநग़
·ͱΊ • OpenCVʹ͍ͭͯհͨ͠ • ruby-opencvΛ༻͍ͨମݕग़ʹ͍ͭͯհͨ͠ • ָේը૾͔ΒϝϩσΟΛநग़͢ΔγεςϜΛ࡞ͬͨ • RubyͰجຊతͳը૾ೝ͕ࣝͰ͖Δ͜ͱ͕Θ͔ͬͨ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ @thom_i40