openpiv_cxx.filters.sobel_filter

openpiv_cxx.filters.sobel_filter(img, keep_dtype=False)

A simple sobel filter.

Parameters:
  • img (ndarray) – A two dimensional array containing pixel intenensities.

  • keep_dtype (bool) – Cast output to original dtype.

Returns:

new_img – A two dimensional array containing pixel intenensities.

Return type:

ndarray

Notes

We use the following two kernels:

 1   2   1
 0   0   0
-1  -2  -1

 1   0  -1
 2   0  -2
 1   0  -1