{
  "ok": true,
  "device": "camera-lab-1",
  "timestamp": "2026-09-23T02:05:23.201Z",
  "analyzed_at": "2026-09-23T02:05:23.223Z",
  "analysis_resolution": "64x64",
  "brightness_stats": {
    "mean": 17.7,
    "min": 10,
    "max": 121,
    "std": 8.16
  },
  "histogram_16bin": {
    "bins": [
      941,
      3108,
      2,
      0,
      11,
      14,
      14,
      6,
      0,
      0,
      0,
      0,
      0,
      0,
      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": [
    [
      44.3,
      40.6,
      17,
      18,
      18.4,
      18.7,
      19.2,
      18
    ],
    [
      15.2,
      16.1,
      16.8,
      18.3,
      18.6,
      18.6,
      20.2,
      18.4
    ],
    [
      15,
      15.3,
      16.2,
      18.1,
      18.4,
      19.1,
      20.2,
      17.8
    ],
    [
      15,
      15.1,
      15.9,
      17.8,
      17.9,
      18,
      19.9,
      18.1
    ],
    [
      15.5,
      15.8,
      16.1,
      17,
      17.3,
      17.4,
      18.4,
      18.2
    ],
    [
      15.2,
      15.5,
      16,
      16.4,
      16.7,
      16.9,
      18.2,
      17.1
    ],
    [
      14.9,
      15.1,
      15.6,
      15.9,
      15.7,
      15.7,
      17.9,
      16.1
    ],
    [
      15,
      14.6,
      15,
      15.7,
      16,
      15.9,
      17,
      15.3
    ]
  ],
  "edge_detection": {
    "mean_magnitude": 5.5,
    "strong_edge_pixels": 31,
    "strong_edge_percent": 0.76,
    "edge_grid_8x8": [
      [
        104.9,
        100.2,
        4.7,
        4.5,
        1.9,
        1.6,
        1.3,
        5.7
      ],
      [
        1.3,
        2.9,
        3.7,
        3.9,
        3.3,
        3.9,
        3.4,
        4.4
      ],
      [
        0.2,
        2.4,
        3,
        4.4,
        2.3,
        3.6,
        2.9,
        4.5
      ],
      [
        1.1,
        1.8,
        4,
        4.8,
        2.2,
        4.5,
        3,
        4.5
      ],
      [
        2.4,
        1.8,
        1.8,
        2.8,
        4.3,
        3.7,
        5.3,
        3.6
      ],
      [
        3,
        3.5,
        1.5,
        2.3,
        4.7,
        3,
        1.9,
        4.2
      ],
      [
        4.5,
        1.2,
        1.9,
        1.8,
        3.9,
        4.9,
        2.2,
        3.4
      ],
      [
        2.7,
        4.3,
        2,
        2.9,
        2.2,
        1.8,
        4.9,
        4.9
      ]
    ],
    "note": "Sobel gradient magnitude. Higher cell value = more edges/detail in that region. Row 0 = top of image."
  },
  "dominant_colors": [
    {
      "rgb": [
        16,
        16,
        16
      ],
      "hex": "#101010",
      "percent": 98.8
    },
    {
      "rgb": [
        80,
        80,
        80
      ],
      "hex": "#505050",
      "percent": 0.6
    },
    {
      "rgb": [
        112,
        112,
        112
      ],
      "hex": "#707070",
      "percent": 0.5
    },
    {
      "rgb": [
        48,
        48,
        48
      ],
      "hex": "#303030",
      "percent": 0
    },
    {
      "rgb": [
        112,
        80,
        80
      ],
      "hex": "#705050",
      "percent": 0
    }
  ],
  "color_regions_4x4": [
    [
      "#211b21",
      "#151017",
      "#161117",
      "#171218"
    ],
    [
      "#140d15",
      "#150f17",
      "#171018",
      "#171218"
    ],
    [
      "#140d14",
      "#150e16",
      "#160f17",
      "#161017"
    ],
    [
      "#130d13",
      "#150e15",
      "#150e15",
      "#150f16"
    ]
  ],
  "lamp_detection": {
    "your_pixel_estimate": {
      "estimate": "off",
      "confidence": 0.99,
      "method": "learned-references",
      "references": {
        "on_mean": 123.14,
        "off_mean": 84.86
      }
    },
    "lamp_truth": {
      "known": true,
      "on": false,
      "power_w": 0,
      "age_s": 31,
      "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": 16
    },
    "match": true,
    "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"
  }
}