当前位置: 首页 > wzjs >正文

做的新网站网上搜不到合肥头条今日头条新闻最新消息

做的新网站网上搜不到,合肥头条今日头条新闻最新消息,黑龙江外贸网站制作,公司网站建设大概多少钱效果图 重点工具使用流程 CogFindLineTool工具 步骤一:使用找线工具将传感器左边特征给寻找出来; 步骤二:使用找线工具将传感器右边特征给寻找出来; 步骤三:使用找线工具将传感器上边特征给寻找出来; 步骤…

效果图

 

 

 

 

重点工具使用流程

CogFindLineTool工具

步骤一:使用找线工具将传感器左边特征给寻找出来;

 步骤二:使用找线工具将传感器右边特征给寻找出来;

 步骤三:使用找线工具将传感器上边特征给寻找出来;

 步骤四:使用找线工具将传感器下边特征给寻找出来;

CogIntersectLineLineTool工具

步骤一:将左边直线和上直线进行交叉处理;

 步骤二:将右边直线和上直线进行交叉处理;

 步骤三:将左边直线和下直线进行交叉处理;

步骤四:将右边直线和下直线进行交叉处理; 

CogCreateSegmentTool工具

步骤一:将右边直线和上直线进行交叉与左边直线和下直线进行交叉,实现右倾斜进行测量···

 步骤二:将右边直线和上直线进行交叉和右边直线和下直线进行交叉,实现右倾斜进行测量···

CogIntersectSegmentSegmentTool工具

将CogCreateSegmentTool工具1和CogCreateSegmentTool工具2计算两条线段(Segment)的交点坐标,然后计算出传感器所需要的宽高。

传感器脚本

#region namespace imports
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using Cognex.VisionPro;
using Cognex.VisionPro.ToolBlock;
using Cognex.VisionPro3D;
using Cognex.VisionPro.ImageProcessing;
using Cognex.VisionPro.PMAlign;
using Cognex.VisionPro.CalibFix;
using Cognex.VisionPro.Caliper;
using Cognex.VisionPro.Dimensioning;
#endregionpublic class CogToolBlockAdvancedScript : CogToolBlockAdvancedScriptBase
{#region Private Member Variablesprivate Cognex.VisionPro.ToolBlock.CogToolBlock mToolBlock;private CogDistanceSegmentLineTool width;private CogDistanceSegmentLineTool length;private CogGraphicLabel widthLabel;private CogGraphicLabel lengthLabel;#endregion/// <summary>/// Called when the parent tool is run./// Add code here to customize or replace the normal run behavior./// </summary>/// <param name="message">Sets the Message in the tool's RunStatus.</param>/// <param name="result">Sets the Result in the tool's RunStatus</param>/// <returns>True if the tool should run normally,///          False if GroupRun customizes run behavior</returns>public override bool GroupRun(ref string message, ref CogToolResultConstants result){width = new CogDistanceSegmentLineTool();length = new CogDistanceSegmentLineTool();widthLabel = new CogGraphicLabel();lengthLabel = new CogGraphicLabel();// To let the execution stop in this script when a debugger is attached, uncomment the following lines.// #if DEBUG// if (System.Diagnostics.Debugger.IsAttached) System.Diagnostics.Debugger.Break();// #endif// Run each tool using the RunTool functionforeach(ICogTool tool in mToolBlock.Tools)mToolBlock.RunTool(tool, ref message, ref result);width = mToolBlock.Tools["CogDistanceSegmentLineTool_width"]as CogDistanceSegmentLineTool;length = mToolBlock.Tools["CogDistanceSegmentLineTool_length"]as CogDistanceSegmentLineTool;widthLabel.Color = CogColorConstants.Green;lengthLabel.Color = CogColorConstants.Green;widthLabel.SetXYText(200, 200, "width:" + width.Distance.ToString("0.00"));lengthLabel.SetXYText(200, 250, "length:" + length.Distance.ToString("0.00"));return false;}#region When the Current Run Record is Created/// <summary>/// Called when the current record may have changed and is being reconstructed/// </summary>/// <param name="currentRecord">/// The new currentRecord is available to be initialized or customized.</param>public override void ModifyCurrentRunRecord(Cognex.VisionPro.ICogRecord currentRecord){}#endregion#region When the Last Run Record is Created/// <summary>/// Called when the last run record may have changed and is being reconstructed/// </summary>/// <param name="lastRecord">/// The new last run record is available to be initialized or customized.</param>public override void ModifyLastRunRecord(Cognex.VisionPro.ICogRecord lastRecord){mToolBlock.AddGraphicToRunRecord(widthLabel, lastRecord, "CogImageConvertTool1.OutputImage", "script");mToolBlock.AddGraphicToRunRecord(lengthLabel, lastRecord, "CogImageConvertTool1.OutputImage", "script");}#endregion#region When the Script is Initialized/// <summary>/// Perform any initialization required by your script here/// </summary>/// <param name="host">The host tool</param>public override void Initialize(Cognex.VisionPro.ToolGroup.CogToolGroup host){// DO NOT REMOVE - Call the base class implementation first - DO NOT REMOVEbase.Initialize(host);// Store a local copy of the script hostthis.mToolBlock = ((Cognex.VisionPro.ToolBlock.CogToolBlock)(host));}#endregion}

http://www.dtcms.com/wzjs/145284.html

相关文章:

  • 首尔面积影响关键词优化的因素
  • 做市场的逛的网站百度惠生活怎么优化排名
  • 广州网站建设模板制作厦门seo网站管理
  • php网站开发师招聘百度推广竞价排名技巧
  • 音响 东莞网站建设技术支持seo百度百科
  • 衡阳市住房和城乡建设局网站外贸网络推广怎么做
  • 免费建设公司网站新东方烹饪学校
  • 建设网站需要多少钱济南兴田德润地址关键词优化排名的步骤
  • 外贸网站建设的重要性百度权重批量查询
  • 凡科网站建设分类模块怎么弄国内seo公司
  • 常州做沙滩旗的公司网站如何拿高权重网站外链进行互换?
  • 如何推广qq群搜索优化
  • 苏州建设网站哪家好百度如何添加店铺位置信息
  • 哪些网站做的比较好看的哪些行业适合做seo
  • 代做电大网站ui作业淘宝关键词top排行榜
  • 全国今日生猪价格涨跌表价格株洲seo排名
  • 哪个网站专业做安防网络营销比较好的企业
  • 青州专业网站建设seo免费推广
  • 网站建设内容方向网店运营流程步骤
  • 哪些网站的数据库做的好站长之家seo查找
  • 网站数据库怎么恢复自动外链网址
  • 彩票自己开盘做网站宁波营销型网站建设优化建站
  • win2008r2做网站服务器百度首页 百度一下
  • 博彩网站做维护今天刚刚发生的新闻台湾新闻
  • 做网站有哪些好处农技推广
  • 网站url是什么意思今天新闻头条
  • 合肥建站搜索网
  • 做封面的软件ps下载网站关于营销的最新的新闻
  • 做网站是那个语言写的新网域名注册查询
  • 电子科技 深圳 网站建设百度问问