public HImage TransImage(HImage image) { try { HHomMat2D matd = new HHomMat2D(); matd.VectorAngleToRigid(this.info.ModelRegionRow, this.info.ModelRegionCol, this.info.ModelRegionAngle, this.info.ResultY, this.info.ResultX, this.info.ResultAngle); if (IsSuccess) { image = matd.AffineTransImage(image, "constant", "false"); return(image); } } catch (Exception ex) { WriteErrorLog("VisionTool", ToolName + "模板" + ex.ToString()); } return(null); }