赞
踩
1。CogRecordDisplay显示
CogImageFile ImageFile1 = new CogImageFile();
string imagepath;//图片路径
CogImage8Gray readimage =ImageFile1.Open(imagepath, CogImageFileModeConstants.Read);
cogRecordDisplay.image =readimage;
cogRecordDisplay.AutoFit = true;//自适应
2。清除CogRecordDisplay显示
cogRecordDisplay.Image = null;
cogRecordDisplay.StaticGraphics.Clear();
cogRecordDisplay.InteractiveGraphics.Clear();
3。保存原图
CogImageFileTool ImageFileTool = new CogImageFileTool();
string imagepath;//图片路径
ImageFileTool.Operator.Open(imagepath, CogImageFileModeConstants.Write);
ImageFileTool.InputImage = cogRecordDisplay.image;
ImageFileTool.Run();
ImageFileTool.Operator.Close();
4。保存CogRecordDisplay显示结果图像
string imagepath;//图片路径
Bitmapm bitmap=CogRecordDisplay.CreateContentBitmap(Cognex.VisionPro.Display.CogDisplayContentBitmapConstants.Display) as Bitmap;
bitmap.Save(imagepath);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。