Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Laplace Filters

Laplace image filters. More...

Functions

SIMD_API void SimdLaplace (const uint8_t *src, size_t srcStride, size_t width, size_t height, uint8_t *dst, size_t dstStride)
 Calculates Laplace's filter. More...
 
SIMD_API void SimdLaplaceAbs (const uint8_t *src, size_t srcStride, size_t width, size_t height, uint8_t *dst, size_t dstStride)
 Calculates absolute value of Laplace's filter. More...
 
template<template< class > class A>
SIMD_INLINE void Laplace (const View< A > &src, View< A > &dst)
 Calculates Laplace's filter. More...
 
template<template< class > class A>
SIMD_INLINE void LaplaceAbs (const View< A > &src, View< A > &dst)
 Calculates absolute value of Laplace's filter. More...
 

Detailed Description

Laplace image filters.

Function Documentation

◆ SimdLaplace()

void SimdLaplace ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
uint8_t *  dst,
size_t  dstStride 
)

Calculates Laplace's filter.

All images must have the same width and height. Input image must has 8-bit gray format, output image must has 16-bit integer format.

For every point:

dst[x, y] =
    - src[x-1, y-1] -   src[x, y-1] - src[x+1, y-1]
    - src[x-1, y]   + 8*src[x, y]   - src[x+1, y]
    - src[x-1, y+1] -   src[x, y+1] - src[x+1, y+1].
Note
This function has a C++ wrappers: Simd::Laplace(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of the input image.
[in]srcStride- a row size of the input image.
[in]width- an image width.
[in]height- an image height.
[out]dst- a pointer to pixels data of the output image.
[in]dstStride- a row size of the output image (in bytes).

◆ SimdLaplaceAbs()

void SimdLaplaceAbs ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
uint8_t *  dst,
size_t  dstStride 
)

Calculates absolute value of Laplace's filter.

All images must have the same width and height. Input image must has 8-bit gray format, output image must has 16-bit integer format.

For every point:

dst[x, y] = abs(
    - src[x-1, y-1] -   src[x, y-1] - src[x+1, y-1]
    - src[x-1, y]   + 8*src[x, y]   - src[x+1, y]
    - src[x-1, y+1] -   src[x, y+1] - src[x+1, y+1]).
Note
This function has a C++ wrappers: Simd::LaplaceAbs(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of the input image.
[in]srcStride- a row size of the input image.
[in]width- an image width.
[in]height- an image height.
[out]dst- a pointer to pixels data of the output image.
[in]dstStride- a row size of the output image (in bytes).

◆ Laplace()

void Laplace ( const View< A > &  src,
View< A > &  dst 
)

Calculates Laplace's filter.

All images must have the same width and height. Input image must has 8-bit gray format, output image must has 16-bit integer format.

For every point:

dst[x, y] =
    - src[x-1, y-1] -   src[x, y-1] - src[x+1, y-1]
    - src[x-1, y]   + 8*src[x, y]   - src[x+1, y]
    - src[x-1, y+1] -   src[x, y+1] - src[x+1, y+1].
Note
This function is a C++ wrapper for function SimdLaplace.
Parameters
[in]src- an input image.
[out]dst- an output image.

◆ LaplaceAbs()

void LaplaceAbs ( const View< A > &  src,
View< A > &  dst 
)

Calculates absolute value of Laplace's filter.

All images must have the same width and height. Input image must has 8-bit gray format, output image must has 16-bit integer format.

For every point:

dst[x, y] = abs(
    - src[x-1, y-1] -   src[x, y-1] - src[x+1, y-1]
    - src[x-1, y]   + 8*src[x, y]   - src[x+1, y]
    - src[x-1, y+1] -   src[x, y+1] - src[x+1, y+1]).
Note
This function is a C++ wrapper for function SimdLaplaceAbs.
Parameters
[in]src- an input image.
[out]dst- an output image.