1 | initial version |
Your images have CV_8UC1
type. Even if you declare bw_image
as CV_32FC1
it will have CV_8UC1
type, because image
has CV_8UC3
type and cvtColor
doesn't change depth. Thus cvtColor
recreate bw_image
with CV_8UC1
type. You mast use unsigned char
in your kernel instead of float
or explisitly convert d_image
to CV_32FC
type by convertTo
method.