[CV] Motion Field vs. Optical Flow

2024. 7. 18. 19:50·Programming/DIP
728x90
728x90

Motion Field

Motion field는 시간에 따른 Object의 실제 이동을 나타내는 vector field임.

  • Motion field는 3D 공간의 실제 움직임이 카메라 이미지 평면에 투영된 결과
    • Motion Field는 image plane에 3D 동작(motion)을 투영한 결과임.
  • Motion field는 이미지 상의 모든 점의 위치 변화율, 즉 시간에 따른 이미지 좌표의 변화로 정의됨.
    • 이는 각 이미지 점의 속도 벡터로 해석될 수 있음.
    • 이는 scene(장면) 내 모든 point들의 실제 물리적인 속도와 방향을 vector로 나타냄.
    • 이미지 상의 모든 점에서의 벡터들의 모임이니, vector를 item으로 가지는 matrix.

따라서 motion field는 실제 물리적 공간에서의 물체의 움직임을 반영하며 각 지점에서의 veclocity vector (속도 벡터)로 구성됨.
이는 카메라의 움직임, 물체의 움직임, 또는 둘 다를 포함할 수 있음.


위 그림에서 $\mathbf{p}_o$가 $dt$ 시간 동안 $\delta \mathbf{r}_o$로 3D scene에서 이동한 경우를 보여주며

3D scene의 $\mathbf{p}_o$에서의 실제 velocity $\mathbf{v}_o$는 다음과 같이 정의된다.

$$\mathbf{v}_o = \dfrac{d\mathbf{r}_o}{dt}$$

image plane 상의 point $\mathbf{p}_i$에서 velocity $\mathbf{v}_i$는 다음과 같다.

$$\mathbf{v}_i = \dfrac{d\mathbf{r}_i}{dt}$$

위의 projection에서 다음이 성립.

$$\mathbf{r}_i = f\frac{\mathbf{r}_o}{\mathbf{r}_o \cdot \mathbf{z}}$$

where

  • $f$ : the focal length
  • $\mathbf{z}$ : a unit vector collinear to the optical axis.
더보기

$\textbf{p}_\text{o}$ 가 image plane에서 $\mathbf{p}_\text{i}$이므로, 
pinhole에서 $\text{w}_\text{i}$와 거리는 $f$이며,

$\textbf{p}_\text{i}=(f/z_o)\textbf{p}_\text{o}=(f/ (\mathbf{p}_o \cdot \mathbf{z})) \textbf{p}_\text{o}$
가 성립함.
$z_o$는 pinhole과 $\text{w}_\text{o}$간의 거리임.

https://dsaint31.tistory.com/761

 

[CV] Perspective Projection (원근 투영법): Camera to Image

Perspective Projection 3D 물체를 2D 평면에 투영하는 방법 중 하나를 의미함.  이는 컴퓨터 그래픽스, 디자인, 건축 등에서 주로 사용됨.기술적 정의:Perspective Projection은 원근법을 적용하여 3D 공간에

dsaint31.tistory.com


The Quotient rule of defferentiation을 적용하면 다음이 성립함.
$$ \begin{aligned}\mathbf{v}_i = \dfrac{d\mathbf{r}_i}{dt} &= f \dfrac{ \frac{d\mathbf{r}_o}{dt}(\mathbf{r}_o \cdot \mathbf{z}) - \mathbf{r}_o \frac{d (\mathbf{r}_o \cdot \mathbf{z})}{dt}}{(\mathbf{r}_o \cdot \mathbf{z})^2} \\ &= f \dfrac{ \mathbf{v}_o (\mathbf{r}_o \cdot \mathbf{z}) - \mathbf{r}_o(\mathbf{v}_o \cdot \mathbf{z})}{(\mathbf{r}_o \cdot \mathbf{z})^2}\end{aligned}$$

더보기

2024.02.28 - [.../Math] - [Math] The Key Rules of Differentiation

 

[Math] The Key Rules of Differentiation

The Key Rules of Differentiation 1. Power rule (다항식의 미분에 핵심) If $f(x)=x^n$, where $n \in \mathbb{R}$, then the derivative of $f$ with respect to $x$ is $f^\prime(x)=nx^{n-1}$. 2. Constant rule if $f(x)=c$ where $c \in \mathbb{R}$ and cons

dsaint31.tistory.com


여기에 the vector triple product identity를 적용하면 다음과 같이 cross product의 형태로 바꿀 수도 있음.
$$\mathbf{v}_i = f \dfrac{(\mathbf{r}_o \times \mathbf{v}_o) \times \mathbf{z}}{(\mathbf{r}_o\cdot \mathbf{z})^2}$$

더보기

https://en.wikipedia.org/wiki/Triple_product

 

Triple product - Wikipedia

From Wikipedia, the free encyclopedia Ternary operation on vectors "Signed volume" redirects here. For autographed books, see Bibliophilia. In geometry and algebra, the triple product is a product of three 3-dimensional vectors, usually Euclidean vectors.

en.wikipedia.org


여기서 $\mathbf{v}_i$가 Motion Field에서 해당하는 point $\mathbf{p}_i$가 가지는 vector이며,
$\mathbf{p}_o$의 velocity와 position에 영향을 받는다는 것을 위의 식으로 알 수 있다.

하지만, Motion Field는 직접 측정할 수 없고, 특정 조건 하에서 Optical Flow 등을 통해 추정되어짐.


Optical Flow

Optical flow는 연속적인 이미지 프레임 간의 "Brightness(밝기) 패턴 변화" (= intensity의 변화)를 분석하여 계산한 vector field임.

  • 이는 각 이미지 픽셀이 어떻게 움직이는지(즉, 다음 프레임에서 어디로 이동하는지)를 추정하는데 이용됨.
  • Optical flow는 픽셀 단위의 움직임을 추정하는 것임.

