1
$\begingroup$

I've been trying to create a LoG kernel for various sigma values. But the problem is that I always get float value matrix and I need integer value matrix as it is published on every document. I haven't find a method.

1st image: My functions and my output

2nd image: My expected matrix

Here is my function and my result

Expected output matrix

$\endgroup$
  • $\begingroup$ “integer value matrix as it is published on every document”. A LoG needs floating-point weights. You can scale it and round the values, but it will no longer be a proper LoG. The image you show is not a proper LoG. You also need to create a larger kernel that a 3x3. Use for example 2*ceil(3*sigma)+1 for the size. If you want to be more precise, use 4 instead of 3. $\endgroup$ – Cris Luengo Mar 17 at 14:12
  • $\begingroup$ “integer value matrix as it is published on every document” means "I want to create the matrix below" $\endgroup$ – Fatih M. Mar 17 at 15:35
  • 1
    $\begingroup$ Don’t expect to create that using exp or anything related to a Gaussian. You can simply copy those weights if you want to reproduce what the paper does, but know that that is not a LoG! $\endgroup$ – Cris Luengo Mar 17 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.