Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我认为它几乎在标题中,显然我可以迭代和划分。但我认为有一种内置的方式。我看到了cvConvertScale,但这不适用于 type cv::Mat。
cvConvertScale
cv::Mat
我知道乘以标量的缩放操作:
cv::Mat M; float alpha; cv::Mat Result = M * alpha;
让我们试试这个:
cv::Mat Result = M / alpha;
或者:
float beta = 1.0f / alpha; cv::Mat Result = M * beta;