{
  "version": 1,
  "specimen": "Synthetic threshold and connected-component inspection",
  "provenance": "All pixels and labels generated by this source; no camera, client, stock or personal images.",
  "source_sha256": "7bfa5302c9fa01b28ce649fad15f3248865f76de2bbc5d098eb4d238a3e942a4",
  "dimensions": [
    320,
    180
  ],
  "parameters": {
    "dark_below": 100,
    "area_min": 600,
    "area_max": 1600,
    "fill_min": 0.85,
    "border_median_min": 180,
    "connectivity": 4
  },
  "limitations": [
    "Four constructed cases, not an accuracy benchmark or representative dataset.",
    "Fixed thresholds are chosen for these shapes; no model training or semantic object recognition.",
    "The border lighting rule only observes the border and cannot detect every lighting failure.",
    "The count does not control equipment or certify product quality."
  ],
  "cases": [
    {
      "id": "clean",
      "title": "Separated shapes",
      "change": "Three dark rectangles on an even light background.",
      "input": "cv-clean-input.png",
      "result_image": "cv-clean-result.png",
      "input_sha256": "adf2f0181d49cac33b7b7a95e2d02445ac1d59ba2712a8b4af6effe52cad627d",
      "target_boxes": [
        [
          40,
          65,
          70,
          101
        ],
        [
          120,
          65,
          150,
          101
        ],
        [
          200,
          65,
          230,
          101
        ]
      ],
      "target_count": 3,
      "detection": {
        "decision": "report",
        "reason": "Lighting gate passed; report qualifying dark components.",
        "border_median": 235.0,
        "components": [
          {
            "box": [
              40,
              65,
              70,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          },
          {
            "box": [
              120,
              65,
              150,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          },
          {
            "box": [
              200,
              65,
              230,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          }
        ],
        "accepted_count": 3
      },
      "evaluation": {
        "matched": 3,
        "false_positives": 0,
        "missed": 0,
        "outcome": "matches constructed labels",
        "note": "One-to-one bounding-box matching at IoU >= 0.5 against three generated target rectangles."
      }
    },
    {
      "id": "contamination",
      "title": "A false positive",
      "change": "A fourth dark rectangle represents contamination. Its size passes the same rule as a target.",
      "input": "cv-contamination-input.png",
      "result_image": "cv-contamination-result.png",
      "input_sha256": "79c79caa77f4c245ed0357604db913d94486836392d3759fbb03b569cff149af",
      "target_boxes": [
        [
          40,
          65,
          70,
          101
        ],
        [
          120,
          65,
          150,
          101
        ],
        [
          200,
          65,
          230,
          101
        ]
      ],
      "target_count": 3,
      "detection": {
        "decision": "report",
        "reason": "Lighting gate passed; report qualifying dark components.",
        "border_median": 235.0,
        "components": [
          {
            "box": [
              40,
              65,
              70,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          },
          {
            "box": [
              120,
              65,
              150,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          },
          {
            "box": [
              200,
              65,
              230,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          },
          {
            "box": [
              265,
              70,
              290,
              100
            ],
            "pixels": 750,
            "fill_fraction": 1.0,
            "accepted": true
          }
        ],
        "accepted_count": 4
      },
      "evaluation": {
        "matched": 3,
        "false_positives": 1,
        "missed": 0,
        "outcome": "fails constructed labels",
        "note": "One-to-one bounding-box matching at IoU >= 0.5 against three generated target rectangles."
      }
    },
    {
      "id": "joined",
      "title": "Two objects become one component",
      "change": "A dark bridge joins two target rectangles. The merged component is rejected by the size and fill rules.",
      "input": "cv-joined-input.png",
      "result_image": "cv-joined-result.png",
      "input_sha256": "ac247236a122f1d5b7673cf47c0644f7b4f517cdc08f35b22c1c6d0d30b0363d",
      "target_boxes": [
        [
          40,
          65,
          70,
          101
        ],
        [
          120,
          65,
          150,
          101
        ],
        [
          200,
          65,
          230,
          101
        ]
      ],
      "target_count": 3,
      "detection": {
        "decision": "report",
        "reason": "Lighting gate passed; report qualifying dark components.",
        "border_median": 235.0,
        "components": [
          {
            "box": [
              40,
              65,
              150,
              101
            ],
            "pixels": 2360,
            "fill_fraction": 0.59596,
            "accepted": false
          },
          {
            "box": [
              200,
              65,
              230,
              101
            ],
            "pixels": 1080,
            "fill_fraction": 1.0,
            "accepted": true
          }
        ],
        "accepted_count": 1
      },
      "evaluation": {
        "matched": 1,
        "false_positives": 0,
        "missed": 2,
        "outcome": "fails constructed labels",
        "note": "One-to-one bounding-box matching at IoU >= 0.5 against three generated target rectangles."
      }
    },
    {
      "id": "dim",
      "title": "Lighting gate withholds the count",
      "change": "The whole background is darkened. The border check fails before component counting.",
      "input": "cv-dim-input.png",
      "result_image": "cv-dim-result.png",
      "input_sha256": "76da57a5e05d894faf8977597ac70f0fcb4f91945b5da2461e383bf191feaf84",
      "target_boxes": [
        [
          40,
          65,
          70,
          101
        ],
        [
          120,
          65,
          150,
          101
        ],
        [
          200,
          65,
          230,
          101
        ]
      ],
      "target_count": 3,
      "detection": {
        "decision": "abstain",
        "reason": "Border median below the declared lighting threshold.",
        "border_median": 140.0,
        "components": [],
        "accepted_count": null
      },
      "evaluation": {
        "matched": null,
        "false_positives": null,
        "missed": null,
        "outcome": "withheld",
        "note": "No count issued; this is not a successful inspection."
      }
    }
  ]
}
