Mahagney Saleh
Mahagney Saleh

Reputation: 117

OpenCV arrowedLine function

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?

Upvotes: 2

Views: 3660

Answers (1)

Miki
Miki

Reputation: 41765

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

Upvotes: 4

Related Questions