> For the complete documentation index, see [llms.txt](https://capellac.gitbook.io/opencv/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://capellac.gitbook.io/opencv/week2/udacity-computer-vision/hierarchial-lk.md).

# 6B-L3:HIERARCHIAL LK

## Reduce the Resolution

* Optical Flow: Aliasing

<div align="left"><img src="/files/-MA_hGkHRivzuu4Mj5pR" alt="                                                                 Aliasing"></div>

{% hint style="success" %}
Imagine that our object is moving 7 pixels, estimating the motion is harder than moving 1 pixel. Hovewer, what if we reduce the resolution?&#x20;
{% endhint %}

## Multi Scale

![](/files/-MA_jfN4qe1kD8znDBDN)

## Image Sub Sampling

{% hint style="danger" %}
If we use the below technique and if we zoom to the last picture and resize it, It might look like blurring effect but this is not we want it is just **aliasing.**
{% endhint %}

![](/files/-MA_m3ZaJJ17dFnrflSb)

![](/files/-MA_p0jXD6LXsTqc0rIH)

{% hint style="success" %}
**SOLUTION:** Filter the image then subsample like below.
{% endhint %}

![](/files/-MA_mkZyE8USzS-uYEMM)

## Image Pyramids

<div align="left"><img src="/files/-MAeiATU6du6UDLBqwCn" alt=""></div>

## Computing The Laplacian Pyramid

![](/files/-MAejsWV6g82rcqjh4Z6)

![](/files/-MAejgSX02NE9Fwa_LFI)

## Apples and Oranges (Blending)

![](/files/-MAepfaLvHo3qRWM3auD)

## Start with Something similar to Lucas-Kanade

* Gradient constancy
* region matching
* energy minimization with smoothing term
* keypoint matching (long-range)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://capellac.gitbook.io/opencv/week2/udacity-computer-vision/hierarchial-lk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
