The call cv::absdiff(mean, frame_in, diff);
gives the error error: (-5:Bad argument) When the input arrays in add/subtract/multiply/divide functions have different types, the output array type must be explicitly specified in function 'arithm_op'
,where mean
is CV_32FC3
and frame_in
is the input frame, so CV_8UC3
.
However, there is no definition in core/core.hpp
of absdiff
that provides a way to specify the output type. I’ve tried copying frame_in
to a CV_32FC3
mat as well as specifying the type of diff
, all to no avail.
I assume I’m missing something, but am at a loss to figure out what.