91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.01M
    文件類型: .cs
    金幣: 1
    下載: 0 次
    發布日期: 2021-05-10
  • 語言: C#
  • 標簽: 其他??

資源簡介

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;
???????????????

評論

共有 條評論