answered 2018-08-21 09:55:43 -0600
Assertion failed (depth == 5 || depth == 6)
means, you need float or double data as input, not uchar.
src.convertTo(src, CV_32F); log(src, dst); dst.convertTo(dst, CV_8U);