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
ココがダメだよWebCamTexture
Search
Masaya Yashiro
June 21, 2017
Technology
0
69
ココがダメだよWebCamTexture
イケてないと悪評高いUnityのWebCamTextureを使ってみたので、ダメな部分を紹介します。
Masaya Yashiro
June 21, 2017
Tweet
Share
More Decks by Masaya Yashiro
See All by Masaya Yashiro
拡大期を迎えたプロダクトに起きたこと - Android編
yashims
0
440
How useful Kotlin/Native in Kotlin 1.3
yashims
0
350
UX design trend 2019
yashims
5
1.5k
Kotlin/MPP getting started and troubles
yashims
0
3.7k
C# code refactoring with Scope Functions
yashims
0
2.7k
Introduction of MaterialDesign for engineer
yashims
0
88
Other Decks in Technology
See All in Technology
Databricks における 『MLOps』
databricksjapan
2
170
自己改善からチームを動かす! 「セルフエンジニアリングマネージャー」のすゝめ
shoota
6
800
MLOpsの「壁」を乗り越える、LINEヤフーの Data Quality as Code
lycorptech_jp
PRO
5
530
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
私が trocco を推す理由
__allllllllez__
1
260
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
640
オーナーシップを持つ領域を明確にする
konifar
13
3.2k
Compose Compiler Metricsを使った実践的なコードレビュー
tomorrowkey
1
220
「スニダン」開発組織の構造に込めた意図 ~組織作りはパッションや政治ではない!~
rinchsan
3
570
Vertex AI を中心に 生成AIのアップデートを共有します
kaz1437
0
310
require(ESM)とECMAScript仕様
uhyo
3
780
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
530
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
RailsConf 2023
tenderlove
4
540
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
20
1.9k
For a Future-Friendly Web
brad_frost
172
9k
Done Done
chrislema
178
15k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Mobile First: as difficult as doing things right
swwweet
216
8.6k
[RailsConf 2023] Rails as a piece of cake
palkan
23
4k
Producing Creativity
orderedlist
PRO
337
39k
Thoughts on Productivity
jonyablonski
58
3.8k
Transcript
ίί͕μϝͩΑ WebCamTexture @yashims85
ήʔϜҎ֎ͰUnity
ήʔϜҎ֎ͰUnity "OESPJEJ04྆ରԠ 6*ΤσΟλ σόΠεػೳ
ͳΜ͔ͩΜͩ ήʔϜҎ֎࡞Γ͍͢
ΧϝϥΞϓϦ
WebCamTextureͱ
WebCamTexture • Unityඪ४ͷσόΠεΧϝϥAPI • Χϝϥͷө૾͕Ϩϯμʔ͞ΕΔTextureͷࢠΫϥε • Android/iOS/Editor্Ͱͳ͘ಈ͘ • ྑ͍ᷚฉ͔ͳ͍ •
ΧϝϥΞηοτങ͏ʹͯ͠ɺҰWebCamTexture ͬͯΈͳ͍ͱͲ͏͍͏ͷ͕ཉ͍͔͔͠Βͳ͍
͍ํ private struct Fhd { public const int Width =
1920; public const int Height = 1080; } private int Fps = 30; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Fhd.Width, Fhd.Height, Fps ); WebCam.Play(); } private void OnDestroy() { WebCam.Stop(); Destroy(WebCam); }
؆୯ͩʔ
ͳΜ͔ΊͬͪΌॏ͍ (ϊʔϚϧͷΧϝϥΞϓϦͱൺͯ)
ͳΜ͔ΊͬͪΌॏ͍ private struct Fhd { public const int Width =
1920; public const int Height = 1080; } private int Fps = 8; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Fhd.Width, Fhd.Height, Fps ); WebCam.Play(); }
·ͩʹΑͬͯॏ͍
·ͩʹΑͬͯॏ͍ private struct Hd { public const int Width =
1280; public const int Height = 720; } private int Fps = 8; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Hd.Width, Hd.Height, Fps ); WebCam.Play(); }
ͳΜ͔Portraitͷ࣌ө૾͕ߥ͍
ͳΜ͔Portraitͷ࣌ө૾͕ߥ͍ private struct Hd { public const int Width =
720; public const int Height = 1280; } private int Fps = 8; private WebCamTexture WebCam { get; set; } void Start() { WebCam = new WebCamTexture( WebCamTexture.devices[0].name, Hd.Width, Hd.Height, Fps ); WebCam.Play(); }
औಘग़དྷΔΞεൺ͕ มΘΒͳ͍ΜͰ͕͢
มΘΒͳ͍Ξεൺ ཉ͍͠Ξεൺ ฦͬͯ͘Δө૾ͷΞεൺ Y ԣ')% Y ԣ')% Y ॎ')% Y
ԣ')% Y ')%ล Y ԣ')% Y )%ล Y ԣ)%
LandscapeͰ͔͠ը૾͕औΕ ͳ͍ͷͰCenterCrop͢Δ͠ ͔ͳ͍
LandscapeͰ͔͠ը૾͕औΕ ͳ͍ͷͰCenterCrop͢Δ͠ ͔ͳ͍
࠷ऴతͳPortraitͷղ૾ • VGA: 640x480 QY QY ࢀߟ
WebCamTextureΫι͞·ͱΊ • VGAҎԼΛ֮ޛ • 15FPS(ྲྀੴʹϠόΠͷͰεϖແࢹ͠ ͯͪΐͬͱͨ͠) • ి৯͏
ͦ͏ͩ AssetΛങ͓͏
NatCamΛങͬͨ • https://www.assetstore.unity3d.com/jp/#!/content/52154 • ͑ͯͳ͍͚Ͳɺ৭ʑߴػೳ • iOS/AndroidରԠ • FaceTrackingͰ͖Δ •
Texture2Dͷอଘαϙʔτ • MovieՄ
݁ՌɺͲ͏͔ͩͬͨ
Ͱ͖ͨ • FPS্͕ • ߴղ૾Ͱॏ͘ͳΒͳ͍ • ফඅిྗݮ
Ͱ͖ͳ͔ͬͨ • औಘղ૾ࢦఆ • 16:9ղ૾͔͠ϓϦηοτͰ༻ҙ͞Εͯͳ ͍ • มߋग़དྷΔ͔ະݕূ
͋Δఔͷ࣭UP
·ͱΊ WebCamTextureΛϞόΠϧͰ͏߹ɺੑ ೳ໘ͰͭΒΈ͕͋Δɻ ͓·͚Ͱ͏ͳΒྑ͍͕ɺओཁػೳͷ߹ AssetΛೖΕͨ΄͏͕ྑ͍ɻ