Questions tagged [laplacianofgaussian]

The Laplacian of Gaussian (LoG) is the generalized second order derivative of the Gaussian function. In image processing, it is applied as a linear filter to obtain a regularized (smoothed) Laplace operator. 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 of Gaussian is defined as the Laplace operator applied to a Gaussian function. That is, it is the sum of the second order derivative of the Gaussian along each of the dimensions.

In image processing it is used where a regularized Laplacian is needed: to construct edge sharpening filters, edge detection (Marr-Hildreth), etc.

See also and .

23 questions
15
votes
4 answers

Laplacian of gaussian filter use

This is a formula for LoG filtering: (source: ed.ac.uk) Also in applications with LoG filtering I see that function is called with only one parameter: sigma(σ). I want to try LoG filtering using that formula (previous attempt was by gaussian…
maximus
  • 4,201
  • 15
  • 64
  • 117
15
votes
3 answers

Python implementation of the laplacian of gaussian edge detection

I am looking for the equivalent implementation of the laplacian of gaussian edge detection. In matlab we use the following function [BW,threshold] = edge(I,'log',...) In python there exist a function for calculating the laplacian of gaussian.…
Shan
  • 18,563
  • 39
  • 97
  • 132
9
votes
2 answers

Is Laplacian of Gaussian for blob detection or for edge detection?

The following code is provided from (was asked to remove the link). But I was wondering how it exactly works. I was confused if this was considered edge detection or blob detection, as Wikipedia list the Laplacian of Gaussian (LoG) as blob…
6
votes
2 answers

Laplacian of Gaussian

I am having trouble implementing a LoG kernel. I am trying to implement 9x9 kernal with theta = 1.4 as shown in this link http://homepages.inf.ed.ac.uk/rbf/HIPR2/log.htm. However, I am having difficulty with the formula itself. If someone could…
Don
  • 111
  • 2
  • 8
3
votes
1 answer

How to find zero crossings in the Laplacian of Gaussian of an image

I need to build an LoG filer using only my method and only matplotlib OpenCV and NumPy (but not build-in functions that do the filter just to help calculate) def edgeDetectionZeroCrossingLOG(img: np.ndarray) -> (np.ndarray): """ Detecting…
3
votes
1 answer

A faster approach to Laplacian of Gaussian

I am currently in the process of optimizing my code to make image processing more efficient. my first problem was due to the vision.VideoFileReader and step where it took a long time to open each frame. I speed up my code by compressing my grayscale…
2
votes
0 answers

What am I doing wrong trying to do a Laplacian of Gaussian convolution with Renderscript Intrinsics?

I'm working with several new things at once, making it hard to see where I'm going wrong. I'm new to Android, Kotlin (and Java), Renderscript, kernel convolutions, and Laplacians. But I've managed to get LoG working in Python with OpenCV and…
2
votes
1 answer

What is the different between LoG (Laplacian of Gaussian) filter, first and second derivative Gaussian filter?

What is the different between LoG (Laplacian of Gaussian) filter, first and second derivative Gaussian filter? Is it second derivative Gaussian filter equal to Laplacian…
Skyline
  • 61
  • 2
  • 8
2
votes
1 answer

Laplacian of Gaussian linearity

It is known that when using first and especially second order derivative we should first smooth the image so in the case of Laplacian of Gaussian first to convolve with the Gaussian mask and the with the Laplacian mask. But on the other hand both of…
gbox
  • 809
  • 1
  • 8
  • 22
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

How to have consistent upsampling/downsampling when creating a laplacian pyramid?

I,m trying to make a laplacian pyramid for image reconstruction but I,ve got a problem. When downsampling I just get the even rows/columns and discard the rest, when upsampling I duplicate each row/column. But this creates a situation where sizes of…
1
vote
0 answers

Implement Laplacian of Gaussian Filter

I want to implement the laplacian of gaussian filter for my image.I test this 2 method which give me completely different answer. Please tell me which I made mistake.In the first method I implement the LOG filter from it's function and in the second…
1
vote
1 answer

OpenCV laplacian pyramid: size not correct

I work on a project on blending images together with the OpenCV library. I get an error when I try to reconstruct the layers of the pyramids, even though I thought to set the size correctly. At the end of the code, I get this error message (at…
1
vote
1 answer

OpenCV filter2d gives incorrect result

I am currently trying to filter an image with a Laplacian kernel that I have constructed myself. However, when filtering an input image with this kernel it gives an unexpected result compared to the implementation in SciPy. The Laplacian kernel I…
Jesper
  • 363
  • 1
  • 3
  • 17
1
vote
1 answer

I am getting black Laplacian of Guassian image

import cv2 import math gaussian function def gaussianblur(img,sigma): if(sigma<0): print("SIGMA SHOULD BE POSITIVE") return; calculating 1 dimensional kernal with g(x)=(1/squareroot(2*sigma*sigma*3.142)) *…
1
2