OpenCV arrowedLine 函数

OpenCV arrowedLine function

我尝试在我的图像上绘制箭头线,但出现错误。 请看一下我的代码:

point1 = Point(x, y);
vect.push_back(point1);
    for (int i = vect.size()-5; i>=0,i < vect.size() - 1; i++)
        {
         arrowedLine(cameraFeed,vect[i] , vect[i+1],Scalar(0, 255, 0), 1, 8, 0, 0.1);
        }

错误:arrowedLine 未定义 我应该为这个功能包括哪个 header?

函数arrowedLine位于:

  • OpenCV 3.0: imgproc.hpp
  • OpenCV 2.4.12、2.4.11、2.4.10:core.hpp
  • OpenCV <= 2.4.9:不存在。

您可以使用 include all 来避免此类问题:opencv.hpp.


对于 OpenCV <= 2.4.9,您可以基于 OpenCV 编写自定义函数 arrowedLine