|
// 获取灰度值
//HTuple Rows, Columns;
//HOperatorSet.GetRegionPoints(region.GetRegion(), out Rows, out Columns);
//HTuple Grayval;
//HObject Image2; // 假设这是您的图像
//HOperatorSet.GetGrayval(baseImages[index].HObject, Rows, Columns, out Grayval);
//// 黑图
//HTuple Width, Height;
//HOperatorSet.GetImageSize(baseImages[index].HObject, out Width, out Height);
//HObject Imagebg;
//HOperatorSet.GenImageConst(out Imagebg, "byte", Width, Height);
//for (int k = 0; k < Rows.Length; k++)
//{
// HOperatorSet.SetGrayval(Imagebg, Rows[k], Columns[k], Grayval[k]);
//} - 效率很慢 |
|