Hi Marinus
One question. How do we calculate the laplacian operator for this image processing ?
I saw at
http://masm32.com/board/index.php?topic=7420.msg81182#msg81182 that Rui did a Laplacian computation for a determinant of a matrix 3x3. Is it the same thing as what we are doing ? Can we use his function to compute the laplacian to detect edges too ?
If not... how can we estimate the correct laplacian using 2-D Log function with Gaussian standard deviation as described here ?
https://www.javatpoint.com/dip-concept-of-edge-detectionAnd most important..what a hell is this laplacian ?

I gave a test on this logarithm function using wolframalpha and came onto this:
If Log(x) = 1 . So our laplacian of x, y pixels, right ? So, at the end, the laplace (not normalized) can only results in values varying from 0 to 255 to make it works similar as what Sobel does)
Laplace = Log(x,y) = (1-(z)/(2*k)) * (exp(-(z)/(2*k))) * (-1/(pi*k))
If the final laplace/Log(x,y) = 1, then we have:
1 = (1-(z)/(2*k)) * (exp(-(z)/(2*k))) * (-1/(pi*k))
where z = x^2+y^2
k = standard deviation of the whole image
So...when the result of log(x,y) = 1 Wolfram Alpha gave as a solution this:
z = -2 (k W(-e k pi) - k)
1 = (1-(z)/(2*k)) * (exp(-(z)/(2*k))) * (-1/(pi*k))
https://www.wolframalpha.com/input/?i=1+%3D+%281-%28z%29%2F%282*k%29%29+*+%28exp%28-%28z%29%2F%282*k%29%29%29+*+%28-1%2F%28pi*k%29%29Where W = product Log function (whatever that is

)
Also, if we consider log(x,y) = 2 we then have this formula:
z = -2 (k W(-
2 exp(k pi)) - k)
2 = (1-(z)/(2*k)) * (exp(-(z)/(2*k))) * (-1/(pi*k))
If log(x,y) = 3, we have this:
z = -2 (k W(-
3 e k pi) - k)
3 = (1-(z)/(2*k)) * (exp(-(z)/(2*k))) * (-1/(pi*k))
So, it seems to me that for log(x,y) = N we have
z = -2 (k W(-
N e k pi) - k)
z = -2*k (W(-
N e k pi) - 1)
where z = x^2+y^2
So, in theory, all we need to know is how to calculate this W stuff, right ?
Knowing that "k" is a constant for each image (it´s simply their standard deviation), then the values of this W function can all be pre calculated and put onto a table from 0 to 255, right ?
Since, "k" and pi are constants, and we also have the resultant N varying from 0 to 255, we can build a 256 dword table containing the results of
W(-N e k pi), right ?
If is that so, to calculate the laplace (the exact values and not the approximations), we could 1st solve this W function and later, solve z for each values from 0 to 255, like this:
Val0 = -2*k (W(-0 e k pi) - 1) => related to Laplace Val = 0
Val1 = -2*k (W(-1 e k pi) - 1) => related to Laplace Val = 1
Val2 = -2*k (W(-2 e k pi) - 1) => related to Laplace Val = 2
Val3 = -2*k (W(-3 e k pi) - 1) => related to Laplace Val = 3
(...)
Since, z varies according to the value of each pixel at x, y pos, we could simply point the result of x^2+y^2 to the value that is more closer to the Val1, Val2..... right ?
On this way we would create only 256 values for this "-2*k (W(-N e k pi) - 1)" stuff and compare the values of x^2+y^2 to them to get the proper laplace value.
The question is how do we calculate this W stuff ????