2

I try to drow an arrowedLine on my image but i get an error. Please take a look on my code:

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);
        }

ERROR: arrowedLine is undefined Which header should I include for this function?

Mahagney Saleh
  • 117
  • 2
  • 11

1 Answers1

4

The function arrowedLine is in:

  • OpenCV 3.0: imgproc.hpp
  • OpenCV 2.4.12, 2.4.11, 2.4.10 : core.hpp
  • OpenCV <= 2.4.9 : not present.

You can avoid this kind of problems with the include all: opencv.hpp.


For OpenCV <= 2.4.9 you can write a custom function, based on OpenCV arrowedLine

Miki
  • 40,887
  • 13
  • 123
  • 202