20.01.2013 Views

motion estimation and compensation for very low bitrate video coding

motion estimation and compensation for very low bitrate video coding

motion estimation and compensation for very low bitrate video coding

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

202 Chapter D. Complements to Chapter 5<br />

}<br />

reference_triangle(VertOrigin, HoriOrigin, wF, Top1V,Top1H,<br />

Top2V,Top2H,Top3V,Top3H);<br />

/* Compute the invariants p <strong>and</strong> q of the related affine<br />

trans<strong>for</strong>m */<br />

Heigh_12 = Top2V - Top1V;<br />

Width_12 = Top2H - Top1H;<br />

Height_13 = Top3V - Top1V;<br />

Width_13 = Top3H - Top1H;<br />

denominator = Height_12 * Width_13 - Width_12 * Height_13;<br />

p = Height_13*(Top1H-HoriOrigin)+Width_13*(VertOrigin-Top1V);<br />

q = Height_12*(HoriOrigin-Top1H)+Width_12*(Top1V-VertOrigin);<br />

p /= denominator;<br />

q /= denominator;<br />

/* Insert the equation in the system */<br />

// vertical component of the vector<br />

A[i*2+1][indice_of_top1]= (double)1-p-q;<br />

A[i*2+1][indice_of_top2]= p;<br />

A[i*2+1][indice_of_top3]= q;<br />

// horizontal component of the vector<br />

A[i*2+1+1][indice_of_top1]= (double)1-p-q;<br />

A[i*2+1+1][indice_of_top2]= p;<br />

A[i*2+1+1][indice_of_top3]= q;<br />

// independent term<br />

b[i*2+1] = -vertical_component(mField, i);<br />

b[i*2+1+1] = -horizontal_component(mField, i);<br />

}

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!