20150603卒研進捗LT (share)

44
Revenge 1

Transcript of 20150603卒研進捗LT (share)

Page 1: 20150603卒研進捗LT (share)

Revenge

1

Page 2: 20150603卒研進捗LT (share)

me

Jun Kasamatsu mohemohe

mohemohe

内定者研修で出た課題が

とてもつらい

© 2014 Yamato Fujinaka 2

Page 3: 20150603卒研進捗LT (share)

3

Page 4: 20150603卒研進捗LT (share)

近況

4

Page 5: 20150603卒研進捗LT (share)

5

Page 6: 20150603卒研進捗LT (share)

6

w/ WiiU

Page 7: 20150603卒研進捗LT (share)

7

Page 8: 20150603卒研進捗LT (share)

残高ピンチ

8

Page 9: 20150603卒研進捗LT (share)

movie

9

Page 10: 20150603卒研進捗LT (share)

Revenge

10

Page 11: 20150603卒研進捗LT (share)

Revenge

前回のスライド

11http://www.slideshare.net/mohemohe/20150527lt-share

Page 12: 20150603卒研進捗LT (share)

WebcamRT

俺が考えた最強の

Web カメラ操作

ライブラリ12http://www.slideshare.net/mohemohe/20150527lt-share

Page 13: 20150603卒研進捗LT (share)

WebcamRT

WebcamRT

13http://www.slideshare.net/mohemohe/20150527lt-share

Page 14: 20150603卒研進捗LT (share)

WebcamRT

demo

14http://www.slideshare.net/mohemohe/20150527lt-share

Page 15: 20150603卒研進捗LT (share)

WebcamRT

demo

15http://www.slideshare.net/mohemohe/20150527lt-share

Page 16: 20150603卒研進捗LT (share)

WebcamRT

今回はやります

16

Page 17: 20150603卒研進捗LT (share)

WebcamRT

demo

17

Page 18: 20150603卒研進捗LT (share)

スコープの範囲

why?

18

Page 19: 20150603卒研進捗LT (share)

スコープの範囲public async Task<Bitmap> GetBitmap(){ if (!_initialized) { throw new DeviceNotInitializedException(); }

Bitmap bitmap; using (var ras = new InMemoryRandomAccessStream()) { await _capture.CapturePhotoToStreamAsync(ImageEncodingProperties.CreatePng(), ras); ras.Seek(0); bitmap = new Bitmap(ras.AsStream()); } return bitmap;}

19

Page 20: 20150603卒研進捗LT (share)

スコープの範囲public async Task<Bitmap> GetBitmap(){ if (!_initialized) { throw new DeviceNotInitializedException(); }

Bitmap bitmap; Stream stream; using (var ras = new InMemoryRandomAccessStream()) { await _capture.CapturePhotoToStreamAsync(ImageEncodingProperties.CreatePng(), ras); ras.Seek(0); stream = ras.AsStream(); } bitmap = new Bitmap(stream); return bitmap;}

20

Page 21: 20150603卒研進捗LT (share)

スコープの範囲

using () {}IDisposable

21

Page 22: 20150603卒研進捗LT (share)

スコープの範囲

using () {}IDisposable

22

Page 23: 20150603卒研進捗LT (share)

スコープの範囲

C# のオブジェクト指向• var hogeHuga = new HogeHuga();

• hogeHuga.Dispose();

23

Page 24: 20150603卒研進捗LT (share)

スコープの範囲

C# のオブジェクト指向class HogeHuga : FooBar, IDisposable

24

Page 25: 20150603卒研進捗LT (share)

スコープの範囲

C# のオブジェクト指向class HogeHuga : FooBar, IDisposable

using (var hogeHuga = new HogeHuga())

{

hogehuga.Do();

} // ここで自動的に Dispose() される

25

Page 26: 20150603卒研進捗LT (share)

スコープの範囲public async Task<Bitmap> GetBitmap(){ if (!_initialized) { throw new DeviceNotInitializedException(); }

Bitmap bitmap; Stream stream; using (var ras = new InMemoryRandomAccessStream()) { await _capture.CapturePhotoToStreamAsync(ImageEncodingProperties.CreatePng(), ras); ras.Seek(0); stream = ras.AsStream(); // ras のメモリアドレスを参照しているだけ } // ここで Dispose() されて stream が null になる bitmap = new Bitmap(stream); // null から Bitmap を生成できなくて死ぬ return bitmap;}

26

Page 27: 20150603卒研進捗LT (share)

スコープの範囲public async Task<Bitmap> GetBitmap(){ if (!_initialized) { throw new DeviceNotInitializedException(); }

Bitmap bitmap; using (var ras = new InMemoryRandomAccessStream()) { await _capture.CapturePhotoToStreamAsync(ImageEncodingProperties.CreatePng(), ras); ras.Seek(0); bitmap = new Bitmap(ras.AsStream()); // スコープ外の bitmap に Bitmap オブジェクトを作っておく } return bitmap; // ras は使っていないので Dispose() されても OK}

27

Page 28: 20150603卒研進捗LT (share)

WebcamRT

done is better

than perfect.

28

Page 29: 20150603卒研進捗LT (share)

WebcamRT

done is better

than perfect.

29

Page 30: 20150603卒研進捗LT (share)

WebcamRT

クッソ遅い

30

Page 31: 20150603卒研進捗LT (share)

Windows 8.1

LowLagPhotoCapture

ClassWindows 8.1

31

Page 32: 20150603卒研進捗LT (share)

32

Page 33: 20150603卒研進捗LT (share)

Windows 8.1

ナウでヤングな若者のための

最高にロックな

低シャッター遅延フォト

33

Page 34: 20150603卒研進捗LT (share)

WebcamRT

demo

34

Page 35: 20150603卒研進捗LT (share)

WebcamRT

demo

35

Page 36: 20150603卒研進捗LT (share)

WebcamRT

why?

36

Page 37: 20150603卒研進捗LT (share)

37

Page 38: 20150603卒研進捗LT (share)

WebcamRT

BitmapImage

Bitmap38

Page 39: 20150603卒研進捗LT (share)

WebcamRT

BitmapImage

Bitmap39

Page 40: 20150603卒研進捗LT (share)

WebcamRT

BitmapFrame.Create(

)

40

Page 41: 20150603卒研進捗LT (share)

41

Page 42: 20150603卒研進捗LT (share)

WebcamRT

なぜかできない

42

Page 43: 20150603卒研進捗LT (share)
Page 44: 20150603卒研進捗LT (share)

agenda

• WebcamRT

• スコープの範囲

• ナウでヤングな若者のための最高にロックな低シャッター遅延フォト

44