這里只寫了修改搜索區域的形狀,以及搜索區域形狀的中心坐標、邊長信息,實際應用時可能會需要更多參數,
其它的就自己嘗試下吧,習還是要靠自己。
CogPMAlignTool pmat = toolGroup.Tools["CogPMAlignTool1"] as CogPMAlignTool;//拿到工具對象 CogRectangleAffine test = new CogRectangleAffine();//創建一個新的搜索區域 test.CenterX = 800;//設置搜索區域的圓點 test.CenterY = 800; test.SideXLength = 500;//設置搜索區域的長寬
test.SideYLength = 500; pmat.SearchRegion = test;//應用搜索區域到工具中