Prev: How to view the added toolbox in Help
Next: Grouping values of an iteration in order to plot them
From: Chenna on 9 May 2010 14:24 Hello All, Am trying to solve a poisson equation on image derivatives. Any idea on how to implement it in Matlab?? Here's what am doing. Laplacian(I) = divergence(Gx,Gy) Gx and Gy are 2D derivative images. I is unknown. and we are recovering I from known values Gx and Gy So if we expand the equation, for every pixel (x,y) we are solving the following I(x+1,y) + I(x-1+y) + I(x,y+1) + I(x,y-1) - 4I(x,y) = Gx(x,y) - Gx(x-1,y) + Gy(x,y) - Gy(x,y-1) The right hand side is known but the left hand side is completely unknown. If you visualize, every pixel in the resulting I is = 1/4(x-neighbors + y-neighbors - numerical_value) Your help is really appreciated. Thank you
From: Bruno Luong on 9 May 2010 15:48 "Chenna " <chennavarri(a)gmail.com> wrote in message <hs6uk3$4up$1(a)fred.mathworks.com>... > Hello All, > > Am trying to solve a poisson equation on image derivatives. Any idea on how to implement it in Matlab?? > Here's what am doing. > Laplacian(I) = divergence(Gx,Gy) > > Gx and Gy are 2D derivative images. > I is unknown. and we are recovering I from known values Gx and Gy > So if we expand the equation, for every pixel (x,y) we are solving the following > > I(x+1,y) + I(x-1+y) + I(x,y+1) + I(x,y-1) - 4I(x,y) = > Gx(x,y) - Gx(x-1,y) + Gy(x,y) - Gy(x,y-1) > > The right hand side is known but the left hand side is completely unknown. > If you visualize, every pixel in the resulting I is = 1/4(x-neighbors + y-neighbors - numerical_value) Poisson equation can be solved if you know either I or dI/dn on the boundary. That's called Dirichlet or Neumann's boundary condition. For image, one of the fastest way is use 2D DFT/DST/DCT depending on your boundary condition. Bruno
From: Chenna on 9 May 2010 16:43 Hey Bruno, Thank you for your reply. Actually am padding the boundaries with zeros. i.e. Gx and Gy are padded with zeros on the boundaries. Basically what am doing is. 1. Obtain x & y gradients of an image T, which gives Gx, Gy 2. Solve poisson equation with zero boundary condition to recover image I. laplace(I) = divergence(Gx,Gy) Do you think I should be using FFT2 function for solving poisson eqn?? Also, I've been looking at Full Multigrid algorithm to solve poisson equation on gradient images. Do you know if there's a function that implements this in matlab?? Thank you "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hs73hj$dqa$1(a)fred.mathworks.com>... > "Chenna " <chennavarri(a)gmail.com> wrote in message <hs6uk3$4up$1(a)fred.mathworks.com>... > > Hello All, > > > > Am trying to solve a poisson equation on image derivatives. Any idea on how to implement it in Matlab?? > > Here's what am doing. > > Laplacian(I) = divergence(Gx,Gy) > > > > Gx and Gy are 2D derivative images. > > I is unknown. and we are recovering I from known values Gx and Gy > > So if we expand the equation, for every pixel (x,y) we are solving the following > > > > I(x+1,y) + I(x-1+y) + I(x,y+1) + I(x,y-1) - 4I(x,y) = > > Gx(x,y) - Gx(x-1,y) + Gy(x,y) - Gy(x,y-1) > > > > The right hand side is known but the left hand side is completely unknown. > > If you visualize, every pixel in the resulting I is = 1/4(x-neighbors + y-neighbors - numerical_value) > > Poisson equation can be solved if you know either I or dI/dn on the boundary. That's called Dirichlet or Neumann's boundary condition. For image, one of the fastest way is use 2D DFT/DST/DCT depending on your boundary condition. > > Bruno
From: Bruno Luong on 9 May 2010 17:19 "Chenna " <chennavarri(a)gmail.com> wrote in message <hs76oo$79o$1(a)fred.mathworks.com>... > Hey Bruno, > Thank you for your reply. > > Actually am padding the boundaries with zeros. i.e. Gx and Gy are padded with zeros on the boundaries. I'm not sure you are allowed to do that. Such detail seems to be minor but can break down your calculation. Bruno
From: Karola on 18 May 2010 15:18 Hello, I'm trying to do basically the same thing... I found some codes that implement Full Multigrid algorithm in Matlab, although zero Dirichlet boundary conditions are used. You can find it here: http://www.cs.berkeley.edu/~demmel/ma221/Matlab/MG_README.html I'm not sure how to use it in this case, but I think it can be useful. Please, tell me if it works for you. "Chenna " <chennavarri(a)gmail.com> wrote in message > Also, I've been looking at Full Multigrid algorithm to solve poisson equation on gradient images. Do you know if there's a function that implements this in matlab?? > > Thank you >
|
Pages: 1 Prev: How to view the added toolbox in Help Next: Grouping values of an iteration in order to plot them |