《zw版·Halcon-delphi系列原創教程》 Halcon分類函數003·contour,輪廓處理


《zw版·Halcon-delphi系列原創教程》 Halcon分類函數003·contour,輪廓處理

 

為方便閱讀,在不影響說明的前提下,筆者對函數進行了簡化:

  • :: 用符號“**”,替換:“procedure”
  • :: 用大寫字母“X”,替換:“IHUntypedObjectX”
  • :: 省略了字符:“const”、“OleVariant”

【示例】 說明

函數:

procedure AddNoiseWhiteContourXld( const Contours: IHUntypedObjectX; out NoisyContours: IHUntypedObjectX; NumRegrPoints: OleVariant; Amp: OleVariant);

簡化后為:

** AddNoiseWhiteContourXld( Contours: X; out NoisyContours: X; NumRegrPoints, Amp);

 

  1 ** AddNoiseWhiteContourXld( Contours: X; out NoisyContours: X; NumRegrPoints, Amp); 
  2 說明,  add_noise_white_contour_xld,向XLD輪廓,中加入噪聲。
  3 
  4 ** AffineTransContourXld( Contours: X; out ContoursAffinTrans: X; HomMat2d);
  5 
  6 ** ChangeRadialDistortionContoursXld( Contours: X; out ContoursRectified: X; CamParamIn, CamParamOut); 
  7 說明,  change_radial_distortion_contours_xld,改變了輪廓,的放射失真。
  8 
  9 ** ClipContoursXld( Contours: X; out ClippedContours: X; Row1, Column1, Row2, Column2); 
 10 說明,  clip_contours_xld,修剪一個XLD輪廓,。
 11 
 12 ** ClipEndPointsContoursXld( Contours: X; out ClippedContours: X; Mode, Length); 
 13 說明,  clip_end_points_contours_xld,去除線條兩端的部分像素。
 14 
 15 ** CloseContoursXld( Contours: X; out ClosedContours: X); 
 16 說明,  close_contours_xld,關閉一個XLD輪廓,。
 17 
 18 ** ClusterModelComponents( TrainingImages: X; out ModelComponents: X; ComponentTrainingID, AmbiguityCriterion, MaxContourOverlap, ClusterThreshold); 
 19 說明,  cluster_model_components,把用於創建模型組件的新參數用於訓練結果。
 20 
 21 ** ContourPointNumXld( Contour: X; out Length); 
 22 說明,  contour_point_num_xld,返回一個XLD輪廓,中點的數目。
 23 
 24 ** ContourToWorldPlaneXld( Contours: X; out ContoursTrans: X; CameraParam, WorldPose, Scale); 
 25 說明,  contour_to_world_plane_xld,將一個XLD輪廓,轉換為一個坐標系統中平面Z為零。
 26 
 27 ** CreateAnisoShapeModelXld( Contours: X; NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, MinContrast, out ModelID); 
 28 說明,  為各向異性尺度不變匹配准備一個XLD模型
 29 
 30 ** CreateLocalDeformableModelXld( Contours: X; NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, MinContrast, ParamName, ParamValue, out ModelID); 
 31 說明,  建立本地XLD變形模型
 32 
 33 ** CreatePlanarCalibDeformableModelXld( Contours: X; CamParam, ReferencePose, NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, MinContrast, ParamName, ParamValue, out ModelID); 
 34 說明,  建立XLD變形模型校准平面
 35 
 36 ** CreatePlanarUncalibDeformableModelXld( Contours: X; NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, MinContrast, ParamName, ParamValue, out ModelID); 
 37 說明,  建立XLD變形模型無校准平面
 38 
 39 ** CreateScaledShapeModelXld( Contours: X; NumLevels, AngleStart, AngleExtent, AngleStep, ScaleMin, ScaleMax, ScaleStep, Optimization, Metric, MinContrast, out ModelID); 
 40 說明,  為尺度不變匹配准備一個XLD輪廓模型。
 41 
 42 ** CreateShapeModelXld( Contours: X; NumLevels, AngleStart, AngleExtent, AngleStep, Optimization, Metric, MinContrast, out ModelID); 
 43 說明,  建立輪廓XLD模型
 44 
 45 ** CropContoursXld( Contours: X; out CroppedContours: X; Row1, Col1, Row2, Col2, CloseContours); 
 46 說明,  crop_contours_xld,切割一個XLD輪廓,。
 47 
 48 ** DifferenceClosedContoursXld( Contours: X; Sub: X; out ContoursDifference: X); 
 49 說明,  difference_closed_contours_xld,閉合輪廓,的差異。
 50 
 51 ** DistanceCc( Contour1: X; Contour2: X; Mode, out DistanceMin, out DistanceMax); 
 52 說明,  distance_cc,計算兩個輪廓,間的距離。
 53 
 54 ** DistanceCcMin( Contour1: X; Contour2: X; Mode, out DistanceMin); 
 55 說明,  distance_cc_min,計算兩個輪廓,間的最小距離。
 56 
 57 ** DistanceLc( Contour: X; Row1, Column1, Row2, Column2, out DistanceMin, out DistanceMax); 
 58 說明,  distance_lc,計算一條線和一個輪廓,間的距離。
 59 
 60 ** DistancePc( Contour: X; Row, Column, out DistanceMin, out DistanceMax); 
 61 說明,  distance_pc,計算一個點和一個輪廓,間的距離。
 62 
 63 ** DistanceSc( Contour: X; Row1, Column1, Row2, Column2, out DistanceMin, out DistanceMax); 
 64 說明,  distance_sc,計算一條分割線和一個輪廓,間的距離。
 65 
 66 ** DistEllipseContourPointsXld( Contour: X; DistanceMode, ClippingEndPoints, Row, Column, Phi, Radius1, Radius2, out Distances); 
 67 說明,  dist_ellipse_contour_points_xld,計算所有輪廓,內的點到一個橢圓的距離。
 68 
 69 ** DistEllipseContourXld( Contours: X; Mode, MaxNumPoints, ClippingEndPoints, Row, Column, Phi, Radius1, Radius2, out MinDist, out MaxDist, out AvgDist, out SigmaDist); 
 70 說明,  dist_ellipse_contour_xld,輪廓到一個橢圓的距離。
 71 
 72 ** DistRectangle2ContourPointsXld( Contour: X; ClippingEndPoints, Row, Column, Phi, Length1, Length2, out Distances); 
 73 說明,  dist_rectangle2_contour_points_xld,計算所有輪廓,內的點到一個矩形的距離。
 74 
 75 ** FindLocalDeformableModel( Image: X; out ImageRectified: X; out VectorField: X; out DeformedContours: X; ModelID, AngleStart, AngleExtent, ScaleRMin, ScaleRMax, ScaleCMin, ScaleCMax, MinScore, NumMatches, MaxOverlap, NumLevels, Greediness, ResultType, ParamName, ParamValue, out Score, out Row, out Column);
 76 
 77 ** FitCircleContourXld( Contours: X; Algorithm, MaxNumPoints, MaxClosureDist,
 78 
 79 ** FitEllipseContourXld( Contours: X; Algorithm, MaxNumPoints, MaxClosureDist,
 80 
 81 ** FitLineContourXld( Contours: X; Algorithm, MaxNumPoints, ClippingEndPoints, Iterations, ClippingFactor, out RowBegin, out ColBegin, out RowEnd, out ColEnd, out Nr, out Nc, out Dist);
 82 
 83 ** FitRectangle2ContourXld( Contours: X; Algorithm, MaxNumPoints, MaxClosureDist, ClippingEndPoints, Iterations, ClippingFactor, out Row, out Column, out Phi, out Length1, out Length2, out PointOrder); 
 84 說明,  fit_rectangle2_contour_xld,用矩形來匹配XLD輪廓,。
 85 
 86 ** Fourier1Dim( Rows, Columns, ParContour, MaxCoef, out RealCoef, out ImaginaryCoef); 
 87 說明,  fourier_1dim,計算一個參數化的元組的傅里葉系數。
 88 
 89 ** GenCircleContourXld( out ContCircle: X; Row, Column, Radius, StartPhi, EndPhi, PointOrder, Resolution);
 90 
 91 ** GenContourNurbsXld( out Contour: X; Rows, Cols, Knots, Weights, Degree, MaxError, MaxDistance);
 92 
 93 ** GenContourPolygonRoundedXld( out Contour: X; Row, Col, Radius, SamplingInterval); 
 94 說明,  gen_contour_polygon_rounded_xld,根據一個多邊形(polygon)(以元組形式給出)的圓形角點創建一個XLD輪廓,。
 95 
 96 ** GenContourPolygonXld( out Contour: X; Row, Col); 
 97 說明,  gen_contour_polygon_xld,根據一個多邊形(polygon)(以元組形式給出)創建一個XLD輪廓,。
 98 
 99 ** GenContourRegionXld( Regions: X; out Contours: X; Mode);
100 
101 ** GenContoursSkeletonXld( Skeleton: X; out Contours: X; Length, Mode); 
102 說明,  gen_contours_skeleton_xld,將框架轉換為XLD輪廓,。
103 
104 ** GenCrossContourXld( out Cross: X; Row, Col, Size, Angle); 
105 說明,  gen_cross_contour_xld,根據每個輸入點交叉的形狀創鍵一個XLD輪廓,。
106 
107 ** GenEllipseContourXld( out ContEllipse: X; Row, Column, Phi, Radius1, Radius2,
108 
109 ** GenParallelContourXld( Contours: X; out ParallelContours: X; Mode, Distance); 
110 說明,  gen_parallel_contour_xld,計算一個XLD輪廓,的平行輪廓,。
111 
112 ** GenPolygonsXld( Contours: X; out Polygons: X; Type_, Alpha); 
113 說明,  gen_polygons_xld,根據多邊形近似創建XLD輪廓,。
114 
115 ** GenRectangle2ContourXld( out Rectangle: X; Row, Column, Phi, Length1, Length2); 
116 說明,  gen_rectangle2_contour_xld,創建一個矩形XLD輪廓,。
117 
118 ** GenRegionContourXld( Contour: X; out Region: X; Mode); 
119 說明,  gen_region_contour_xld,從XLD元組中創建一個區域。
120 
121 ** GetCalibDataObservContours( out Contours: X; CalibDataID, ContourName, CameraIdx, CalibObjIdx, CalibObjPoseIdx); 
122 說明,  獲取校准數據輪廓
123 
124 ** GetCirclePose( Contour: X; CameraParam, Radius, out putType, out Pose1, out Pose2); 
125 說明,  get_circle_pose,從一個圓周相應的二維投射中決定它的三維模式。
126 
127 ** GetContourAngleXld( Contour: X; AngleMode, CalcMode, Lookaround, out Angles); 
128 說明,  get_contour_angle_xld,為每個輪廓,點計算一個XLD輪廓,方向。
129 
130 ** GetContourAttribXld( Contour: X; Name, out Attrib); 
131 說明,  get_contour_attrib_xld,返回一個XLD輪廓,的點的特征值。
132 
133 ** GetContourGlobalAttribXld( Contour: X; Name, out Attrib);
134 
135 ** GetContourXld( Contour: X; out Row, out Col); 
136 說明,  get_contour_xld,返回XLD輪廓,的坐標。
137 
138 ** GetDeformableModelContours( out ModelContours: X; ModelID, Level); 
139 說明,  獲取變形模型輪廓
140 
141 ** GetGrayvalContourXld( Image: X; Contour: X; Interpolation, out Grayval); 
142 說明,  獲取xld輪廓灰度值
143 
144 ** GetMetrologyObjectMeasures( out Contour: X; MetrologyHandle, Indices, Transition, out Row, out Column); 
145 說明,  獲取計量對象均值參數
146 
147 ** GetRectanglePose( Contour: X; CameraParam, Width, Height, WeightingMode, ClippingFactor, out Pose, out CovPose, out Error); 
148 說明,  get_rectangle_pose,從一個矩形相應的二維投射中決定它的三維模式。
149 
150 ** GetRegionContour( Region: X; out Rows, out Columns); 
151 說明,  get_region_contour,查詢一個目標的輪廓,。
152 
153 ** GetRegressParamsXld( Contours: X; out Length, out Nx, out Ny, out Dist, out Fpx, out Fpy, out Lpx, out Lpy, out Mean, out Deviation); 
154 說明,  get_regress_params_xld,返回XLD輪廓,參數。
155 
156 ** GetShapeModel3DContours( out ModelContours: X; ShapeModel3DID, Level, View, out ViewPose); 
157 說明,  get_shape_model_3d_contours,返回一個3D輪廓模型視圖的輪廓表示。
158 
159 ** GetShapeModelContours( out ModelContours: X; ModelID, Level); 
160 說明,  get_shape_model_contours,返回一個輪廓模型的輪廓表示。
161 
162 ** GrabData( out Image: X; out Region: X; out Contours: X; AcqHandle, out Data); 
163 說明,  grab_data,從指定的圖像獲取設備獲取圖像和預處理圖像數據。
164 
165 ** GrabDataAsync( out Image: X; out Region: X; out Contours: X; AcqHandle, MaxDelay, out Data); 
166 說明,  grab_data_async,從指定的圖像獲取設備獲取圖像和預處理圖像數據並且開始下一個異步獲取。
167 
168 ** InspectClusteredComponents( out ModelComponents: X; ComponentTrainingID, AmbiguityCriterion, MaxContourOverlap, ClusterThreshold); 
169 說明,  inspect_clustered_components,檢查從訓練獲取的剛性的模型組件。
170 
171 ** IntersectionCircleContourXld( Contour: X; CircleRow, CircleColumn, CircleRadius, CircleStartPhi, CircleEndPhi, CirclePointOrder, out Row, out Column); 
172 說明,  計算xld圓形對象交集。
173 
174 ** IntersectionClosedContoursXld( Contours1: X; Contours2: X; out ContoursIntersection: X); 
175 說明,  intersection_closed_contours_xld,閉合輪廓,的交集。
176 
177 ** IntersectionContoursXld( Contour1: X; Contour2: X; IntersectionType, out Row, out Column, out IsOverlapping); 
178 說明,  計算xld輪廓對象交集。
179 
180 ** IntersectionLineContourXld( Contour: X; LineRow1, LineColumn1, LineRow2, LineColumn2, out Row, out Column, out IsOverlapping); 
181 說明,  計算直線-輪廓對象交集。
182 
183 ** IntersectionSegmentContourXld( Contour: X; SegmentRow1, SegmentColumn1, SegmentRow2, SegmentColumn2, out Row, out Column, out IsOverlapping); 
184 說明,  計算xld輪廓分段對象交集。
185 
186 ** LocalMaxContoursXld( Contours: X; Image: X; out LocalMaxContours: X; MinPercent, MinDiff, Distance); 
187 說明,  local_max_contours_xld,選擇局域最大灰度值的XLD輪廓,。
188 
189 ** MoveContourOrig( Rows, Columns, out RowsMoved, out ColumnsMoved); 
190 說明,  move_contour_orig,將原點變換到引力的中心。
191 
192 ** PolarTransContourXld( Contour: X; out PolarTransContour: X; Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, Width, Height); 
193 說明,  polar_trans_contour_xld,將一個環狀弧中的輪廓,轉換為極坐標形式。
194 
195 ** PolarTransContourXldInv( PolarContour: X; out XYTransContour: X; Row, Column, AngleStart, AngleEnd, RadiusStart, RadiusEnd, WidthIn, HeightIn, Width, Height); 
196 說明,  polar_trans_contour_xld_inv,將極坐標下的輪廓,轉換為笛卡爾坐標下的形式。
197 
198 ** PrepContourFourier( Rows, Columns, TransMode, out ParContour); 
199 說明,  prep_contour_fourier,參數化傳輸的元組。
200 
201 ** ProjectiveTransContourXld( Contours: X; out ContoursProjTrans: X; HomMat2d); 
202 說明,  xld輪廓,投影變換矩陣計算
203 
204 ** ProjectObjectModel3D( out ModelContours: X; ObjectModel3D, CamParam, Pose, GenParamName, GenParamValue); 
205 說明,  project_object_model_3d,把一個3D目標模型的邊緣投影到圖像坐標中。
206 
207 ** ProjectShapeModel3D( out ModelContours: X; ShapeModel3DID, CamParam, Pose, HiddenSurfaceRemoval, MinFaceAngle); 
208 說明,  project_shape_model_3d,把一個3D輪廓模型的邊緣投影到圖像坐標中。
209 
210 ** QueryContourAttribsXld( Contour: X; out Attribs); 
211 說明,  query_contour_attribs_xld,返回一個XLD輪廓,定義的屬性的名字。
212 
213 ** QueryContourGlobalAttribsXld( Contour: X; out Attribs); 
214 說明,  query_contour_global_attribs_xld,返回一個XLD輪廓,定義的全局屬性的名字。
215 
216 ** RadialDistortionSelfCalibration( Contours: X; out SelectedContours: X; Width, Height, InlierThreshold, RandSeed, DistortionModel, DistortionCenter, PrincipalPointVar, out CameraParam); 
217 說明,  失真校准取值范圍
218 
219 ** ReadContourXldArcInfo( out Contours: X; FileName); 
220 說明,  read_contour_xld_arc_info,從用ARC/INFO生成格式表示的文件讀取XLD輪廓。
221 
222 ** ReadContourXldDxf( out Contours: X; FileName, GenParamNames, GenParamValues, out DxfStatus); 
223 說明,  read_contour_xld_dxf,從一個DXF文件中讀取 XLD輪廓。
224 
225 ** RegressContoursXld( Contours: X; out RegressContours: X; Mode, Iterations);
226 
227 ** SegmentContoursXld( Contours: X; out ContoursSplit: X; Mode,
228 
229 ** SelectContoursXld( Contours: X; out SelectedContours: X; Feature, Min1, Max1, Min2, Max2);
230 
231 ** SmoothContoursXld( Contours: X; out SmoothedContours: X; NumRegrPoints); 
232 說明,  smooth_contours_xld,XLD輪廓,的平滑。
233 
234 ** SortContoursXld( Contours: X; out SortedContours: X; SortMode, Order, RowOrCol);
235 
236 ** SplitContoursXld( Polygons: X; out Contours: X; Mode, Weight, Smooth); 
237 說明,  split_contours_xld,在主要點分割XLD輪廓,。
238 
239 ** SymmDifferenceClosedContoursXld( Contours1: X; Contours2: X; out ContoursDifference: X); 
240 說明,  symm_difference_closed_contours_xld,閉合輪廓,的對稱差異。
241 
242 ** TrainModelComponents( ModelImage: X; InitialComponents: X; TrainingImages: X; out ModelComponents: X; ContrastLow, ContrastHigh, MinSize, MinScore, SearchRowTol, SearchColumnTol, SearchAngleTol, TrainingEmphasis, AmbiguityCriterion, MaxContourOverlap, ClusterThreshold, out ComponentTrainingID); 
243 說明,  train_model_components,為基於組件的匹配訓練組件和關系。
244 
245 ** Union2ClosedContoursXld( Contours1: X; Contours2: X; out ContoursUnion: X); 
246 說明,  union2_closed_contours_xld,閉合輪廓,的並集。
247 
248 ** UnionAdjacentContoursXld( Contours: X; out UnionContours: X; MaxDistAbs, MaxDistRel, Mode);
249 
250 ** UnionCocircularContoursXld( Contours: X; out UnionContours: X; MaxArcAngleDiff, MaxArcOverlap, MaxTangentAngle, MaxDist, MaxRadiusDiff, MaxCenterDist, MergeSmallContours, Iterations);
251 
252 ** UnionCollinearContoursExtXld( Contours: X; out UnionContours: X; MaxDistAbs, MaxDistRel, MaxShift, MaxAngle, MaxOverlap, MaxRegrError, MaxCosts, WeightDist, WeightShift, WeightAngle, WeightLink, WeightRegr, Mode);
253 
254 ** UnionCollinearContoursXld( Contours: X; out UnionContours: X; MaxDistAbs, MaxDistRel, MaxShift, MaxAngle, Mode);
255 
256 ** UnionCotangentialContoursXld( Contours: X; out UnionContours: X; FitClippingLength, FitLength, MaxTangAngle, MaxDist, MaxDistPerp, MaxOverlap, Mode); 
257 說明,  按余切,合並位於同一條直線上的輪廓,。
258 
259 ** UnionStraightContoursHistoXld( Contours: X; out UnionContours: X; out SelectedContours: X; RefLineStartRow, RefLineStartColumn, RefLineEndRow, RefLineEndColumn, Width, MaxWidth, FilterSize, out HistoValues); 
260 說明,  union_straight_contours_histo_xld,合並到給定線有相似距離的相鄰直線輪廓,。
261 
262 ** UnionStraightContoursXld( Contours: X; out UnionContours: X; MaxDist, MaxDiff, Percent, Mode, Iterations); 
263 說明,  union_straight_contours_xld,合並具有相似方向的相鄰直線輪廓,。
264 
265 ** WriteContourXldArcInfo( Contours: X; FileName); 
266 說明,  write_contour_xld_arc_info,向用ARC/INFO生成格式表示的文件寫入XLD輪廓。
267 
268 ** WriteContourXldDxf( Contours: X; FileName); 
269 說明,  write_contour_xld_dxf,向一個DXF格式的文件中寫入 XLD輪廓。
270 query_contour_global_attribs_xld

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM