Skip to content

image.laplacian() non-standard? #216

@askerlee

Description

@askerlee

The function image.laplacian() seems to return very different results from what Matlab's fspecial() does.
For example, when size=5, sigma=0.5:
image.laplacian() produces:
0.1898 0.4022 0.4938 0.4022 0.1898
0.4022 0.7158 0.8493 0.7158 0.4022
0.4938 0.8493 1.0000 0.8493 0.4938
0.4022 0.7158 0.8493 0.7158 0.4022
0.1898 0.4022 0.4938 0.4022 0.1898
Whereas fspecial('log') produces:
-0.0091 -0.0095 -0.0115 -0.0095 -0.0091
-0.0095 -0.0646 -0.1457 -0.0646 -0.0095
-0.0115 -0.1457 1.0000 -0.1457 -0.0115
-0.0095 -0.0646 -0.1457 -0.0646 -0.0095
-0.0091 -0.0095 -0.0115 -0.0095 -0.0091
Both filters are normalized by the central [3,3] element.
I've tried a few other parameter values and none of them are the same. Moreover, image.laplacian() seems to contain many more positive numbers.

I'm not an image processing person so am not sure if I misunderstood the documentation of this API. Thank you for any help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions