I have to perform the following per-element product:
out = dist * v1 * v2 / res;
distis a scalar (double)
cv::Vec2d(vector of 2
My very easy peasy code with
return (dist * v1).mul(v2).div(v3);
The error I got (compiling with
cl.exe under VC17):
E0312 no suitable user-defined conversion from "cv::Matx<double, 2, 1>" to "cv::Vec2d" exists
Breaking down the operations, the problem is with
.mul works fine.
Now, looking at the doc, I can note:
cv::Vec<_Tp,cn>is inherited from
cv::Vec2dshould be the same as
cv::Matx<double,cn,1>. Am I missing something?
cv::Vec<_Tp,cn>is cited into the doc, but I’ve not found either the declaration of
cv::Vec<_Tp,cn>::divnor a mention to it or to the per-element division operation in general. However the method does exists.
Any idea where I’m wrong and how to (easily) fix?