Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] Using full multigrid algorithm to solve Poisson equation
- Date: Wed, 02 May 2012 11:27:53 +0200
- Organization: GeometryFactory
Hello,
What about discussing with your master's thesis supervisor.
That's what they are for.
andreas
On 02/05/2012 10:00, mq_wei wrote:
------------------------------------------------------------------------
Hello,
Hopefully some of you can help me out! I have to use the Full Multigrid
Algorithm from chapter 20.6 in Numerical reciepts in c++.
For my master's thesis I have to reimplement a paper about gradient
domain high dynamic range compression. In this paper the gradient field
of a luminance image is manipulated by attenuating the magnitudes of
large gradients. Then a low dynamic range image is obtained by solving a
Poisson equation on the modified gradient field. The paper uses the Full
Multigrid Algorithm from NR3 for this.
The Poisson equation:
V²I = div G
with
V = triangle upside down
I = image
G = gradient field
The Laplacian of the equation is approximated as follows:
V²I(x, y) = I(x + 1, y) + I(x - 1, y) + I(x, y + 1) + I(x, y - 1) - 4 *
I(x, y)
The gradient is approximated using forward difference:
VH(x, y) = (H(x + 1, y) - H(x, y), H(x, y + 1) - H(x, y))
div G is approximated using backward difference:
div G = Gx(x, y) - Gx(x - 1, y) + Gy(x, y) - Gy(x, y - 1)
from the paper:
"the difference scheme yields a large system of linear equations - one
for each pixel in the image, but the corresponding matrix has only five
nonzero elements in each row, since each pixel is coupled only with its
four neighbours."
Questions:
I have not the slightest idea how to put these equations into the input
matrix for the mglin function Which format is necessary for the
algorithm to perform correctly?
The comment in the code listing mglin.h says "On input u[0..n-1][0..n-1]
contains the right-hand side p,..."
Is p = div G ?
What does the output look like? Does each row of u contains the new
luminance value for the corresponding pixel?
Thanks in advance for any help you can give me.
The paper:
http://www.cs.huji.ac.il/%7Edanix/hdr/hdrc.pdf
Best regards,
Dong WEI
- [cgal-discuss] Using full multigrid algorithm to solve Poisson equation, mq_wei, 05/02/2012
- Re: [cgal-discuss] Using full multigrid algorithm to solve Poisson equation, Andreas Fabri, 05/02/2012
Archive powered by MHonArc 2.6.16.