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
色恒常性仮説に基づく色補正ライブラリcolorcorrect / 2015-01-31-kan...
Search
shunsukeaihara
January 30, 2015
Technology
3
2.2k
色恒常性仮説に基づく色補正ライブラリcolorcorrect / 2015-01-31-kantocv27
@関東CV勉強会 2015/01/31
shunsukeaihara
January 30, 2015
Tweet
Share
More Decks by shunsukeaihara
See All by shunsukeaihara
BONXを支える技術:発話区間検出(VAD)の話/Akerun & BONX Tech Talk
shunsukeaihara
4
7.5k
Goのnet.TCPConnの話/shibuya.go01
shunsukeaihara
2
740
Norikra in Gunosy Network Ads@Norikra meetup #2
shunsukeaihara
1
5.9k
LevelDB on S3 As A KVS
shunsukeaihara
1
2.7k
Sparkによる分散処理 / 2015-01-16 PyData.Tokyo#3
shunsukeaihara
11
3.4k
ゼロから始めた Gunosyアドサーバ開発運用記 / 2014-12-16-dots
shunsukeaihara
6
1.1k
Gunosy.Go#5 index/io/log
shunsukeaihara
0
150
Gunosy.go#2 package/compress
shunsukeaihara
0
95
Other Decks in Technology
See All in Technology
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
180
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
140
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
複雑なState管理からの脱却
sansantech
PRO
1
160
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
620
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
飲食店データの分析事例とそれを支えるデータ基盤
kimujun
0
210
静的解析で実現した効率的なi18n対応の仕組みづくり
minako__ph
1
140
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
アプリエンジニアのためのGraphQL入門.pdf
spycwolf
0
110
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
160
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
GraphQLとの向き合い方2022年版
quramy
43
13k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Bash Introduction
62gerente
608
210k
Side Projects
sachag
452
42k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Transcript
colorcorrect ৭߃ৗੑԾઆʹجͮ͘৭ิਖ਼ϥΠϒϥϦ Gunosy inc Shunsuke Aihara
ࣗݾհ • ҄൧ݪढ़հ (http://argmax.jp) @shunsukeaihara • GunosyͷϚωʔδϟʔ • ࠂ৴γεςϜͷ։ൃશମͱR&DܥΛ୲ •
ઐ: ܭࢉݴޠֶ • PythonͱඇಉظࢄγεςϜΛΉ • DNN࣭มͱ͔झຯͰͬͯΔ • ը૾ॲཧɾԻ৴߸ॲཧͰ͍Ζ͍ΖϥΠϒϥϦ࡞ͬͯΔ • https://bitbucket.org/aihara
͜Εը૾ೝࣝͷͨΊͷ ຯͳલॲཧͷͰ͢
colorcorrect
৭߃ৗੑ/໌Δ͞߃ৗੑͷԾઆʹج͖ͮ ม৭ɾwhite baranceͷζϨΛࣗಈิਖ਼
ը૾ͷޫݯ৭ͱϗϫΠτόϥϯε ࣮σʔλͰόϥόϥ • ৭Λ༻͍ͨମೝࣝΛߦ͓͏ͱ͢Δͱɺֶशσʔληοτͱ৭͕ͣΕ͍ͯΔͱఆਫ਼ མͪΔ • ৭ใΛ༻͍ͨBag-Of-Keypointܥͷख๏Ͱ݁ߏ৭ิਖ਼͕ޮ͍ͯ͘Δ • ྨࣅը૾ݕࡧ /
ܠ؍ը૾͔Βͷମݕग़ͱ͔࡞ͬͨ࣌ʹ૬ϋϚͬͨ • Deep Learningͱ͔͍Ζ͍Ζظͯ͠Δ͚Ͳɺ࣮ࡍʹࣄͰֶशσʔληοτूΊΔͱ ͳΔͱ͍ΖΜͳࡱӨ݅ͷը૾ूΊΔͷ݁ߏେม • ෳর໌݅ʹର͢ΔData AugmentationΑ͘Θ͔Βͳ͍ • ͋ͱɺը૾ͷݟͨΩϨΠʹ͍ͨ͠ͱ͔͍Ζ͍Ζ͋Δ • ͳΜͱָ͔͔ͨͬͨ͠ͷͰิਖ਼ख๏ͷจͱ͔͍Ζ͍Ζௐͨ
༻్ • ม৭ͨࣸ͠ਅͷิਖ਼ • ઃఆϛεͬͯࡱͬͨࣸਅͷमਖ਼ • ίϯσδͰઃఆؒҧ͑ͯࡱͬͨࣸਅͱ͔ • ମೝࣝͷલॲཧ •
దʹެ։͓͍ͯͨ͠ΒCVPR2013ͷจͰ࣮ ࡍʹΘΕͨʂ
͋ͱ᧙৭ը૾Λ͔ͨͬͨ͠ ͜Ε৭ͷใ͕ࣦΘΕ͍ͯΔͷͰͲ͏ͬͯϜϦ
pip install colorcorrect
৭߃ৗੑ (Color Constancy) ໌Δ͞߃ৗੑ (lightness constancy)
• র໌ޫͷεϖΫτϧ͕มԽͯ͠ɺମ৭ͷ ೝେ͖͘มԽ͠ͳ͍(ݩͷ৭͕ೝࣝͰ͖Δ) ৭߃ৗੑ
νΣοΧʔγϟυʔࡨࢹ ໌Δ͞ͱਓ͕ؒೝͨ͠ͷͱҟͳΔ ྡ෦ҐͷίϯτϥετʹӨڹΛड͚ͯҟͳΔೝ 'SPN8JLJNFEJB$PNNPOT
৭ͷ֮ͷ؆୯ͳϞσϧ • ʹೖࣹ͢ΔޫޫݯޫͱରͷޫࣹͰܾ· Δ • ৭߃ৗੑೖࣹޫ͔ΒޫݯޫΛਪఆͯ͠ɺޫࣹ Λਪఆ͢Δͱఆٛग़དྷΔ S( ) =
I( ) · R( ) • S(λ) ೖࣹޫ • I(λ) ޫݯޫ • R(λ) ମͷޫࣹ
৭߃ৗੑԾઆͷ؆୯ͳ • փ৭Ծઆ • ന৭ޫݯԼͷ߹ɺࢹ֮ͷ৭ͷฏۉΛऔΔͱփ৭ (127,127,127)ʹͳΔͣͳͷͰͦͷζϨΛิਖ਼͢Δ • ً - ৭૬ؔ
• ࢹ֮ͷ৭ʹภΓ͕͋Δ߹փ৭ԾઆͰ߃ৗੑΛ୲อग़ དྷͳ͍ͷͰɺًͱ৭ͷ૬͔ؔΒ৭ͷภΓ͕ޫݯʹΑΔ͔ݩ ͷମ৭ʹΑΔ͔ਪఆͯ͠ิਖ਼ • ͜ΕΒΛϕʔεʹ༷ʑͳΞϧΰϦζϜ͕ఏҊ͞Ε͍ͯΔ
Algorithms
࣮ͨ͠৭߃ৗੑΞϧΰϦζϜ • gray world • max white • stretch •
retinex, retinex with adjust • weighted grey world • standard deviation weighted grey world • luminance weighted gray world • standard deviation and luminance weighted gray world • automatic color equalization • ->ώϡʔϦεςΟΫε͚ͩͲิਖ਼ྗ͕͍͢͝
Implementation
࣮ • PythonʹΑΔ࣮(2ܥ) • PIL • Numpy • ͕ඞཁͳ෦C++ͷϥΠϒϥϦΛ numpy.ctypesͰϥοϓ
• pip install colorcorrectͰར༻Մೳ
DEMO http://colorcorrect.argmax.jp/
·ͱΊ • खܰʹը૾ͷ৭ิਖ਼͕ग़དྷͯศརͳͷͰͬͯΈ ͍ͯͩ͘͞ • Python3ܥ + PillowରԠͦΖͦΖ͠·͢ • ԻͷલॲཧϥΠϒϥϦͱ͔ެ։ͯ͠·͢
• https://bitbucket.org/aihara/pyssp • Gunosyʹମೝࣝɾը૾clipͷࣄ͋Γ·͢