/*********************************************************** * File generated by the HALCON-Compiler hcomp version 18.05 * Usage: Interface to C++ * * Software by: MVTec Software GmbH, www.mvtec.com ***********************************************************/ #ifndef HCPP_HXLDCONT #define HCPP_HXLDCONT namespace HalconCpp { // Represents an instance of an XLD contour object(-array). class LIntExport HXLDCont : public HXLD { public: // Create an uninitialized instance HXLDCont():HXLD() {} // Copy constructor HXLDCont(const HXLDCont& source) : HXLD(source) {} // Copy constructor HXLDCont(const HObject& object); // Create HXLDCont from object id. For copy=false takes // over management of input key. Type of key must match! explicit HXLDCont(Hkey key, bool copy=true); // Access of object tuple element const HXLDCont operator [] (Hlong index) const; /***************************************************************************** * Operator-based class constructors *****************************************************************************/ // gen_contour_region_xld: Generate XLD contours from regions. explicit HXLDCont(const HRegion& Regions, const HString& Mode); // gen_contour_region_xld: Generate XLD contours from regions. explicit HXLDCont(const HRegion& Regions, const char* Mode); // gen_contour_polygon_xld: Generate an XLD contour from a polygon (given as tuples). explicit HXLDCont(const HTuple& Row, const HTuple& Col); /*************************************************************************** * Operators * ***************************************************************************/ // Compute the union of cotangential contours. HXLDCont UnionCotangentialContoursXld(double FitClippingLength, const HTuple& FitLength, double MaxTangAngle, double MaxDist, double MaxDistPerp, double MaxOverlap, const HString& Mode) const; // Compute the union of cotangential contours. HXLDCont UnionCotangentialContoursXld(double FitClippingLength, double FitLength, double MaxTangAngle, double MaxDist, double MaxDistPerp, double MaxOverlap, const HString& Mode) const; // Compute the union of cotangential contours. HXLDCont UnionCotangentialContoursXld(double FitClippingLength, double FitLength, double MaxTangAngle, double MaxDist, double MaxDistPerp, double MaxOverlap, const char* Mode) const; // Transform a contour in polar coordinates back to Cartesian coordinates HXLDCont PolarTransContourXldInv(const HTuple& Row, const HTuple& Column, double AngleStart, double AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, Hlong WidthIn, Hlong HeightIn, Hlong Width, Hlong Height) const; // Transform a contour in polar coordinates back to Cartesian coordinates HXLDCont PolarTransContourXldInv(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong WidthIn, Hlong HeightIn, Hlong Width, Hlong Height) const; // Transform a contour in an annular arc to polar coordinates. HXLDCont PolarTransContourXld(const HTuple& Row, const HTuple& Column, double AngleStart, double AngleEnd, const HTuple& RadiusStart, const HTuple& RadiusEnd, Hlong Width, Hlong Height) const; // Transform a contour in an annular arc to polar coordinates. HXLDCont PolarTransContourXld(double Row, double Column, double AngleStart, double AngleEnd, double RadiusStart, double RadiusEnd, Hlong Width, Hlong Height) const; // Transform a NURBS curve into an XLD contour. void GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const HTuple& Knots, const HTuple& Weights, Hlong Degree, const HTuple& MaxError, const HTuple& MaxDistance); // Transform a NURBS curve into an XLD contour. void GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const HString& Knots, const HString& Weights, Hlong Degree, double MaxError, double MaxDistance); // Transform a NURBS curve into an XLD contour. void GenContourNurbsXld(const HTuple& Rows, const HTuple& Cols, const char* Knots, const char* Weights, Hlong Degree, double MaxError, double MaxDistance); // Compute the union of closed contours. HXLDCont Union2ClosedContoursXld(const HXLDCont& Contours2) const; // Compute the symmetric difference of closed contours. HXLDCont SymmDifferenceClosedContoursXld(const HXLDCont& Contours2) const; // Compute the difference of closed contours. HXLDCont DifferenceClosedContoursXld(const HXLDCont& Sub) const; // Intersect closed contours. HXLDCont IntersectionClosedContoursXld(const HXLDCont& Contours2) const; // Compute the union of contours that belong to the same circle. HXLDCont UnionCocircularContoursXld(const HTuple& MaxArcAngleDiff, const HTuple& MaxArcOverlap, const HTuple& MaxTangentAngle, const HTuple& MaxDist, const HTuple& MaxRadiusDiff, const HTuple& MaxCenterDist, const HString& MergeSmallContours, Hlong Iterations) const; // Compute the union of contours that belong to the same circle. HXLDCont UnionCocircularContoursXld(double MaxArcAngleDiff, double MaxArcOverlap, double MaxTangentAngle, double MaxDist, double MaxRadiusDiff, double MaxCenterDist, const HString& MergeSmallContours, Hlong Iterations) const; // Compute the union of contours that belong to the same circle. HXLDCont UnionCocircularContoursXld(double MaxArcAngleDiff, double MaxArcOverlap, double MaxTangentAngle, double MaxDist, double MaxRadiusDiff, double MaxCenterDist, const char* MergeSmallContours, Hlong Iterations) const; // Crop an XLD contour. HXLDCont CropContoursXld(const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, const HString& CloseContours) const; // Crop an XLD contour. HXLDCont CropContoursXld(double Row1, double Col1, double Row2, double Col2, const HString& CloseContours) const; // Crop an XLD contour. HXLDCont CropContoursXld(double Row1, double Col1, double Row2, double Col2, const char* CloseContours) const; // Generate one XLD contour in the shape of a cross for each input point. void GenCrossContourXld(const HTuple& Row, const HTuple& Col, const HTuple& Size, double Angle); // Generate one XLD contour in the shape of a cross for each input point. void GenCrossContourXld(double Row, double Col, double Size, double Angle); // Sort contours with respect to their relative position. HXLDCont SortContoursXld(const HString& SortMode, const HString& Order, const HString& RowOrCol) const; // Sort contours with respect to their relative position. HXLDCont SortContoursXld(const char* SortMode, const char* Order, const char* RowOrCol) const; // Merge XLD contours from successive line scan images. HXLDCont MergeContLineScanXld(const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, const HTuple& Margin, const HString& MergeBorder, Hlong MaxImagesCont) const; // Merge XLD contours from successive line scan images. HXLDCont MergeContLineScanXld(const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, double Margin, const HString& MergeBorder, Hlong MaxImagesCont) const; // Merge XLD contours from successive line scan images. HXLDCont MergeContLineScanXld(const HXLDCont& PrevConts, HXLDCont* PrevMergedConts, Hlong ImageHeight, double Margin, const char* MergeBorder, Hlong MaxImagesCont) const; // Read XLD contours to a file in ARC/INFO generate format. void ReadContourXldArcInfo(const HString& FileName); // Read XLD contours to a file in ARC/INFO generate format. void ReadContourXldArcInfo(const char* FileName); // Write XLD contours to a file in ARC/INFO generate format. void WriteContourXldArcInfo(const HString& FileName) const; // Write XLD contours to a file in ARC/INFO generate format. void WriteContourXldArcInfo(const char* FileName) const; // Compute the parallel contour of an XLD contour. HXLDCont GenParallelContourXld(const HString& Mode, const HTuple& Distance) const; // Compute the parallel contour of an XLD contour. HXLDCont GenParallelContourXld(const HString& Mode, double Distance) const; // Compute the parallel contour of an XLD contour. HXLDCont GenParallelContourXld(const char* Mode, double Distance) const; // Create an XLD contour in the shape of a rectangle. void GenRectangle2ContourXld(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2); // Create an XLD contour in the shape of a rectangle. void GenRectangle2ContourXld(double Row, double Column, double Phi, double Length1, double Length2); // Compute the distances of all contour points to a rectangle. HTuple DistRectangle2ContourPointsXld(Hlong ClippingEndPoints, double Row, double Column, double Phi, double Length1, double Length2) const; // Fit rectangles to XLD contours. void FitRectangle2ContourXld(const HString& Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Length1, HTuple* Length2, HTuple* PointOrder) const; // Fit rectangles to XLD contours. void FitRectangle2ContourXld(const HString& Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, double* Row, double* Column, double* Phi, double* Length1, double* Length2, HString* PointOrder) const; // Fit rectangles to XLD contours. void FitRectangle2ContourXld(const char* Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, double* Row, double* Column, double* Phi, double* Length1, double* Length2, HString* PointOrder) const; // Segment XLD contour parts whose local attributes fulfill given conditions. HXLDCont SegmentContourAttribXld(const HTuple& Attribute, const HString& Operation, const HTuple& Min, const HTuple& Max) const; // Segment XLD contour parts whose local attributes fulfill given conditions. HXLDCont SegmentContourAttribXld(const HString& Attribute, const HString& Operation, double Min, double Max) const; // Segment XLD contour parts whose local attributes fulfill given conditions. HXLDCont SegmentContourAttribXld(const char* Attribute, const char* Operation, double Min, double Max) const; // Segment XLD contours into line segments and circular or elliptic arcs. HXLDCont SegmentContoursXld(const HString& Mode, Hlong SmoothCont, double MaxLineDist1, double MaxLineDist2) const; // Segment XLD contours into line segments and circular or elliptic arcs. HXLDCont SegmentContoursXld(const char* Mode, Hlong SmoothCont, double MaxLineDist1, double MaxLineDist2) const; // Approximate XLD contours by circles. void FitCircleContourXld(const HString& Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, HTuple* Row, HTuple* Column, HTuple* Radius, HTuple* StartPhi, HTuple* EndPhi, HTuple* PointOrder) const; // Approximate XLD contours by circles. void FitCircleContourXld(const HString& Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, double* Row, double* Column, double* Radius, double* StartPhi, double* EndPhi, HString* PointOrder) const; // Approximate XLD contours by circles. void FitCircleContourXld(const char* Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, double* Row, double* Column, double* Radius, double* StartPhi, double* EndPhi, HString* PointOrder) const; // Approximate XLD contours by line segments. void FitLineContourXld(const HString& Algorithm, Hlong MaxNumPoints, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, HTuple* RowBegin, HTuple* ColBegin, HTuple* RowEnd, HTuple* ColEnd, HTuple* Nr, HTuple* Nc, HTuple* Dist) const; // Approximate XLD contours by line segments. void FitLineContourXld(const HString& Algorithm, Hlong MaxNumPoints, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, double* RowBegin, double* ColBegin, double* RowEnd, double* ColEnd, double* Nr, double* Nc, double* Dist) const; // Approximate XLD contours by line segments. void FitLineContourXld(const char* Algorithm, Hlong MaxNumPoints, Hlong ClippingEndPoints, Hlong Iterations, double ClippingFactor, double* RowBegin, double* ColBegin, double* RowEnd, double* ColEnd, double* Nr, double* Nc, double* Dist) const; // Compute the distances of all contour points to an ellipse. HTuple DistEllipseContourPointsXld(const HString& DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2) const; // Compute the distances of all contour points to an ellipse. HTuple DistEllipseContourPointsXld(const char* DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2) const; // Compute the distance of contours to an ellipse. void DistEllipseContourXld(const HString& Mode, Hlong MaxNumPoints, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2, HTuple* MinDist, HTuple* MaxDist, HTuple* AvgDist, HTuple* SigmaDist) const; // Compute the distance of contours to an ellipse. void DistEllipseContourXld(const HString& Mode, Hlong MaxNumPoints, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2, double* MinDist, double* MaxDist, double* AvgDist, double* SigmaDist) const; // Compute the distance of contours to an ellipse. void DistEllipseContourXld(const char* Mode, Hlong MaxNumPoints, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2, double* MinDist, double* MaxDist, double* AvgDist, double* SigmaDist) const; // Approximate XLD contours by ellipses or elliptic arcs. void FitEllipseContourXld(const HString& Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong VossTabSize, Hlong Iterations, double ClippingFactor, HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Radius1, HTuple* Radius2, HTuple* StartPhi, HTuple* EndPhi, HTuple* PointOrder) const; // Approximate XLD contours by ellipses or elliptic arcs. void FitEllipseContourXld(const HString& Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong VossTabSize, Hlong Iterations, double ClippingFactor, double* Row, double* Column, double* Phi, double* Radius1, double* Radius2, double* StartPhi, double* EndPhi, HString* PointOrder) const; // Approximate XLD contours by ellipses or elliptic arcs. void FitEllipseContourXld(const char* Algorithm, Hlong MaxNumPoints, double MaxClosureDist, Hlong ClippingEndPoints, Hlong VossTabSize, Hlong Iterations, double ClippingFactor, double* Row, double* Column, double* Phi, double* Radius1, double* Radius2, double* StartPhi, double* EndPhi, HString* PointOrder) const; // Create XLD contours corresponding to circles or circular arcs. void GenCircleContourXld(const HTuple& Row, const HTuple& Column, const HTuple& Radius, const HTuple& StartPhi, const HTuple& EndPhi, const HTuple& PointOrder, double Resolution); // Create XLD contours corresponding to circles or circular arcs. void GenCircleContourXld(double Row, double Column, double Radius, double StartPhi, double EndPhi, const HString& PointOrder, double Resolution); // Create XLD contours corresponding to circles or circular arcs. void GenCircleContourXld(double Row, double Column, double Radius, double StartPhi, double EndPhi, const char* PointOrder, double Resolution); // Create an XLD contour that corresponds to an elliptic arc. void GenEllipseContourXld(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, const HTuple& StartPhi, const HTuple& EndPhi, const HTuple& PointOrder, double Resolution); // Create an XLD contour that corresponds to an elliptic arc. void GenEllipseContourXld(double Row, double Column, double Phi, double Radius1, double Radius2, double StartPhi, double EndPhi, const HString& PointOrder, double Resolution); // Create an XLD contour that corresponds to an elliptic arc. void GenEllipseContourXld(double Row, double Column, double Phi, double Radius1, double Radius2, double StartPhi, double EndPhi, const char* PointOrder, double Resolution); // Add noise to XLD contours. HXLDCont AddNoiseWhiteContourXld(Hlong NumRegrPoints, double Amp) const; // Approximate XLD contours by polygons. HXLDPoly GenPolygonsXld(const HString& Type, const HTuple& Alpha) const; // Approximate XLD contours by polygons. HXLDPoly GenPolygonsXld(const HString& Type, double Alpha) const; // Approximate XLD contours by polygons. HXLDPoly GenPolygonsXld(const char* Type, double Alpha) const; // Apply a projective transformation to an XLD contour. HXLDCont ProjectiveTransContourXld(const HHomMat2D& HomMat2D) const; // Apply an arbitrary affine 2D transformation to XLD contours. HXLDCont AffineTransContourXld(const HHomMat2D& HomMat2D) const; // Close an XLD contour. HXLDCont CloseContoursXld() const; // Clip the end points of an XLD contour. HXLDCont ClipEndPointsContoursXld(const HString& Mode, const HTuple& Length) const; // Clip the end points of an XLD contour. HXLDCont ClipEndPointsContoursXld(const HString& Mode, double Length) const; // Clip the end points of an XLD contour. HXLDCont ClipEndPointsContoursXld(const char* Mode, double Length) const; // Clip an XLD contour. HXLDCont ClipContoursXld(Hlong Row1, Hlong Column1, Hlong Row2, Hlong Column2) const; // Select XLD contours with a local maximum of gray values. HXLDCont LocalMaxContoursXld(const HImage& Image, const HTuple& MinPercent, Hlong MinDiff, Hlong Distance) const; // Select XLD contours with a local maximum of gray values. HXLDCont LocalMaxContoursXld(const HImage& Image, Hlong MinPercent, Hlong MinDiff, Hlong Distance) const; // Compute the union of neighboring straight contours that have a similar distance from a given line. HXLDCont UnionStraightContoursHistoXld(HXLDCont* SelectedContours, Hlong RefLineStartRow, Hlong RefLineStartColumn, Hlong RefLineEndRow, Hlong RefLineEndColumn, Hlong Width, Hlong MaxWidth, Hlong FilterSize, HTuple* HistoValues) const; // Compute the union of neighboring straight contours that have a similar direction. HXLDCont UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const HString& Mode, const HTuple& Iterations) const; // Compute the union of neighboring straight contours that have a similar direction. HXLDCont UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const HString& Mode, const HString& Iterations) const; // Compute the union of neighboring straight contours that have a similar direction. HXLDCont UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const char* Mode, const char* Iterations) const; // Compute the union of collinear contours (operator with extended functionality). HXLDCont UnionCollinearContoursExtXld(double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, double MaxOverlap, double MaxRegrError, double MaxCosts, double WeightDist, double WeightShift, double WeightAngle, double WeightLink, double WeightRegr, const HString& Mode) const; // Compute the union of collinear contours (operator with extended functionality). HXLDCont UnionCollinearContoursExtXld(double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, double MaxOverlap, double MaxRegrError, double MaxCosts, double WeightDist, double WeightShift, double WeightAngle, double WeightLink, double WeightRegr, const char* Mode) const; // Unite approximately collinear contours. HXLDCont UnionCollinearContoursXld(double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, const HString& Mode) const; // Unite approximately collinear contours. HXLDCont UnionCollinearContoursXld(double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, const char* Mode) const; // Compute the union of contours whose end points are close together. HXLDCont UnionAdjacentContoursXld(double MaxDistAbs, double MaxDistRel, const HString& Mode) const; // Compute the union of contours whose end points are close together. HXLDCont UnionAdjacentContoursXld(double MaxDistAbs, double MaxDistRel, const char* Mode) const; // Select XLD contours according to several features. HXLDCont SelectContoursXld(const HString& Feature, double Min1, double Max1, double Min2, double Max2) const; // Select XLD contours according to several features. HXLDCont SelectContoursXld(const char* Feature, double Min1, double Max1, double Min2, double Max2) const; // Return XLD contour parameters. HTuple GetRegressParamsXld(HTuple* Nx, HTuple* Ny, HTuple* Dist, HTuple* Fpx, HTuple* Fpy, HTuple* Lpx, HTuple* Lpy, HTuple* Mean, HTuple* Deviation) const; // Calculate the parameters of a regression line to an XLD contour. HXLDCont RegressContoursXld(const HString& Mode, Hlong Iterations) const; // Calculate the parameters of a regression line to an XLD contour. HXLDCont RegressContoursXld(const char* Mode, Hlong Iterations) const; // Calculate the direction of an XLD contour for each contour point. HTuple GetContourAngleXld(const HString& AngleMode, const HString& CalcMode, Hlong Lookaround) const; // Calculate the direction of an XLD contour for each contour point. HTuple GetContourAngleXld(const char* AngleMode, const char* CalcMode, Hlong Lookaround) const; // Smooth an XLD contour. HXLDCont SmoothContoursXld(Hlong NumRegrPoints) const; // Return the number of points in an XLD contour. HTuple ContourPointNumXld() const; // Return the names of the defined global attributes of an XLD contour. HTuple QueryContourGlobalAttribsXld() const; // Return global attributes values of an XLD contour. HTuple GetContourGlobalAttribXld(const HTuple& Name) const; // Return global attributes values of an XLD contour. HTuple GetContourGlobalAttribXld(const HString& Name) const; // Return global attributes values of an XLD contour. HTuple GetContourGlobalAttribXld(const char* Name) const; // Return the names of the defined attributes of an XLD contour. HTuple QueryContourAttribsXld() const; // Return point attribute values of an XLD contour. HTuple GetContourAttribXld(const HString& Name) const; // Return point attribute values of an XLD contour. HTuple GetContourAttribXld(const char* Name) const; // Return the coordinates of an XLD contour. void GetContourXld(HTuple* Row, HTuple* Col) const; // Generate an XLD contour with rounded corners from a polygon (given as tuples). void GenContourPolygonRoundedXld(const HTuple& Row, const HTuple& Col, const HTuple& Radius, const HTuple& SamplingInterval); // Generate an XLD contour with rounded corners from a polygon (given as tuples). void GenContourPolygonRoundedXld(const HTuple& Row, const HTuple& Col, const HTuple& Radius, double SamplingInterval); // Generate an XLD contour from a polygon (given as tuples). void GenContourPolygonXld(const HTuple& Row, const HTuple& Col); // Calculate the difference of two object tuples. HXLDCont ObjDiff(const HXLDCont& ObjectsSub) const; // Copy an iconic object in the HALCON database. HXLDCont CopyObj(Hlong Index, Hlong NumObj) const; // Concatenate two iconic object tuples. HXLDCont ConcatObj(const HXLDCont& Objects2) const; // Select objects from an object tuple. HXLDCont SelectObj(const HTuple& Index) const; // Select objects from an object tuple. HXLDCont SelectObj(Hlong Index) const; // Compare iconic objects regarding equality. Hlong CompareObj(const HXLDCont& Objects2, const HTuple& Epsilon) const; // Compare iconic objects regarding equality. Hlong CompareObj(const HXLDCont& Objects2, double Epsilon) const; // Compare image objects regarding equality. Hlong TestEqualObj(const HXLDCont& Objects2) const; // Create a region from an XLD contour. HRegion GenRegionContourXld(const HString& Mode) const; // Create a region from an XLD contour. HRegion GenRegionContourXld(const char* Mode) const; // Prepare an anisotropically scaled shape model for matching from XLD contours. HShapeModel CreateAnisoShapeModelXld(const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, double ScaleRMin, double ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, double ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast) const; // Prepare an anisotropically scaled shape model for matching from XLD contours. HShapeModel CreateAnisoShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleRMin, double ScaleRMax, double ScaleRStep, double ScaleCMin, double ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast) const; // Prepare an anisotropically scaled shape model for matching from XLD contours. HShapeModel CreateAnisoShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleRMin, double ScaleRMax, double ScaleRStep, double ScaleCMin, double ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast) const; // Prepare an isotropically scaled shape model for matching from XLD contours. HShapeModel CreateScaledShapeModelXld(const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, double ScaleMin, double ScaleMax, const HTuple& ScaleStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast) const; // Prepare an isotropically scaled shape model for matching from XLD contours. HShapeModel CreateScaledShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleMin, double ScaleMax, double ScaleStep, const HString& Optimization, const HString& Metric, Hlong MinContrast) const; // Prepare an isotropically scaled shape model for matching from XLD contours. HShapeModel CreateScaledShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleMin, double ScaleMax, double ScaleStep, const char* Optimization, const char* Metric, Hlong MinContrast) const; // Prepare a shape model for matching from XLD contours. HShapeModel CreateShapeModelXld(const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast) const; // Prepare a shape model for matching from XLD contours. HShapeModel CreateShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const HString& Optimization, const HString& Metric, Hlong MinContrast) const; // Prepare a shape model for matching from XLD contours. HShapeModel CreateShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const char* Optimization, const char* Metric, Hlong MinContrast) const; // Prepare a deformable model for local deformable matching from XLD contours. HDeformableModel CreateLocalDeformableModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for local deformable matching from XLD contours. HDeformableModel CreateLocalDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for local deformable matching from XLD contours. HDeformableModel CreateLocalDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for planar calibrated matching from XLD contours. HDeformableModel CreatePlanarCalibDeformableModelXld(const HCamPar& CamParam, const HPose& ReferencePose, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for planar calibrated matching from XLD contours. HDeformableModel CreatePlanarCalibDeformableModelXld(const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for planar calibrated matching from XLD contours. HDeformableModel CreatePlanarCalibDeformableModelXld(const HCamPar& CamParam, const HPose& ReferencePose, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for planar uncalibrated matching from XLD contours. HDeformableModel CreatePlanarUncalibDeformableModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for planar uncalibrated matching from XLD contours. HDeformableModel CreatePlanarUncalibDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Prepare a deformable model for planar uncalibrated matching from XLD contours. HDeformableModel CreatePlanarUncalibDeformableModelXld(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const; // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid. HImage GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const HTuple& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const; // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid. HImage GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const HString& Rotation, const HTuple& Row, const HTuple& Column, const HString& MapType) const; // Compute the mapping between the distorted image and the rectified image based upon the points of a regular grid. HImage GenGridRectificationMap(const HImage& Image, HXLDCont* Meshes, Hlong GridSpacing, const char* Rotation, const HTuple& Row, const HTuple& Column, const char* MapType) const; // Interactive modification of a NURBS curve using interpolation. void DrawNurbsInterpMod(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents); // Interactive modification of a NURBS curve using interpolation. void DrawNurbsInterpMod(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& TangentsIn, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents); // Interactive drawing of a NURBS curve using interpolation. void DrawNurbsInterp(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, Hlong Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents); // Interactive drawing of a NURBS curve using interpolation. void DrawNurbsInterp(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, Hlong Degree, HTuple* ControlRows, HTuple* ControlCols, HTuple* Knots, HTuple* Rows, HTuple* Cols, HTuple* Tangents); // Interactive modification of a NURBS curve. void DrawNurbsMod(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights); // Interactive modification of a NURBS curve. void DrawNurbsMod(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit, Hlong Degree, const HTuple& RowsIn, const HTuple& ColsIn, const HTuple& WeightsIn, HTuple* Rows, HTuple* Cols, HTuple* Weights); // Interactive drawing of a NURBS curve. void DrawNurbs(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, Hlong Degree, HTuple* Rows, HTuple* Cols, HTuple* Weights); // Interactive drawing of a NURBS curve. void DrawNurbs(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, Hlong Degree, HTuple* Rows, HTuple* Cols, HTuple* Weights); // Interactive modification of a contour. HXLDCont DrawXldMod(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio, const HString& Edit) const; // Interactive modification of a contour. HXLDCont DrawXldMod(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio, const char* Edit) const; // Interactive drawing of a contour. void DrawXld(const HWindow& WindowHandle, const HString& Rotate, const HString& Move, const HString& Scale, const HString& KeepRatio); // Interactive drawing of a contour. void DrawXld(const HWindow& WindowHandle, const char* Rotate, const char* Move, const char* Scale, const char* KeepRatio); // Calculate the pointwise distance from one contour to another. HXLDCont DistanceContoursXld(const HXLDCont& ContourTo, const HString& Mode) const; // Calculate the pointwise distance from one contour to another. HXLDCont DistanceContoursXld(const HXLDCont& ContourTo, const char* Mode) const; // Calculate the minimum distance between two contours. HTuple DistanceCcMin(const HXLDCont& Contour2, const HString& Mode) const; // Calculate the minimum distance between two contours. HTuple DistanceCcMin(const HXLDCont& Contour2, const char* Mode) const; // Calculate the distance between two contours. void DistanceCc(const HXLDCont& Contour2, const HString& Mode, HTuple* DistanceMin, HTuple* DistanceMax) const; // Calculate the distance between two contours. void DistanceCc(const HXLDCont& Contour2, const HString& Mode, double* DistanceMin, double* DistanceMax) const; // Calculate the distance between two contours. void DistanceCc(const HXLDCont& Contour2, const char* Mode, double* DistanceMin, double* DistanceMax) const; // Calculate the distance between a line segment and one contour. void DistanceSc(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* DistanceMin, HTuple* DistanceMax) const; // Calculate the distance between a line segment and one contour. void DistanceSc(double Row1, double Column1, double Row2, double Column2, double* DistanceMin, double* DistanceMax) const; // Calculate the distance between a line and one contour. void DistanceLc(const HTuple& Row1, const HTuple& Column1, const HTuple& Row2, const HTuple& Column2, HTuple* DistanceMin, HTuple* DistanceMax) const; // Calculate the distance between a line and one contour. void DistanceLc(double Row1, double Column1, double Row2, double Column2, double* DistanceMin, double* DistanceMax) const; // Calculate the distance between a point and one contour. void DistancePc(const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax) const; // Calculate the distance between a point and one contour. void DistancePc(double Row, double Column, double* DistanceMin, double* DistanceMax) const; // Read XLD contours from a DXF file. HTuple ReadContourXldDxf(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue); // Read XLD contours from a DXF file. HString ReadContourXldDxf(const HString& FileName, const HString& GenParamName, double GenParamValue); // Read XLD contours from a DXF file. HString ReadContourXldDxf(const char* FileName, const char* GenParamName, double GenParamValue); // Write XLD contours to a file in DXF format. void WriteContourXldDxf(const HString& FileName) const; // Write XLD contours to a file in DXF format. void WriteContourXldDxf(const char* FileName) const; // Choose all contours or polygons containing a given point. HXLDCont SelectXldPoint(const HTuple& Row, const HTuple& Column) const; // Choose all contours or polygons containing a given point. HXLDCont SelectXldPoint(double Row, double Column) const; // Select contours or polygons using shape features. HXLDCont SelectShapeXld(const HTuple& Features, const HString& Operation, const HTuple& Min, const HTuple& Max) const; // Select contours or polygons using shape features. HXLDCont SelectShapeXld(const HString& Features, const HString& Operation, double Min, double Max) const; // Select contours or polygons using shape features. HXLDCont SelectShapeXld(const char* Features, const char* Operation, double Min, double Max) const; // Transform the shape of contours or polygons. HXLDCont ShapeTransXld(const HString& Type) const; // Transform the shape of contours or polygons. HXLDCont ShapeTransXld(const char* Type) const; // Calibrate the radial distortion. HXLDCont RadialDistortionSelfCalibration(Hlong Width, Hlong Height, double InlierThreshold, Hlong RandSeed, const HString& DistortionModel, const HString& DistortionCenter, double PrincipalPointVar, HCamPar* CameraParam) const; // Calibrate the radial distortion. HXLDCont RadialDistortionSelfCalibration(Hlong Width, Hlong Height, double InlierThreshold, Hlong RandSeed, const char* DistortionModel, const char* DistortionCenter, double PrincipalPointVar, HCamPar* CameraParam) const; // Transform an XLD contour into the plane z=0 of a world coordinate system. HXLDCont ContourToWorldPlaneXld(const HTuple& CameraParam, const HPose& WorldPose, const HTuple& Scale) const; // Transform an XLD contour into the plane z=0 of a world coordinate system. HXLDCont ContourToWorldPlaneXld(const HTuple& CameraParam, const HPose& WorldPose, const HString& Scale) const; // Transform an XLD contour into the plane z=0 of a world coordinate system. HXLDCont ContourToWorldPlaneXld(const HTuple& CameraParam, const HPose& WorldPose, const char* Scale) const; // Change the radial distortion of contours. HXLDCont ChangeRadialDistortionContoursXld(const HCamPar& CamParamIn, const HCamPar& CamParamOut) const; // Calculate the minimum distance between two contours and the points used for the calculation. HTuple DistanceCcMinPoints(const HXLDCont& Contour2, const HString& Mode, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2) const; // Calculate the minimum distance between two contours and the points used for the calculation. double DistanceCcMinPoints(const HXLDCont& Contour2, const HString& Mode, double* Row1, double* Column1, double* Row2, double* Column2) const; // Calculate the minimum distance between two contours and the points used for the calculation. double DistanceCcMinPoints(const HXLDCont& Contour2, const char* Mode, double* Row1, double* Column1, double* Row2, double* Column2) const; // Insert objects into an iconic object tuple. HXLDCont InsertObj(const HXLDCont& ObjectsInsert, Hlong Index) const; // Remove objects from an iconic object tuple. HXLDCont RemoveObj(const HTuple& Index) const; // Remove objects from an iconic object tuple. HXLDCont RemoveObj(Hlong Index) const; // Replaces one or more elements of an iconic object tuple. HXLDCont ReplaceObj(const HXLDCont& ObjectsReplace, const HTuple& Index) const; // Replaces one or more elements of an iconic object tuple. HXLDCont ReplaceObj(const HXLDCont& ObjectsReplace, Hlong Index) const; private: // Verify matching semantic type ('xld_cont')! void AssertObjectClass(); }; } #endif