资源简介
FitLine.cs
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HalconDotNet;
namespace checktest
{
class FitLine
{
///
/// 找线 (多段取点拟合)
///
/// 输入图像
/// 窗口句柄
/// 中心行坐标
/// 中心列坐标
/// 角度
/// 半长
/// 半宽
/// 取点数
/// 对比度
/// 平滑系数
/// 极性
/// 选择边缘点
/// 返回直线起点行坐标
/// 返回直线起点列坐标
/// 返回直线终点行坐标
/// 返回直线终点列坐标
/// 是否显示
///
public bool Find_Line(Hobject Image HTuple Window HTuple RoiRow HTuple RoiCol HTuple RoiPhi HTuple RoiLength1 HTuple RoiLength2 HTuple NumPoint
HTuple AmpThreshold HTuple Smooth HTuple Transition HTuple Select ref HTuple RowBegion ref HTuple ColBegion ref HTuple RowEnd ref HTuple ColEnd
bool ShowRoiFlag)
{
try
{
Hobject Contour;
HTuple ImageWidth ImageHeight;
HTuple Row_Rect Col_Rect DRow DCol MeasureLength1 MeasureLength2 HomMat2DIdentity;
HTuple HomMat2DRotate Index MsrHandle Row_Measure Col_Measure;
HTuple Amplitude_Measure Distance_Measure num;
HTuple Nr Nc Dist;
HTuple RowOut = new HTuple() ColOut = new HTuple();
Listject> RectList = new Listject>();
Row_Rect = RoiRow + RoiLength2 * RoiPhi.TupleCos();
Col_Rect = RoiCol + RoiLength2 * RoiPhi.TupleSin();
MeasureLength1 = RoiLength1;
MeasureLength2 = RoiLength2 / NumPoint / 2;
DRow = -2 * RoiLength2 * RoiPhi.TupleCos() / NumPoint;
DCol = -2 * RoiLength2 * RoiPhi.TupleSin() / NumPoint;
HOperatorSet.HomMat2dIdentity(out HomMat2DIdentity);
HOperatorSet.HomMat2dTranslate(HomMat2DIdentity DRow DCol out HomMat2DRotate);
HOperatorSet.GetImageSize(Image out ImageWidth out ImageHeight);
if (ShowRoiFlag)//是否显示
{
Hobject rect2;
相关资源
- 020ASP.NET车辆综合管理系统.zip
- C# TcpListener 例程(源码)
- C# 内嵌其他exe窗体的完美封装
- PDF文件 阅读控件 (VeryPDF PDFView OCX)
- C#自定义控件案例--美化GroupBox.rar
- BouncyCastle C#源码
- C#高级编程(第10版) 百度网盘资源
- Unity5实战:使用C#和Unity开发多平台游
- zw_ASP.NET通用权限管理系统源代码含文
- 24652561RevitWPFAddin.zip
- ASP.NET网站建设实战--人民邮电出版社
- 传智播客ASP.NET[特供第三季].txt
- Winform通用经典快速开发CS框架-outloo
- C#爬取音乐源码.zip
- Rudin著第一册—阅读密码www.zasp.net_仅
- PracticalWPFChartsandGraphics.rar
- cb-9X-C#winform实现PDF阅读功能.rar
- sU-WV-C#比赛记时软件.rar
- u5-TW-C#打印操作--使用GDI绘图打印学生
- z1_C#打印操作--使用GDI绘图打印学生信
- C#打印操作--使用GDI绘图打印学生信息
- asp.net网上教学系统全站程序.zip
- C#管理学生考勤及作业登记系统
- 2321363LearnWPFMVVM-XAMLCandtheMVVMpattern.pdf
- 商品销售管理系统C#源码
- 松下PLC与C#上位机通讯库含程序.rar
- C#图书管理系统.rar
- C#基于BouncyCastle.Crypto的SM2_3实现导入即
- zw_WPF_开发教程(_中文版).zip
- asp.net进销存系统源码.rar
评论
共有 条评论