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.3k
色恒常性仮説に基づく色補正ライブラリ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
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.6k
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
1
270
How to be an AWS Community Builder | 君もAWS Community Builderになろう!〜2024 冬 CB募集直前対策編?!〜
coosuke
PRO
2
2.9k
JVM(JavaVM)の性能分析者観点で探るInstanaの可能性
instanautsjp
0
120
Qiita埋め込み用スライド
naoki_0531
0
5.3k
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
120
20241218_今年はSLI/SLOの導入を頑張ってました!
zepprix
0
100
小学3年生夏休みの自由研究「夏休みに Copilot で遊んでみた」
taichinakamura
0
180
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
290
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
0
160
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
170
メンタル面でもつよつよエンジニアになる/登壇資料(井田 献一朗)
hacobu
0
120
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
22
1.2k
4 Signs Your Business is Dying
shpigford
182
21k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Done Done
chrislema
182
16k
Visualization
eitanlees
146
15k
Code Reviewing Like a Champion
maltzj
521
39k
What's in a price? How to price your products and services
michaelherold
244
12k
Documentation Writing (for coders)
carmenintech
67
4.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
170
Code Review Best Practice
trishagee
65
17k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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ͷࣄ͋Γ·͢