#include <iostream>
#include <fstream>
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/stitching/stitcher.hpp"
#include "opencv2/opencv.hpp"
using namespace std;
using namespace cv;
int main()
{
Mat img3 = imread("E:\\sunqiao\\c++\\test2\\x64\\Debug\\result.jpg");
if (img3.empty())
{
cout << "jobs_512.jpg open error! " << endl;
getchar();
return -1;
}
//画线
Point a = Point(100, 100);
Point b = Point(200,1000);
//参数为:图像、起始点、结束点、颜色、粗细、线型
line(img3, a, b, Scalar(255, 0, 0));
namedWindow("img3", WINDOW_NORMAL);
imshow("img3", img3);
waitKey(0);
imwrite("img3.jpg", img3);
waitKey(0);
return 0;
}