$30 off During Our Annual Pro Sale. View Details »
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.5k
色恒常性仮説に基づく色補正ライブラリ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.7k
Goのnet.TCPConnの話/shibuya.go01
shunsukeaihara
3
830
Norikra in Gunosy Network Ads@Norikra meetup #2
shunsukeaihara
1
6k
LevelDB on S3 As A KVS
shunsukeaihara
1
2.8k
Sparkによる分散処理 / 2015-01-16 PyData.Tokyo#3
shunsukeaihara
11
3.5k
ゼロから始めた Gunosyアドサーバ開発運用記 / 2014-12-16-dots
shunsukeaihara
6
1.2k
Gunosy.Go#5 index/io/log
shunsukeaihara
0
170
Gunosy.go#2 package/compress
shunsukeaihara
0
110
Other Decks in Technology
See All in Technology
Codeer.LowCode.Blazor 紹介と成長録
wadawada
0
110
AI開発の定着を推進するために揃えるべき前提
suguruooki
1
440
AIで加速する次世代のBill Oneアーキテクチャ〜成長の先にある軌道修正〜
sansantech
PRO
1
140
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.2k
Introduction to Bill One Development Engineer
sansan33
PRO
0
320
Flutter Thread Merge - Flutter Tokyo #11
itsmedreamwalker
1
110
Digitization部 紹介資料
sansan33
PRO
1
6k
ページの可視領域を算出する方法について整理する
yamatai1212
0
110
【ASW21-02】STAMP/CAST分析における生成AIの支援 ~羽田空港航空機衝突事故を題材として (Support of Generative AI in STAMP/CAST Analysis - A Case Study Based on the Haneda Airport Aircraft Accident -)
hianraku9498
1
330
AI エージェントを評価するための温故知新と Spec Driven Evaluation
icoxfog417
PRO
2
970
Active Directory 勉強会 第 6 回目 Active Directory セキュリティについて学ぶ回
eurekaberry
10
3.5k
TypeScript 6.0で非推奨化されるオプションたち
uhyo
15
5.6k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
49
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Into the Great Unknown - MozCon
thekraken
40
2.2k
How STYLIGHT went responsive
nonsquared
100
5.9k
Agile that works and the tools we love
rasmusluckow
331
21k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.1k
Unsuck your backbone
ammeep
671
58k
Code Reviewing Like a Champion
maltzj
527
40k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
350
Visualization
eitanlees
150
16k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
990
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ͷࣄ͋Γ·͢