I am implementing reconstruction of image from gradient domain. This requires solving the following partial differential equation (a Poisson equation) on a 2D grid:
$$\nabla^{2}I=\mathbb{div} G$$
$\mathbb{div} G$ is divergence of a gradient field, which is simply an image with Laplacian operator applied (second-order derivative):
The original image have range of values 0 to 255 (8-bit image). The divergence image has values ranging from -341 to +318, which is expected.
However, when I solve the above equation for $I$, the result have very small scale. The values of reconstructed image range from -0.000038 to +0.000029.
I know the gradient domain stores information up to a constant. In this case however, the scale has been changed considerably.
When I stretch the reconstructed image to 0-255 interval, the correct result is obtained:
I am using Poisson solver based on the Full Multigrid Method (FMG) which works spectacularly in different application (HDR images). Here the values are stretched anyway so I never noticed the huge change of scale.
Is this scale change normal for gradient domain reconstruction or may there be
My ideas:
- Some glitch in the numerical solution.
- The $\mathbb{div} G$ image is padded with zeros so its size conforms with the solver - could this affect the scale?
No comments:
Post a Comment