图片中写入文字
#include <QCoreApplication>
#include <opencv2/opencv.hpp>
int main(int argc, char *argv[])
{
//QCoreApplication a(argc, argv);
cv::Mat img;
img = cv::imread("opencv.jpg");
//std::cout <<img.cols <<", "<<img.rows<<std::endl;
/////////////////图片中输入文字
char str_lx[6];
int num=5;
sprintf(str_lx,"lxhello%d",num);
cv::putText(img,str_lx,cv::Point(100,100),CV_FONT_HERSHEY_SIMPLEX,1,
cv::Scalar(100,100));
///////////////////////////
cv::imshow("core_process",img);
cv::waitKey();
return 0;
// return a.exec();
}