Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ポートレートモードを自作しよう / Making Portrait mode yourself

神武
March 22, 2019

ポートレートモードを自作しよう / Making Portrait mode yourself

try! Swift 2019 Tokyo 5min

最近のiPhoneはデュアルカメラやTrueDepthカメラの搭載により、深度情報を利用して背景をぼかし、被写体を際立たせた美しい写真を撮影することができます。
このトークでは、「深度情報を持たない」画像から背景と被写体を分離してぼかすポートレートモードをゴリゴリ自作して、美しい写真を仕上げていく過程をお話しします。

HP: https://www.tryswift.co/events/2019/tokyo/jp/
Demo App: https://github.com/koooootake/Portrait-without-Depth-ios
note: https://note.mu/koooootake/n/n7fb25676359f

神武

March 22, 2019
Tweet

More Decks by 神武

Other Decks in Technology

Transcript

  1. .BLJOH1PSUSBJUNPEFZPVSTFMG!
    ϙʔτϨʔτϞʔυΛࣗ࡞͠Α͏

    View full-size slide

  2. !LPPPPPUBLF
    ਆ෢

    View full-size slide

  3. 1PSUSBJUNPEF!

    View full-size slide

  4. :PVDBOUBLFCFBVUJGVMQIPUPT✨
    UIBULFFQZPVSTVCKFDUTIBSQXIJMFCMVSSJOHUIFCBDLHSPVOE
    #FGPSF
    ඃࣸମΛ
    ࡍཱͨͤΔ
    എܠΛ
    ϘΧ͢

    View full-size slide

  5. :PVDBOUBLFCFBVUJGVMQIPUPT✨
    UIBULFFQZPVSTVCKFDUTIBSQXIJMFCMVSSJOHUIFCBDLHSPVOE
    #FGPSF
    "GUFS
    ඃࣸମΛ
    ࡍཱͨͤΔ
    എܠΛ
    ϘΧ͢

    View full-size slide

  6. 1PSUSBJUNPEFVUJMJ[FTJOGPSNBUJPOPO%FQUI
    5IFEJTUBODFCFUXFFOZPVSWJFXQPJOUBOEFBDIPCKFDU
    ਂ౓৘ใΛ׆༻

    View full-size slide

  7. XJUIPVU%FQUI

    View full-size slide

  8. *❤DIBSBDUFST
    GSPNBOJNF$ NBOHB%BOEHBNFT&

    View full-size slide

  9. *XBOUUPNBLFCFBVUJGVM%JNBHFT'
    ೋ࣍ݩը૾Λө͍͑ͤͨ͞

    View full-size slide

  10. *`WFEFDJEFEUPDSFBUFBOJ04BQQ
    UIBUXJMMNBLF%JNBHFT
    XJUIPVU%FQUI
    JOUP1PSUSBJUNPEF(
    ೋ࣍ݩө͑ΞϓϦ࡞Δͧ(

    View full-size slide

  11. 4FHNFOUBUJPO✂
    4VCKFDU #BDLHSPVOE
    ඃࣸମͱഎܠͷ෼཭

    View full-size slide

  12. 8JUI%FQUI ZPVDBOFBTJMZTFHNFOU+

    View full-size slide

  13. 8JUIPVU%FQUI DBOXFVUJMJ[FEFFQMFBOJOH
    .BTL3$//,BJNJOH)F (FPSHJB(LJPYBSJ 1JPUS%PMMBS 3PTT(JSTIJDL*$$7
    FY.BTL3$//

    View full-size slide

  14. 8JUIPVU%FQUI DBOXFVUJMJ[FEFFQMFBOJOH
    .BTL3$//,BJNJOH)F (FPSHJB(LJPYBSJ 1JPUS%PMMBS 3PTT(JSTIJDL*$$7
    FY.BTL3$//

    View full-size slide

  15. *UEJEOPUHPXFMM,
    /PEPHHP-

    View full-size slide

  16. %FFQMFBSOJOHIBTUPMFBSOBMMDIBSBDUFST
    *U`TVOSFBMJTUJD.
    "NCJHVPVT
    ᐆດ/ ωί͓͓͓0
    $BUDBO`UCFEFUFDUFE

    View full-size slide

  17. $IBOHFBQQSPBDI1

    View full-size slide

  18. (SBC$VU
    (SBC$VUJOUFSBDUJWFGPSFHSPVOEFYUSBDUJPOVTJOHJUFSBUFEHSBQIDVUT
    $BSTUFO3PUIFS 7MBEJNJS,PMNPHPSPW "OESFX#MBLF4*((3"1)
    4FHNFOUBUJPOBMHPSJUIN

    View full-size slide

  19. -FUNFEFNPOTUSBUF(

    View full-size slide

  20. 8JUIUIF(BVTTJBO#MVSPOUIFCBDLHSPVOE

    View full-size slide

  21. 5IFTFHNFOUJTBCJUPGG3

    View full-size slide

  22. "EEJUJPOBMSFUPVDIJOH2

    View full-size slide

  23. 4FHNFOUBUJPO✂
    #FGPSF ✨"GUFS✨

    View full-size slide

  24. .PSFCFBVUJGVM((

    View full-size slide

  25. $PMPSMFBLQSFWFOUJPO5
    ৭࿙ΕΛ๷͙
    5IFCMBDLDPMPSPGIBJSMFBLTJOUPUIFCBDLHSPVOE/

    View full-size slide

  26. *OQBJOUJOH
    "O*NBHF*OQBJOUJOH5FDIOJRVF#BTFEPOUIF'BTU.BSDIJOH.FUIPE
    "MFYBOESV5FMFB+PVSOBMPG(SBQIJDT5PPMT
    3FDPOTUSVDUJPOBMHPSJUIN

    View full-size slide

  27. *OQBJOUJOH
    #FGPSF

    View full-size slide

  28. *OQBJOUJOH
    "GUFS

    View full-size slide

  29. 5IFTVCKFDUJTOPUBGGFDUFECZUIFCBDLHSPVOE
    #FGPSF ✨"GUFS✨
    $PMPSMFBLQSFWFOUJPO5

    View full-size slide

  30. ✨"GUFS✨
    5IFTVCKFDUJTOPUBGGFDUFECZUIFCBDLHSPVOE
    #FGPSF
    $PMPSMFBLQSFWFOUJPO5

    View full-size slide

  31. .PSF .PSFCFBVUJGVM(((

    View full-size slide

  32. %FQUIPG'JFME7
    ඃࣸքਂ౓
    5IFSBOHFXIFSFUIFQIPUPJTJOGPDVT
    IUUQDBNFSBXFCKQCFHJOOFSEFQUIPGpFME

    View full-size slide

  33. :PVDBOBEKVTU%FQUIPG'JFME
    *G%FQUI %JTQBSJUZ
    JTBWBJMBCMF+
    4ZOUIFUJD%FQUIPG'JFMEXJUIB4JOHMF$BNFSB.PCJMF1IPOF
    (PPHMF3FTFBSDI4*((3"1)

    View full-size slide

  34. $IBOHFBQQSPBDI1

    View full-size slide

  35. "EKVTUJOHGVODUJPOUPCMVSBOBSFB1

    View full-size slide

  36. "EKVTUJOHGVODUJPOUPCMVSBOBSFB2

    View full-size slide

  37. %FQUIPG'JFME7
    #FGPSF "GUFS

    View full-size slide

  38. $PNCJOF
    4FHNFOUBUJPO✂
    $PMPSMFBLQSFWFOUJPO5
    %FQUIPG'JFME7

    View full-size slide

  39. #FBVUJGVM%JNBHFT✨
    #FGPSF

    View full-size slide

  40. #FBVUJGVM%JNBHFT✨
    "GUFS

    View full-size slide

  41. #FBVUJGVM%JNBHFT✨
    #FGPSF ✨"GUFS✨
    *NGFFMJOHWFSZTBUJTpFE
    8େຬ଍8

    View full-size slide

  42. 8PSLTPOSFBMQIPUPTUPP✨
    .Z"QQXJUIPVU%FQUI J1IPOF94XJUI%FQUI

    View full-size slide

  43. #FBVUJGVM%JNBHFT✨
    #FGPSF "GUFS
    ʰϋφΧΫʱ

    View full-size slide

  44. #FBVUJGVM%JNBHFT✨
    #FGPSF "GUFS
    ʰϋφΧΫʱ

    View full-size slide

  45. IUUQTHJUIVCDPNLPPPPPUBLF
    1PSUSBJUXJUIPVU%FQUIJPT
    %FNP"QQ

    View full-size slide

  46. !LPPPPPUBLF
    ਆ෢

    View full-size slide