public int CompareTo(FormProperty rhs) { int result = Name.CompareTo(rhs.Name); if (result != 0) { return(result); } result = (ForeColor ?? Color.Black).ToArgb().CompareTo((rhs.ForeColor ?? Color.Black).ToArgb()); if (result != 0) { return(result); } result = (BackColor ?? Color.Black).ToArgb().CompareTo((rhs.BackColor ?? Color.Black).ToArgb()); if (result != 0) { return(result); } result = GroupingModes.SequenceCompareTo(rhs.GroupingModes); if (result != 0) { return(result); } result = PivotModes.SequenceCompareTo(rhs.PivotModes); if (result != 0) { return(result); } result = SortColumns.SequenceCompareTo(rhs.SortColumns); if (result != 0) { return(result); } return(ColumnProperties.SequenceCompareTo(rhs.ColumnProperties)); }
/// <summary> /// This one has no documentation in OpenCV sources or knowledge base /// </summary> /// <param name="image">Original RGB or Greyscale image from wich the regions were extracted</param> /// <param name="channel">Vector of single channel images CV_8UC1 from wich the regions were extracted</param> /// <param name="regions">Regions extracted by DetectRegions function</param> /// <param name="groups_rects">The output of the algorithm are stored in this parameter as list of rectangles</param> /// <param name="method">Grouping method (see GroupingModes). Can be one of { OrientationHorizontal, OrientationAny }</param> /// <param name="filename">The XML or YAML file with the classifier model. Only to use when grouping method is OrientationAny</param> /// <param name="minProbablity">The minimum probability for accepting a group. Only to use when grouping method is OrientationAny</param> public static void ErGrouping(Mat image, Mat[] channels, Point[][] regions, out Rect[] groups_rects, GroupingModes method, string filename = null, float minProbablity = 0.5f) { using (var vecChannels = new InputArray(channels)) using (var vecRegions = new VectorOfVectorPoint(regions)) using (var vecRects = new VectorOfRect()) using (var input = new InputArray(image)) { if (null == filename) { filename = string.Empty; } NativeMethods.text_erGrouping2(input.CvPtr, vecChannels.CvPtr, vecRegions.CvPtr, vecRects.CvPtr, (int)method, filename, minProbablity); groups_rects = vecRects.ToArray(); } }