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
0
votes
1 answer

How to calculate laplacian form gradient?

I am dealing with shadow removal. First I have to calculate gradient from the image in both directions. g(x,y) = -2*f(x,y) + f(x+1,y) + f(x,y+1). Afterwards, I do some calculation on the gradient and modify it a bit. The problem comes when I have to…
gaming3
  • 3
  • 2
0
votes
0 answers

custom activity regularizer to smooth the output using a laplacian operator

I am trying to build a machine learning model to denoise straight lines with random noise. Here are some examples. The red dots are the labels and blue dots are the data for training. The length of each time series data is 100. I fit the data using…
0
votes
1 answer

Why do I need to resize the first image to blend two images?

I have implemented image blending by using pyramids. It works well if I resize the first image but I do not get what I want if I resize it. So, what I need to is blending without resizing in order to get a proper result. My code is: eyeImg =…
Terminou
  • 49
  • 6
0
votes
1 answer

Image thresholding not working on Laplacian image

I need to perform a thresholded zero-crossing detection of the filtered image's laplacian. But once the laplacian is applied, it gives error when doing thresholding. Any advice? code: img = cv2.imread('H:/FYP/interim/aniso.jpg') lap =…
shavindip
  • 607
  • 9
  • 27
-1
votes
0 answers

Generate figure 2 of paper Role of dissolved oxygen on the plankton dynamics in Spatio-temporal domain

I am trying to generate figure 2 of the above paper. I generated the following code with the help of ChatGPT. % Parameters r = 0.445532; a = 3; eta = 0.2; delta1 = 0.1; beta = 0.2; beta1 = 0.4; D0 = 3; alpha1 = 0.18; alpha2 = 0.2; delta2 = 0.3; D_a…
Huá dé ní 華得尼
  • 1,248
  • 1
  • 18
  • 33
-1
votes
1 answer

How to solve the Laplacian Scheme in OpenFOAM with undefined parameters

I have a script for fvSchemes file and the fvSchemes and fvsolutions files have defined all the solvers. This is my fvSchemes file. FoamFile { version 2.0; format ascii; class dictionary; location "system/fin"; object fvSchemes; } // * * * * * * * *…
Thamasha
  • 347
  • 2
  • 4
  • 9
1 2 3
4