{
  "id": "opencv/group-rectangles-empty",
  "signature": "cv::error: (-215:Assertion failed) group_threshold > 0 in function 'groupRectangles'",
  "signature_zh": "cv::error: (-215:断言失败) group_threshold > 0 在函数 'groupRectangles' 中",
  "regex": "Assertion failed \\(group_threshold > 0\\)",
  "domain": "opencv",
  "category": "assertion_error",
  "subcategory": null,
  "root_cause": "The group_threshold parameter passed to cv::groupRectangles must be positive; a non-positive value causes the function to reject the input.",
  "root_cause_type": "generic",
  "root_cause_zh": "传递给 cv::groupRectangles 的 group_threshold 参数必须为正数；非正数值会导致函数拒绝输入。",
  "versions": [
    {
      "version": "4.5.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "4.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "4.9.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The function explicitly requires group_threshold > 0; zero or negative values trigger the assertion error. Use cv::partition or manual merging instead.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The assertion checks group_threshold, not the rectangle list; an empty list may cause a different error, but the threshold check still fails first.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set group_threshold to 1 or higher: cv::groupRectangles(rectList, weights, 1, 0.2);",
      "success_rate": 1.0,
      "how": "Set group_threshold to 1 or higher: cv::groupRectangles(rectList, weights, 1, 0.2);",
      "condition": "",
      "sources": []
    },
    {
      "action": "If grouping is not needed, use NMS separately (e.g., cv::dnn::NMSBoxes) instead of groupRectangles.",
      "success_rate": 0.95,
      "how": "If grouping is not needed, use NMS separately (e.g., cv::dnn::NMSBoxes) instead of groupRectangles.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "将 group_threshold 设置为 1 或更高：cv::groupRectangles(rectList, weights, 1, 0.2);",
    "如果不需要分组，使用单独的 NMS（例如 cv::dnn::NMSBoxes）代替 groupRectangles。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.opencv.org/4.x/d5/d54/group__objdetect.html#ga3d6b9e7b8c0f5a1b9e8f1f0a5b7c3e1f",
  "official_doc_section": null,
  "error_code": "-215",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-06-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}