Dear Opencv experts,
Please help me to draw a gradient line.
Following is the code for drawing a line. It allows to draw a single color from point A to point B with necessary width.
cv::line(cv::Mat canvas, cv::Point(PointF pt1.X, PointF pt1.Y), cv::Point(PointF pt2.X, PointF pt2.Y), cv::Scalar color, int nPenWidth, CV_AA);
I am looking for something like the following.
cv::gradient_line(cv::Mat canvas, cv::Point(PointF pt1.X, PointF pt1.Y), cv::Point(PointF pt2.X, PointF pt2.Y), cv::Scalar color-pt1, cv::Scalar color-pt2, int nPenWidth, CV_AA);
Where color-pt1 is the color needed at pt1 and color-pt2 is the color necessary at pt2. Between these two points, the color needed to be gradient.
I am not sure if opencv has a built in function for gradient drawing. If it not available, kindly code one function for me.
Được trao cho:
Hello, I'm a primarily C++ programmer with OpenCV experience. I primarily did software development that dealt with tracking and recognition. I am familiar with OpenCV, so I believe I am qualified for this task.