I frequently encounter that issue but I don't really know a proper way to fix it. I just would like some advise to do it the regarding to the processing time.
I am using opencv and I want to realize that operation:
map |= mask & mu(0);
map
is a matrix of single precision float.
mask
is a matrix of unsigned char that only contain 0 for the statement false ot 255 (0xFF) for the statement true
mu
is a double precision float scalar value.
Usually I do realize that operation that way :
cv::multiply(mask,mu(0),mask, 1./255., CV_32F);
map |= mask
Regarding also to the transparent vectorize classes (header openc2/core/hal/intrinsics.hpp) is there a more efficient way to do such operation ?
Thank you in advance for any help.