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
cgunchiku
Search
yoya
November 13, 2015
Technology
210
1
Share
cgunchiku
某社で好きな事喋ってよいと言われたので、光から順に話した時のスライド。ほとんどコピペだけど。
yoya
November 13, 2015
More Decks by yoya
See All by yoya
resize_nitpick
yoya
1
170
ImageFluxBinary
yoya
2
2.9k
HEIF-kaisetsu
yoya
4
3.5k
go-thumber-imagick
yoya
1
200
chokaizomae
yoya
2
600
wildimagebinary
yoya
1
230
goimagicksyokai
yoya
2
1.2k
GoImagickThumbnail
yoya
0
1.7k
sushigazou
yoya
0
12k
Other Decks in Technology
See All in Technology
Kiro CLI v2.0.0がやってきた!
kentapapa
0
160
大学生が本気でDatabricksを活用してDiscordサークルをデータ駆動させてみた
phantomjuju
0
120
イベントで大活躍する電子ペーパー名札 〜その3〜 / ビジュアルプログラミングIoTLT vol.23
you
PRO
0
150
oracle-to-databricks-migration-with-llm-and-dbt
casek
0
170
イベントストーミングとKiroの仕様駆動開発で実現する要件の認識合わせプロセス
syobochim
5
540
EdgeプロファイルでAWSアカウントを安全に使い分ける
jhashimoto
0
110
サプライチェーン攻撃への備えについて考えている #湘なんか
stefafafan
3
2.4k
TSKaigi 2026 - 型プラグインシステムの実装に使われるテクニック
teamlab
PRO
2
440
脅威をエンジニアリングの糧にして:恐怖を乗り越えた先にあったもの / Turn threats into fuel for engineering: what lay beyond overcoming fear
nrslib
1
300
オンコールの負荷軽減のためのBits Assistant 活用方法 / How to Use Bits Assistant to Reduce the Workload on On-Call Staff
sms_tech
1
130
TROCCOで始めるクラウドコストを民主化するためのFinOps
tk3fftk
1
160
AI とサービス・デザイン / AI and Service Design
ks91
PRO
0
170
Featured
See All Featured
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
290
Paper Plane (Part 1)
katiecoart
PRO
0
7.9k
Unsuck your backbone
ammeep
672
58k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
360
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
140
A better future with KSS
kneath
240
18k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Transcript
コンピュータ画像うんちく 2015/11/13 “よや”
[email protected]
自己紹介 • 公開プロフィール h4ps://osdn.jp/users/yoya/ • 職歴 – 富士通:
交換機、IP電話 – IIJ: CDN – i-‐revo(KONAMI系列): 携帯サイト – GREE: SNSアプリ(ゲーム、又は画像周辺) – リタイアして神奈川の片田舎に隠棲中
今日のお話 • デジタル画像のうんちく – 光とは – 視覚 – モニタ表示
– 座標系 – 色空間 – リサイズ補完
光は電磁波の一種 h4ps://www.sugatsune.co.jp/technology/illumi-‐l.php
???
発光 • 物体は温度に応じて電磁波(光)を出す – Jet engine aRerburner test with
DIY Gasturbine • h4ps://www.youtube.com/watch?v=WHEHMFbEH8I
光から温度を測る例 • 刀鍛冶は刀を水で冷やすタイミングを色で判 断した h4p://www.tenki.jp/suppl/yasukogoto/2015/11/08/7561.html
色温度 (モニタ設定のあれ) • 色の応じた電磁波スペクトル (太陽は6000K) h4p://www.thermo-‐lab.com/first/emi4ance/
分光スペクトル • 光の屈折率の違いにより分光できる h4ps://www.nippondenshoku.co.jp/web/japanese/colorstory/05_spectrum.htm
分光分布 • 光源により波長ごとの光の強さが違う h4p://y-‐ok.com/eye/eyesight/eyesight-‐2.html
視覚 (網膜と錐体) • ひとの五感のひとつ。視覚 • 目のセンサー h4p://www.me-‐kaiteki.com/eye-‐mechanism/eye-‐structure/visual-‐cell.html h4p://www.kiriya-‐chem.co.jp/q&a/q52.html
3種類の色しか見ていない • 錐体センサーは3つ (R, G, B) h4p://y-‐ok.com/eye/eyesight/eyesight-‐2.html
条件等色(メタメリズム) • 光のスペクトル分布が近くても R,G,B の錐体 センサーが同じ刺激なら、同じ色に見える h4p://www.konicaminolta.jp/instruments/knowledge/color/part2/08.html
色合成の基本 h4p://www.trickprint.com/trickprint/cmykrgb-‐color.html • 加法混色と減法混色 – 重ねると黒に近づく (インク方式) – 重ねると白に近づく h4p://www.ccs-‐inc.co.jp/s2_ps/s1/s_04/column/light_color/vol16.html
モニタ • 今時の人は RGB が並んでる事を知らない – 昔のモニタは普通にRGBの点が見えた h4p://torano-‐maki.net/capture/custom/monitor.html
R,G,B配列 • R,G,Bの配列で表現するのが自然 – (右側にあるように例外もある) h4ps://www.displaybank.com/_jpn/research/print_contents_m.html?cate=column&id=4228
座標の取り方の違い • 左上を (0, 0) として右下に x, y 展開
(0, 0) (0, 1) (0, 2) (0, 3) (0, 4) (1, 0) (1, 1) (1, 2) (1, 3) (1, 4) (2, 0) (2, 1) (2, 2) (2, 3) (2, 4) (3, 0) (3, 1) (3, 2) (3, 3) (3, 4) (4, 0) (4, 1) (4, 2) (4, 3) (4, 4) (0, 0) (5, 5)
座標の取り方の違い • (2,0) から (2,4)に線を引く (0, 0) (0, 1)
(0, 2) (0, 3) (0, 4) (1, 0) (1, 1) (1, 2) (1, 3) (1, 4) (2, 0) (2, 1) (2, 2) (2, 3) (2, 4) (3, 0) (3, 1) (3, 2) (3, 3) (3, 4) (4, 0) (4, 1) (4, 2) (4, 3) (4, 4) (0, 0) (5, 5) (2, 0) (2, 4)
HTML5 Canvas の例 • アンチエイリアスがかかって結果的にボケる – なので0.5足すというTipsが生まれてる
色空間 • 色は R,G,B の3軸で表現できるので3次元 h4ps://msdn.microsoR.com/ja-‐jp/library/windows/desktop/aa511283.aspx
ゲーテの色彩論 • 色相のはじめ h4ps://ja.wikipedia.org/wiki/色彩論
色票 • マンセル、PCCS h4p://www.toryo.or.jp/cgi-‐bin/SPCSS/search/resources/munsell.html h4p://www.wsj21.net/ghp/ghp0c_03.html
HSV, HSL (CSS でも使える) HSV(HSB), HSL の円錐 (カラーピッカーでお馴染 みの) h4p://www.kanazawa-‐net.ne.jp/~pmansato/wpf/wpf_custom_ColorPicker.htm
YCbCr • テレビ信号、動画、JPEG – 輝度が大事 h4ps://en.wikipedia.org/wiki/YCbCr
リサイズについて • 数が合わないので補完が必要 h4p://csharpimage.blog60.fc2.com/blog-‐entry-‐18.html
リサイズのアルゴリズム (少しだけ) • ImageMagick を例に – h4p://www.imagemagick.org/Usage/filter/ • BOX
• Bilinear • Lanczos, Mitchell
次回予告 • リサイズアルゴリズムの詳細 • 減色アルゴリズム諸々 • 印刷のインクと色合成 (高演色インク等)