{
  "id": "opencv/image-stitching-out-of-memory",
  "signature": "cv::error: Out of memory in function 'cv::detail::MultiBandBlender::feed'",
  "signature_zh": "cv::error: 内存不足 在函数 'cv::detail::MultiBandBlender::feed' 中",
  "regex": "cv::error: Out of memory in function 'cv::detail::MultiBandBlender::feed'",
  "domain": "opencv",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The image stitching pipeline ran out of memory when trying to blend large images, typically due to high resolution or too many images in the panorama.",
  "root_cause_type": "generic",
  "root_cause_zh": "图像拼接管线在尝试混合大图像时内存耗尽，通常是由于分辨率过高或全景图中的图像数量过多。",
  "versions": [
    {
      "version": "4.7.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "4.8.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": "Increasing the system swap space without reducing image size",
      "why_fails": "Swap space does not help with GPU memory or large CPU allocations; the blender still fails due to insufficient RAM.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Switching to CUDA backend without checking GPU memory limits",
      "why_fails": "GPU memory is often more limited than system RAM; this can cause out-of-memory errors faster.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Reduce image resolution before stitching: cv::resize each image to 50% using INTER_AREA, then run stitching. For example: cv::resize(img, img, cv::Size(), 0.5, 0.5, cv::INTER_AREA).",
      "success_rate": 0.9,
      "how": "Reduce image resolution before stitching: cv::resize each image to 50% using INTER_AREA, then run stitching. For example: cv::resize(img, img, cv::Size(), 0.5, 0.5, cv::INTER_AREA).",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the 'scans' or 'affine' warper type in cv::Stitcher::create which uses less memory than the default 'spherical' warper.",
      "success_rate": 0.8,
      "how": "Use the 'scans' or 'affine' warper type in cv::Stitcher::create which uses less memory than the default 'spherical' warper.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Reduce image resolution before stitching: cv::resize each image to 50% using INTER_AREA, then run stitching. For example: cv::resize(img, img, cv::Size(), 0.5, 0.5, cv::INTER_AREA).",
    "Use the 'scans' or 'affine' warper type in cv::Stitcher::create which uses less memory than the default 'spherical' warper."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.opencv.org/4.x/d8/d19/tutorial_stitcher.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2024-11-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}