资源简介
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;
相关资源
- WPFGRAPHICS.zip
- C#中主窗体Panel中加载其他多个窗体
- sitka_weather_07-2014.csv
-
BuildaWebba
sedChatusingASP.NETAjax.zip - C#传智播客.txt
- product_class(1).csv
- zw_pigant-9702763-Example_C#2005.zip
- WPFVisifire.Charts.dll
- WpfApp.rar
- 数据库课程设计报告HFUT 其他高校也适
- c#,windows Api读取其他程序SysListview3
- C#获取其他程序ListView控件中的内容
- WinApi获取其他程序的数据
- 这是用C#实现的QQ登录器。采用的安卓
评论
共有 条评论