[英]How to write on images using EmguCV in C#
您可以使用CvInvoke.PutText
在图像上书写,这里是一个简单的示例:
// load the image
Mat image = new Mat("test.png");
// write "hello!" in red(0,0,255) at 100,100 coordinate from the top left corner
CvInvoke.PutText(image, "hello!", new System.Drawing.Point(100, 100), FontFace.HersheySimplex, 1.0, new MCvScalar(0, 0, 255), 2);
// display the result
CvInvoke.Imshow("Image with text", image);
// wait for user input to dismiss the image
CvInvoke.WaitKey();
// free allocated memory
image.Dispose();
对于刚接触 EmguCV 的人来说似乎很困惑,但这实际上只是查看每个参数的作用的问题,更多信息请参阅EmguCV 官方文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.