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.4k
色恒常性仮説に基づく色補正ライブラリ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
810
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
160
Gunosy.go#2 package/compress
shunsukeaihara
0
110
Other Decks in Technology
See All in Technology
Observability for LLM Application lifecycle
ivry_presentationmaterials
1
230
RAID6 を楔形文字で組んで現代人を怖がらせましょう(実装編)
mimifuwa
0
300
[kickflow]20250319_少人数チームでのAutify活用
otouhujej
0
210
第4回 関東Kaggler会 [Training LLMs with Limited VRAM]
tascj
11
1.6k
ソフトウェア エンジニアとしての 姿勢と心構え
recruitengineers
PRO
1
120
R-SCoRe: Revisiting Scene Coordinate Regression for Robust Large-Scale Visual Localization
takmin
0
400
自治体職員がガバクラの AWS 閉域ネットワークを理解するのにやって良かった個人検証環境
takeda_h
2
380
認知戦の理解と、市民としての対抗策
hogehuga
0
300
2025新卒研修・Webアプリケーションセキュリティ #弁護士ドットコム
bengo4com
3
10k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
8.6k
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
2
20k
メルカリIBIS:AIが拓く次世代インシデント対応
0gm
2
520
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2k
Facilitating Awesome Meetings
lara
55
6.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
GraphQLとの向き合い方2022年版
quramy
49
14k
It's Worth the Effort
3n
187
28k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Designing for humans not robots
tammielis
253
25k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
820
jQuery: Nuts, Bolts and Bling
dougneiner
64
7.9k
How to Ace a Technical Interview
jacobian
279
23k
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ͷࣄ͋Γ·͢