// Main VL template
#import "../preamble.typ": *

// Fix theorems to be shown the right way in this document
#import "@preview/ctheorems:1.1.3": *
#show: thmrules

// Main settings call
#show: conf.with(
	// May add more flags here in the future
	num: 6,
	type: 0, // 0 normal, 1 exercise
	date: datetime.today().display(),
	//date: datetime(
	//	year: 2025,
	//	month: 5,
	//	day: 1,
	//).display(),
)

= Uebersicht

E: 26.05.2025

The most important operations are convolution
$
	h (x) =  integral_(-oo) ^(oo)  f (u) g (x -u) d u =  f (x) compose g (x) =  g (x) compose f (x),\
	h (x) =  integral_(-oo) ^(oo)  f (u) g (u - x) d u =  g (x) * f (x).
$

Auto correlation in contrast to the cross correlation
$
	h (x) =  integral_(-oo) ^(oo)  f (u) f (u - x) d u.
$

The Problem for Stereoskpic ist that eyes and cameras project the 3D World onto a 2D surface.

The Procedure is the search algorithm of cross correlation.

This is slow and non neuronal

We left out the epipolar gemoetry here because the eyes are turning when focussing something nearby.

Understand epipolar geometry in the eye and the resulting cross correlation.

= The algorithm for binocular disparity

We take different gabor function which can be expressed in complex numbers
$
	G_(l r) (x) =  (1) / (sqrt(2 pi)sigma)  exp((- (x - x_0 )^2 ) / (2 sigma^2 ) ) e ^(i (k x - phi).
$
Calculate the convolution
$
	M_(l r) (x) =  G_(l r) (x) * f (x).
$
The results from the convolution can be added together and be substracted. This is a bit disorted. Then they are run through
the square function.

Then we get for the 4 cells
$
	S_(1) (x) =  "Real parts added together" \
	S_(3) (x) =  "Imaginary parts added together".
$

The total result from the cell is
$
	C_(l r) (x) =  M_(l) overline(M_(r)).
$
Then the disparity gets calculated as
$
	D = (C_(l r) ) / (sqrt(C_(l) C_(r) )) =  (M_(l) overline(M_(r) )) / (sqrt(M_(l) overline(M_(l)) M_(r) overline(M_(r) ) )) prop exp(i (phi_(l) - phi_(r) )) 
$

#note[
	To check correlation intuitively.\ To correlate two signals mean to shift one signal back and forth relatively to the other and
	see how much they are the same.
]
