
然后旋转这幅图像
再用旋转过的文字图像,与原图像叠加
旋转可这样做
先计算旋转矩阵
CvMat* Rot_Mat = cvCreateMat(2,3,CV_32FC1)
cv2DRotationMatrix(center,angle,scale,Rot_Mat)
然后旋转变换
cvTransform(src,dst,Rot_Mat,0)
1)PictureBox中没有Print方法,如果你要存储PictureBox中的图片到某个地方,可以这样做: pictureBox1.Image.Save("C:\\image.jpg", System.Drawing.Imaging.ImageFormat.Jpeg) 2)给图片加文字: Image img = Image.FromFile("c:\\Hydrangeas.jpg")//原来的图片 Graphics g = Graphics.FromImage(img)//读入到临时画图区域 //加上说明性文字 g.DrawString("这是介绍图片的文字", new Font("黑体", 20.0f), Brushes.LightCyan, new PointF(img.Height / 2, img.Width / 2))//保存 g.Save()//输出 img.Save("C:\\try.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)