differences to approximate the gradient ci,j = c(|∇ui,j |) |∇ui,j | ≃ s ui+1,j − ui−1,j 2 2 + ui,j+1 − ui,j−1 2 2 • Discretized divergence and time derivative: ∂u ∂t = ∂ ∂x (c(|∇u|)ux ) + ∂ ∂y (c(|∇u|)uy ) uk+1 i,j −uk+1 i,j ∆t = ck i+1 2 ,j uk i+1,j − uk i,j − ck i−1 2 ,j uk i,j − uk i−1,j + ck i,j+1 2 uk i,j+1 − uk i,j − ck i,j−1 2 uk i,j − uk i,j−1 • Mid-points = averages over neighboring pixels: c i±1 2 ,j = ci±1,j + ci,j 2 , c i,j±1 2 = ci,j±1 + ci,j 2 • ∆t ≤ 0.25 to ensure stability. Image processing (Weeks 2-3) -PDE’s- (8/26) M. Hachama (
[email protected])