几何尺寸与公差论坛

 找回密码
 注册
查看: 525|回复: 1

CogGraphicInteractiveCollection的用法

[复制链接]
发表于 2023-1-24 10:18:29 | 显示全部楼层 |阅读模式
// Handler for Blob Tool ran event. If Blob results have changed then update the
                // Count & Region graphic.
                private void BlobTool_Ran(object sender, EventArgs e)
                {
                        CogGraphicInteractiveCollection ResultGraphics = new CogGraphicInteractiveCollection();
                        if (!RunningAll)
                        {
                                cogDisplay1.InteractiveGraphics.Clear();
                                cogDisplay1.StaticGraphics.Clear();
                        }
                        if (BlobTool.Results == null)
                                BlobCountText.Text = "N/A";
                        else
                        {
                                BlobCountText.Text = BlobTool.Results.GetBlobs(true).Count.ToString();
                                BlobCountText.Refresh();
                                foreach (CogBlobResult BlobResult in BlobTool.Results.GetBlobs(true))
                                        ResultGraphics.Add(BlobResult.CreateResultGraphics(CogBlobResultGraphicConstants.Boundary |
                                                CogBlobResultGraphicConstants.TipText));
                                cogDisplay1.InteractiveGraphics.AddList(ResultGraphics,"main",false);
                        }
                }
 楼主| 发表于 2023-1-24 10:23:11 | 显示全部楼层
C:\Program Files\Cognex\VisionPro\samples\Programming\Calibration\CalibNPoint\C#\CalibNPoint.sln
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-4-24 17:22 , Processed in 0.036642 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表