{
  "ok": true,
  "device": "camera-lab-1",
  "timestamp": "2026-09-22T17:47:06.649Z",
  "analyzed_at": "2026-09-22T17:47:06.676Z",
  "analysis_resolution": "64x64",
  "brightness_stats": {
    "mean": 121.05,
    "min": 19,
    "max": 214,
    "std": 61.94
  },
  "histogram_16bin": {
    "bins": [
      0,
      61,
      626,
      459,
      429,
      259,
      229,
      119,
      52,
      76,
      236,
      964,
      582,
      4,
      0,
      0
    ],
    "bin_width": 16,
    "note": "bins[0] = pixels with luma 0-15 (dark) … bins[15] = luma 240-255 (bright). Lamp ON pushes mass toward higher bins."
  },
  "brightness_grid_8x8": [
    [
      65.6,
      63.9,
      49.3,
      129,
      151.5,
      167.5,
      183.6,
      121.7
    ],
    [
      40.1,
      45.4,
      53,
      132,
      159.6,
      170.1,
      190.5,
      142.6
    ],
    [
      40.3,
      44.6,
      52.8,
      135.8,
      168.3,
      169.1,
      192,
      157.3
    ],
    [
      40.3,
      36.6,
      49.4,
      135.2,
      168.7,
      164.3,
      189.4,
      153.3
    ],
    [
      55.1,
      79.7,
      103.6,
      133.1,
      170,
      161.8,
      189.1,
      162.3
    ],
    [
      52.5,
      78,
      101.4,
      129.8,
      169.3,
      158.3,
      187,
      156.3
    ],
    [
      50.8,
      72.9,
      93,
      122.8,
      159.5,
      153.8,
      182.4,
      146.8
    ],
    [
      47.3,
      66.7,
      82.3,
      112,
      152.3,
      149.6,
      176.9,
      127.8
    ]
  ],
  "edge_detection": {
    "mean_magnitude": 86.17,
    "strong_edge_pixels": 890,
    "strong_edge_percent": 21.73,
    "edge_grid_8x8": [
      [
        90.6,
        78.3,
        59,
        164.5,
        141.9,
        139.1,
        20.3,
        154.8
      ],
      [
        21.7,
        17.2,
        72.8,
        174.2,
        139.9,
        130.2,
        12.5,
        145.6
      ],
      [
        12.2,
        31.4,
        77.8,
        180.2,
        135.2,
        133.6,
        10.8,
        146.6
      ],
      [
        32.5,
        43.4,
        106,
        180.9,
        145,
        138.9,
        15.9,
        110.9
      ],
      [
        46.6,
        55.4,
        93.6,
        172.1,
        143.8,
        137.7,
        12.1,
        100.6
      ],
      [
        50.9,
        35.2,
        76.1,
        167.3,
        138.6,
        134,
        9.2,
        90.5
      ],
      [
        41,
        29.5,
        63.9,
        162.7,
        132.6,
        130.9,
        10.9,
        112.3
      ],
      [
        30.7,
        19.7,
        46,
        152.9,
        127.5,
        127.2,
        12.3,
        132.9
      ]
    ],
    "note": "Sobel gradient magnitude. Higher cell value = more edges/detail in that region. Row 0 = top of image."
  },
  "dominant_colors": [
    {
      "rgb": [
        176,
        176,
        176
      ],
      "hex": "#b0b0b0",
      "percent": 25.9
    },
    {
      "rgb": [
        48,
        48,
        48
      ],
      "hex": "#303030",
      "percent": 16.2
    },
    {
      "rgb": [
        80,
        80,
        80
      ],
      "hex": "#505050",
      "percent": 12.3
    },
    {
      "rgb": [
        208,
        208,
        208
      ],
      "hex": "#d0d0d0",
      "percent": 11.8
    },
    {
      "rgb": [
        112,
        112,
        112
      ],
      "hex": "#707070",
      "percent": 7.5
    }
  ],
  "color_regions_4x4": [
    [
      "#393440",
      "#5f5961",
      "#a3a2a3",
      "#9f9fa4"
    ],
    [
      "#2d2634",
      "#615b64",
      "#a9a7a9",
      "#aeadaf"
    ],
    [
      "#46414a",
      "#787478",
      "#a7a4a6",
      "#aeadb0"
    ],
    [
      "#3f3944",
      "#6a656c",
      "#9c999d",
      "#9e9ea2"
    ]
  ],
  "lamp_detection": {
    "your_pixel_estimate": {
      "estimate": "on",
      "confidence": 0.89,
      "method": "learned-references",
      "references": {
        "on_mean": 123.14,
        "off_mean": 84.86
      }
    },
    "lamp_truth": {
      "known": true,
      "on": false,
      "power_w": 0,
      "age_s": 15,
      "stale": false,
      "note": "Physical ground truth from the smart plug power meter. Compare with your pixel-based estimate!"
    },
    "calibration_observation": {
      "recorded": true,
      "state": "off",
      "total": 15
    },
    "match": false,
    "lesson": "estimate comes ONLY from pixels; lamp_truth comes from the physical power meter. When they agree, your vision works."
  },
  "next_steps": {
    "toggle": "POST /iot-lab/camera/lamp?action=toggle&agent=anonymous",
    "compare": "/iot-lab/camera/compare?agent=anonymous",
    "challenges": "/iot-lab/camera/vision"
  }
}