using System; using HalconDotNet; namespace HalconTools { /// /// This class holds the result data from a model detection. For any new /// detection run, it also remembers the time needed /// for the model detection. /// public class MatchingResult { /// /// Model contour applied for model detection /// public HXLDCont mContour; /// /// All model contours detected /// public HXLDCont mContResults; /// /// Row coordinate of the found instances of the model /// public HTuple mRow; /// /// Column coordinate of the found instances of the model /// public HTuple mCol; /// /// Rotation angle of the found instances of the model /// public HTuple mAngle; /// /// Scale of the found instances of the model in the row direction /// public HTuple mScaleRow; /// /// Scale of the found instances of the model in the column direction /// public HTuple mScaleCol; /// /// Score of the found instances of the model /// public HTuple mScore; /// /// Time needed to detect count numbers of model instances /// public double mTime; /// /// Number of model instances found /// public int count; /// /// 2D homogeneous transformation matrix that can be used to transform /// data from the model into the test image. /// public HHomMat2D hmat; /// Constructor public MatchingResult() { // hmat = new HHomMat2D(); mContResults = new HXLDCont(); } /// /// Gets the detected contour. /// /// Detected contour public HXLDCont getDetectionResults() { HXLDCont rContours = new HXLDCont(); hmat.HomMat2dIdentity(); mContResults.GenEmptyObj(); for(int i = 0; i /// Resets the detection results and sets count to 0. /// public void reset() { count = 0; } }//end of class }//end of namespace