Questions tagged [laplacian]

The Laplacian is a generalized second order derivative. Frequently applied as a filter in image processing. When using this tag also include the more generic [image-processing] tag if applicable, as well as the language you are coding in for context.

The Laplacian is the sum of the second order derivatives along each dimension, equivalent to the trace of the Hessian matrix.

In image processing, the discrete approximation to the Laplacian most frequently used is a 3x3 filtering mask with weights:

0  1  0           1  1  1
1 -4  1     or    1 -8  1
0  1  0           1  1  1

The left one can be seen as the addition of the 1D second order derivative [1 -2 1] and its transpose. The right one additionally adds two diagonal versions.

The filter can be used to construct an edge detector (Marr-Hildreth), to enhance edges (by subtracting it from the original image), etc.

See also .

51 questions
1
vote
0 answers

Getting lossy reconstruction with using laplacian pyramid to reconstruct an image

I am attempting to reconstruct an image using Laplacian Pyramids, and I'm getting a low loss of 200's when I take the L2 norm between my original image and reconstructed image, while it is supposed to be lossless. Here is the code: import…
1
vote
0 answers

First vs second order edge detection filters

I've recently been asked the following question: Why are second order edge detectors better at finding edges than first order detectors? The problem is, I cannot see why! Second order filters are always more sensitive to noise (e.g. laplacian…
1
vote
0 answers

Numerical instability in the inverse Laplace transform

I have a problem with Laplace inversion and my function is not numerically stable for the Laplac inverse, but I do not understand the cause of this problem. Here is my code and graph of this problem. Does anyone have any idea? I have also tried all…
Ali AlCapone
  • 121
  • 7
1
vote
0 answers

Numerical diagonalization of Hamiltonian using MATLAB

I am trying to diagonalize the Bogoliubov-de Gennes Hamiltonian. The problem is that the Hamiltonian contains a Laplacian. This could be solved by using a discretized Laplacian If I use a simple Hamiltonian (just the Laplacian) and use…
1
vote
1 answer

Color interpolation/smoothing in discrete-colored height map

I am currently trying to smooth a height-map of a 2D world. I have multiple images of different 2D worlds, so it's something I'm not going to do manually but rather create a script. Sample of a heightmap: As you can see, colors do not blend. I'm…
c4b4d4
  • 964
  • 12
  • 32
1
vote
1 answer

How to plot laplacian noise distribution?

I am currently working on Differential Privacy and want to visualize my noise distribution of the data set. I am using Laplacian distribution as my noise addition mechanism. I have already calculated beta (scale parameter) and the true output of the…
1
vote
1 answer

How to get correct Laplacian sharpened .raw image?

I am trying to do Laplacian sharpening on the moon image with using this algorithm : I am converting this image: But I don't know why I am getting image like this: Here is my code: import numpy as np def readRawFile(name,row_size,column_size): …
1
vote
1 answer

Laplacian matrix, solving a resistor mesh problem

I'm trying to solve for flows on a network using a laplacian matrix. I started out by testing on this problem here: https://rosettacode.org/wiki/Resistor_mesh#Python And it comes out with the solution perfectly, when all weights are 1, R =…
1
vote
0 answers

how to quickly create a graph with KNN results(ImageNet)

I have arrays from KNN which are like: [[point0, 1st nearest point of point0,......., kth nearest point of point0]\ [point1, 1st nearest point of point1,......., kth nearest point of point1]\ .....\ [pointN, 1st nearest point of pointN,.......,…
w c
  • 11
  • 2
1
vote
1 answer

Meshlab Laplacian Smooth introduces spikes

I am using MeshLab to smooth a mesh obtained from a 3d numpy array through marching_cubes and pymesh. I am processing a few similar meshes and only one of them is giving me this problem. The filter used is Laplacian Smooth with…
1
vote
1 answer

OpenCV CUDA Laplacian Filter on 3 channel image

I am wanting to apply a laplacian filter onto an image using OpenCV's CUDA (current version 4.3.0) namespace. Currently the CUDA version of laplacian filter does not accept 3 channel…
Brandon
  • 101
  • 1
  • 8
1
vote
0 answers

Advice on properly implementing Green's function for Laplacian Solver in Python?

I found this paper detailing a method for fast solution of Laplace/Poisson problems, especially for images. The authors describe a very simple yet powerful algorithm allowing them to solve these problems orders of magnitude faster than other, more…
BJParks
  • 11
  • 1
1
vote
0 answers

What is a good Laplacian operator for reaction diffusion algorithms, with spherical symmetry?

I am doing reaction diffusion computing and I get artifacts related to the Cartesian coordinate system in combination with the design of the Laplacian operator. The initial circularly symmetric seed develops into where the upper left structure uses…
David Jonsson
  • 318
  • 5
  • 19
1
vote
1 answer

cv2.Laplacian vs cv2.filter2d - Different results

I am trying to convolve my grayscale image with various filters. I have used the cv2.Laplacian(gray, cv2.CV_64F) and kernel =np.array([[0, 1, 0] , [1, -4, 1] , [0, 1, 0]]) dst = cv2.filter2D(gray, -1, kernel) But the results are different. Can…
1
vote
1 answer

Poor matrix reconstruction from eigenvectors in python vs R

I am trying to learn python, and I have run into something confusing to me. Just as a sanity check, I wanted to make sure I could reconstruct a graph laplacian matrix from its eigenvectors and eigenvalues. In R this works as expected, but not in…