Скачать презентацию Multimedia Programming 21 Video and its applications Departments Скачать презентацию Multimedia Programming 21 Video and its applications Departments

ae1cf3c7e57e9eff470bb663676216d9.ppt

  • Количество слайдов: 56

Multimedia Programming 21: Video and its applications Departments of Digital Contents Sang Il Park Multimedia Programming 21: Video and its applications Departments of Digital Contents Sang Il Park Lots of Slides are stolen from Alexei Efros, CMU

Announcement • Term Project 중간발표 • 각 조당 15분 (시간 엄수) • 11월 22일(목요일) Announcement • Term Project 중간발표 • 각 조당 15분 (시간 엄수) • 11월 22일(목요일) – 2반 2 -1조 2 -2조 2 -4조 2 -5조 2 -8조 – 1반 1 -2조 1 -3조 1 -6조 1 -7조 1 -9조 • 11월 27일(화요일) – 2반 2 -3조 2 -6조 2 -7조 2 -9조 2 -10조 – 1반 1 -1조 1 -4조 1 -5조 1 -8조

Outline • Review: Open. CV Video I/O • Video Texture Outline • Review: Open. CV Video I/O • Video Texture

Open. CV Video I/O • Open. CV의 Video Reading Functions • • Cv. Capture Open. CV Video I/O • Open. CV의 Video Reading Functions • • Cv. Capture cv. Capture. From. File cv. Capture. From. CAM cv. Release. Capture cv. Query. Frame cv. Get. Capture. Property cv. Set. Capture. Property

Open. CV Video I/O • Open. CV의 Video Writing Functions • cv. Create. Video. Open. CV Video I/O • Open. CV의 Video Writing Functions • cv. Create. Video. Writer • cv. Release. Video. Writer • cv. Write. Frame

날씨 예보는 어떻게 할까? 일기예보문제: • 오늘의 날씨를 알 때, 내일의 날씨를 알고 싶다 날씨 예보는 어떻게 할까? 일기예보문제: • 오늘의 날씨를 알 때, 내일의 날씨를 알고 싶다 • 날씨가 오직 {Sunny(맑음), Cloudy(흐림), Raining(비)} 만 있다 면… The “Weather Channel” algorithm: • 긴 세월 동안 기록해 놓은 것: – 비(R) 온 다음날에 얼마나 자주 맑음(S)이었나 – 맑은 날(S) 뒤에 얼마나 자주 자주 맑음(S)이었나 – Etc. • 각각의 상태에 대해 확률(%)를 계산한다. : – P(R|S), P(S|S), etc. • 오늘의 날씨에 대비해 내일의 날씨는 이 확률 중 가장 높은 것! It’s a Markov Chain

Markov Chain 만약 오늘과 어제의 날씨를 알고 있다면? Markov Chain 만약 오늘과 어제의 날씨를 알고 있다면?

문장 합성 [Shannon, ’ 48] 은 N-gram을 이용한 ‘영어같은’ 문장 만드는 법을 개발했다: • 문장 합성 [Shannon, ’ 48] 은 N-gram을 이용한 ‘영어같은’ 문장 만드는 법을 개발했다: • Markov model을 일반화 • 아주 많은 문서들을 분석하여 N-1 개의 글자가 주어졌 을 때 그 뒤에 붙을 수 있는 글자들을 각 각의 글자들의 확률로 계산 • 첫 글자로 시작하여 Markov chain을 돌며 확률적으로 선택 • 글자 단위가 아니라 단어 단위로도 적용 가능 WE NEED TO EAT CAKE

Mark V. Shaney (Bell Labs) Results (alt. singles 의 글들로 훈련): • “One morning Mark V. Shaney (Bell Labs) Results (alt. singles 의 글들로 훈련): • “One morning I shot an elephant in my arms and kissed him. ” • “I spent an interesting evening recently with a grain of salt” 개그 콘서트의 “애드리부라더스” 와 비슷

Video Textures Arno Schödl Richard Szeliski David Salesin Irfan Essa Microsoft Research, Georgia Tech Video Textures Arno Schödl Richard Szeliski David Salesin Irfan Essa Microsoft Research, Georgia Tech

Still photos Still photos

Video clips Video clips

Video textures Video textures

Problem statement video clip video texture Problem statement video clip video texture

Our approach • How do we find good transitions? Our approach • How do we find good transitions?

Finding good transitions • Compute L 2 distance Di, j between all frames vs. Finding good transitions • Compute L 2 distance Di, j between all frames vs. frame i frame j Similar frames make good transitions