다음과 같이 이미지 프레임간에 계산된 Optical Flow는 다음과 같음.

 


주의할 점은,

Optical Flow는 카메라의 움직임이나 장면 내 물체의 움직임을 반영할 수 있으나, motion field와 동일하지 않음
(아주 제한된 조건에선 일치할 수 있으나 동일하지 않는 경우가 더 일반적임).

때문에
image 상에서 겉으로 드러나는 intensity pattern의 motion
(the apparent motion of itensity patterns)라고도 불림.

 

다음 그림은 barber-pole illusion으로 Motion field와 Optical flow가 다를 수 있음을 보여줌.

  • barber-pole이 수직축을 따라 회전하는것이 실제 움직임이지만, (Motion Field)
  • image에서의 intensity pattern의 변화는 수직방향으로 이동함. (Optical Flow)

다른 예로는 Donguri Wave Illusion임.

위의 도토리(Donguri)는 움직이지 않으나, 파도처럼 움직이는 것처럼 보임. http://www.bigshotcamera.com/fun/illusions/dongurakokko

 


관계

  1. 정의의 차이:
    • Motion field는 실제 물체의 물리적 이동을 의미하는 반면,
    • optical flow는 연속된 이미지 프레임에서 관찰된 밝기 패턴의 변화를 기반으로 한 움직임의 추정치(?)에 불과함.
  2. 직접적인 대응:
    • 이상적으로, motion field와 optical flow는 일치할 수 있음.
    • 하지만 실제로는 여러 요인으로 인해 차이가 발생할 수 있음.
  3. 불일치의 원인: Optical flow는 여러 가지 이유로 motion field와 다를 수 있음.
    • 텍스처의 부족: 장면의 일부가 균일한 색상이나 텍스처를 가지면 optical flow를 정확히 계산하기 어려움.
    • 밝기 변화: 광원의 변화로 인해 밝기가 변할 경우, 이는 실제 물체의 이동이 아님에도 불구하고 optical flow에 영향을 줄 수 있음.
    • 속도 제한: 카메라 프레임 간격이 충분히 작지 않으면 빠르게 움직이는 물체의 이동을 정확히 추정하기 어려움.
  4. 응용 분야:
    • Optical flow는 컴퓨터 비전, 영상 안정화, 객체 추적 등의 분야에서 많이 사용됨.
    • 반면 motion field는 로보틱스, 자율 주행, 운동 분석 등에서 중요하게 다뤄짐.

같이보면 좋은 자료들

https://www.baeldung.com/cs/motion-field-optical-flow

 

Motion Field and Optical Flow | Baeldung on Computer Science

Explore the motion field and the optical flow, two fundamental notions in computer vision.

www.baeldung.com

https://youtu.be/fLzhaY90ym4?si=C_DEq8qMyCKARkb4

 

https://searching-fundamental.tistory.com/16

 

[CV/Optical Flow] Motion Field vs Optical Flow

Intro 이전 포스트에서 Optical Flow의 단서를 찾았다. 정확히 말하면 컴퓨터가 사람처럼 물체의 움직임을 인지하도록 만들 단서를 찾았다. 그러면 Optical Flow 계산만 남은 것일까? 진정 Computer는 사람

searching-fundamental.tistory.com

 


 

 

'Programming > DIP' 카테고리의 다른 글

[CV] Ideal Pinhole Size  (0) 2024.08.09
[CV] Hungarian Algorithm: Matching on the Bipartite Graph  (0) 2024.08.06
[CV] Depth Camera (or Active Sensor): Structured Light  (1) 2024.07.18
[CV] Depth Cameras  (1) 2024.07.17
[CV] Hartley’s Normalization  (1) 2024.07.17
'Programming/DIP' 카테고리의 다른 글
  • [CV] Ideal Pinhole Size
  • [CV] Hungarian Algorithm: Matching on the Bipartite Graph
  • [CV] Depth Camera (or Active Sensor): Structured Light
  • [CV] Depth Cameras
dsaint31x
dsaint31x
    반응형
    250x250
  • dsaint31x
    Dsaint31's blog
    dsaint31x
  • 전체
    오늘
    어제
    • 분류 전체보기 (740)
      • Private Life (13)
      • Programming (56)
        • DIP (104)
        • ML (26)
      • Computer (119)
        • CE (53)
        • ETC (33)
        • CUDA (3)
        • Blog, Markdown, Latex (4)
        • Linux (9)
      • ... (351)
        • Signals and Systems (103)
        • Math (172)
        • Linear Algebra (33)
        • Physics (42)
        • 인성세미나 (1)
      • 정리필요. (54)
        • 의료기기의 이해 (6)
        • PET, MRI and so on. (1)
        • PET Study 2009 (1)
        • 방사선 장해방호 (4)
        • 방사선 생물학 (3)
        • 방사선 계측 (9)
        • 기타 방사능관련 (3)
        • 고시 (9)
        • 정리 (18)
      • RI (0)
      • 원자력,방사능 관련법 (2)
  • 블로그 메뉴

    • Math
    • Programming
    • SS
    • DIP
  • 링크

    • Convex Optimization For All
  • 공지사항

    • Test
    • PET Study 2009
    • 기타 방사능관련.
  • 인기 글

  • 태그

    fourier transform
    math
    Term
    Vector
    signal_and_system
    opencv
    random
    Probability
    signals_and_systems
    Programming
    검사
    Convolution
    linear algebra
    Optimization
    function
    numpy
    SIGNAL
    Python
    SS
    인허가제도
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
dsaint31x
[CV] Motion Field vs. Optical Flow
상단으로

티스토리툴바