原创文章点击这里
1 绘制
#include "stdafx.h"
#include <iostream>
#include <string.h>
#include <opencv2\opencv.hpp>
using namespace cv;
using namespace std;
int main()
{
Mat src = imread("images/2.jpg");
cv::Point point;
point.x = 20;
point.y = 50;
cv::circle(src, point, 4, cv::Scalar(0, 0, 255));
cv::Point start = cv::Point(10, 100);
cv::Point end = cv::Point(50, 200);
cv::line(src, start, end, cv::Scalar(0, 0, 255));
string str = "Love100";
putText(src, str, end, cv::FONT_HERSHEY_DUPLEX, 0.5, cv::Scalar(0, 255,0 ), 2);
imshow("src", src);
waitKey(0);
}