Markov chain representation Similar frames make good transitions Markov chain representation Similar frames make good transitions

Transition costs • Transition from i to j if successor of i is similar Transition costs • Transition from i to j if successor of i is similar to j • Cost function: Ci j = Di+1, j •

Transition probabilities • Probability for transition Pi j inversely related to cost: • Pi Transition probabilities • Probability for transition Pi j inversely related to cost: • Pi j ~ exp ( – Ci j / 2 ) high low

Preserving dynamics Preserving dynamics

Preserving dynamics Preserving dynamics

Preserving dynamics • Cost for transition i j • Ci j = wk Di+k+1, Preserving dynamics • Cost for transition i j • Ci j = wk Di+k+1, j+k

Preserving dynamics – effect • Cost for transition i j • Ci j = Preserving dynamics – effect • Cost for transition i j • Ci j = wk Di+k+1, j+k

Dead ends • No good transition at the end of sequence Dead ends • No good transition at the end of sequence

Future cost • Propagate future transition costs backward • Iteratively compute new cost • Future cost • Propagate future transition costs backward • Iteratively compute new cost • Fi j = Ci j + mink Fj k

Future cost • Propagate future transition costs backward • Iteratively compute new cost • Future cost • Propagate future transition costs backward • Iteratively compute new cost • Fi j = Ci j + mink Fj k

Future cost • Propagate future transition costs backward • Iteratively compute new cost • Future cost • Propagate future transition costs backward • Iteratively compute new cost • Fi j = Ci j + mink Fj k

Future cost • Propagate future transition costs backward • Iteratively compute new cost • Future cost • Propagate future transition costs backward • Iteratively compute new cost • Fi j = Ci j + mink Fj k

Future cost • Propagate future transition costs backward • Iteratively compute new cost • Future cost • Propagate future transition costs backward • Iteratively compute new cost • Fi j = Ci j + mink Fj k • Q-learning

Future cost – effect Future cost – effect

Finding good loops • Alternative to random transitions • Precompute set of loops up Finding good loops • Alternative to random transitions • Precompute set of loops up front

Visual discontinuities • Problem: Visible “Jumps” Visual discontinuities • Problem: Visible “Jumps”

Crossfading • Solution: Crossfade from one sequence to the other. Crossfading • Solution: Crossfade from one sequence to the other.

Morphing • Interpolation task: Morphing • Interpolation task:

Morphing • Interpolation task: • Compute correspondence between pixels of all frames Morphing • Interpolation task: • Compute correspondence between pixels of all frames

Morphing • Interpolation task: • Compute correspondence between pixels of all frames • Interpolate Morphing • Interpolation task: • Compute correspondence between pixels of all frames • Interpolate pixel position and color in morphed frame • based on [Shum 2000]

Results – crossfading/morphing Results – crossfading/morphing

Results – crossfading/morphing Jump Cut Crossfade Morph Results – crossfading/morphing Jump Cut Crossfade Morph

Crossfading Crossfading

Frequent jump & crossfading Frequent jump & crossfading

Video portrait Useful for web pages Video portrait Useful for web pages

Video portrait – 3 D Combine with IBR techniques Video portrait – 3 D Combine with IBR techniques

Region-based analysis • Divideo up into regions • Generate a video texture for each Region-based analysis • Divideo up into regions • Generate a video texture for each region

Automatic region analysis Automatic region analysis

User-controlled video textures slow variable User selects target frame range fast User-controlled video textures slow variable User selects target frame range fast

Time warping shorter original longer Lengthen / shorten video without affecting speed Time warping shorter original longer Lengthen / shorten video without affecting speed

Video-based animation • Like sprites computer games • Extract sprites from real video • Video-based animation • Like sprites computer games • Extract sprites from real video • Interactively control desired motion © 1985 Nintendo of America Inc.

Video sprite extraction Video sprite extraction

Video sprite control • Augmented transition cost: Video sprite control • Augmented transition cost:

Video sprite control • Need future cost computation • Precompute future costs for a Video sprite control • Need future cost computation • Precompute future costs for a few angles. • Switch between precomputed angles according to user input • [GIT-GVU-00 -11]

Interactive fish Interactive fish

Summary • Video clips video textures • • define Markov process preserve dynamics avoid Summary • Video clips video textures • • define Markov process preserve dynamics avoid dead-ends disguise visual discontinuities

Summary • Extensions • regions • external constraints • video-based animation Summary • Extensions • regions • external constraints • video-based animation

Discussion • Some things are relatively easy Discussion • Some things are relatively easy

Discussion • Some are hard Discussion • Some are hard

A final example A final example