[英]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.