OpenCV How to Plot velocity vectors as arrows in using single static image

前端 未结 3 1639
情深已故
情深已故 2020-12-23 22:59

I am trying to plot velocity vectors like in matlab we use \"quiver\" function http://www.mathworks.com/help/techdoc/ref/quiver.html

I need to port same methodology

3条回答
  •  抹茶落季
    2020-12-23 23:15

    The cvCalOpticalFlowLK does not plot velocity vectors, it computes these velocity vectors. If you do not have these vectors, you must call this function with two images. I guess you already have these vectors, and you just want to plot them.

    In this case, you can use the cv::line function, for example:

    cv::line(yourImage, cv::Point(baseX, baseY), cv::Point(endX, endY));
    

    I hope this will help you!

提交回复
热议问题