image.laplacian
result = image.laplacian(img, [kernel_size=3])
Input: img, kernel_size · Output: result
What it is
img is an Image; kernel_size is an optional named number, 3 (default, the same 4-neighbour kernel edge_detect applies per-channel and clamps to 8-bit) or 5 (a wider, less noise-sensitive discrete Laplacian). Any other kernel_size is refused by name. Computes the discrete Laplacian over img's BT.601 luma as raw signed floats (unlike edge_detect, which clamps to a preview Image).
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
result = image.laplacian(img, [kernel_size=3]) | img Imageimg is an Image.kernel_size number, optional (default 3)kernel_size is an optional named number, 3 (default, the same 4-neighbour kernel edge_detect applies per-channel and clamps to 8-bit) or 5 (a wider, less noise-sensitive discrete Laplacian). | result Mat | Returns a Mat. Added in v0.4.0. |
Examples
No documentation example calls this form yet. The Images chapter is where one belongs.
How it works
laplacian(img, [kernel_size=3]) -- discrete Laplacian over BT.601 luma, kernel_size 3 (the same 4-neighbour kernel edge_detect applies per-channel and clamps) or 5 (the wider, noise-steadier 5x5 form). Raw signed floats, same reasoning as sobel/scharr above.
From the note above this builtin in the interpreter, where the reasoning was written down as it was built.