{
  "title": "foxglove.ImageAnnotations",
  "description": "Array of annotations for a 2D image",
  "$comment": "Generated by https://github.com/foxglove/foxglove-sdk",
  "type": "object",
  "properties": {
    "timestamp": {
      "type": "object",
      "title": "time",
      "properties": {
        "sec": {
          "type": "integer",
          "minimum": 0
        },
        "nsec": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999999999
        }
      },
      "description": "Timestamp of the image annotations. When set, individual annotation timestamps will be ignored."
    },
    "circles": {
      "type": "array",
      "items": {
        "title": "foxglove.CircleAnnotation",
        "description": "A circle annotation on a 2D image",
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "object",
            "title": "time",
            "properties": {
              "sec": {
                "type": "integer",
                "minimum": 0
              },
              "nsec": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999999999
              }
            },
            "description": "Timestamp of circle"
          },
          "position": {
            "title": "foxglove.Point2",
            "description": "Center of the circle in 2D image coordinates (pixels).\nThe coordinate uses the top-left corner of the top-left pixel of the image as the origin.",
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "description": "x coordinate position"
              },
              "y": {
                "type": "number",
                "description": "y coordinate position"
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "diameter": {
            "type": "number",
            "description": "Circle diameter in pixels"
          },
          "thickness": {
            "type": "number",
            "description": "Line thickness in pixels"
          },
          "fill_color": {
            "title": "foxglove.Color",
            "description": "Fill color",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "Red value between 0 and 1"
              },
              "g": {
                "type": "number",
                "description": "Green value between 0 and 1"
              },
              "b": {
                "type": "number",
                "description": "Blue value between 0 and 1"
              },
              "a": {
                "type": "number",
                "description": "Alpha value between 0 and 1"
              }
            },
            "required": [
              "r",
              "g",
              "b",
              "a"
            ]
          },
          "outline_color": {
            "title": "foxglove.Color",
            "description": "Outline color",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "Red value between 0 and 1"
              },
              "g": {
                "type": "number",
                "description": "Green value between 0 and 1"
              },
              "b": {
                "type": "number",
                "description": "Blue value between 0 and 1"
              },
              "a": {
                "type": "number",
                "description": "Alpha value between 0 and 1"
              }
            },
            "required": [
              "r",
              "g",
              "b",
              "a"
            ]
          },
          "metadata": {
            "type": "array",
            "items": {
              "title": "foxglove.KeyValuePair",
              "description": "A key with its associated value",
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Key"
                },
                "value": {
                  "type": "string",
                  "description": "Value"
                }
              },
              "required": [
                "key",
                "value"
              ]
            },
            "description": "Additional user-provided metadata associated with this annotation. Keys must be unique."
          }
        },
        "required": [
          "timestamp",
          "position",
          "diameter",
          "thickness",
          "fill_color",
          "outline_color"
        ]
      },
      "description": "Circle annotations"
    },
    "points": {
      "type": "array",
      "items": {
        "title": "foxglove.PointsAnnotation",
        "description": "An array of points on a 2D image",
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "object",
            "title": "time",
            "properties": {
              "sec": {
                "type": "integer",
                "minimum": 0
              },
              "nsec": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999999999
              }
            },
            "description": "Timestamp of annotation"
          },
          "type": {
            "title": "foxglove.PointsAnnotationType",
            "description": "Type of points annotation to draw",
            "oneOf": [
              {
                "title": "UNKNOWN",
                "const": 0,
                "description": "Unknown points annotation type"
              },
              {
                "title": "POINTS",
                "const": 1,
                "description": "Individual points: 0, 1, 2, ..."
              },
              {
                "title": "LINE_LOOP",
                "const": 2,
                "description": "Closed polygon: 0-1, 1-2, ..., (n-1)-n, n-0"
              },
              {
                "title": "LINE_STRIP",
                "const": 3,
                "description": "Connected line segments: 0-1, 1-2, ..., (n-1)-n"
              },
              {
                "title": "LINE_LIST",
                "const": 4,
                "description": "Individual line segments: 0-1, 2-3, 4-5, ..."
              }
            ]
          },
          "points": {
            "type": "array",
            "items": {
              "title": "foxglove.Point2",
              "description": "A point representing a position in 2D space",
              "type": "object",
              "properties": {
                "x": {
                  "type": "number",
                  "description": "x coordinate position"
                },
                "y": {
                  "type": "number",
                  "description": "y coordinate position"
                }
              },
              "required": [
                "x",
                "y"
              ]
            },
            "description": "Points in 2D image coordinates (pixels).\nThese coordinates use the top-left corner of the top-left pixel of the image as the origin."
          },
          "outline_color": {
            "title": "foxglove.Color",
            "description": "Outline color",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "Red value between 0 and 1"
              },
              "g": {
                "type": "number",
                "description": "Green value between 0 and 1"
              },
              "b": {
                "type": "number",
                "description": "Blue value between 0 and 1"
              },
              "a": {
                "type": "number",
                "description": "Alpha value between 0 and 1"
              }
            },
            "required": [
              "r",
              "g",
              "b",
              "a"
            ]
          },
          "outline_colors": {
            "type": "array",
            "items": {
              "title": "foxglove.Color",
              "description": "A color in RGBA format",
              "type": "object",
              "properties": {
                "r": {
                  "type": "number",
                  "description": "Red value between 0 and 1"
                },
                "g": {
                  "type": "number",
                  "description": "Green value between 0 and 1"
                },
                "b": {
                  "type": "number",
                  "description": "Blue value between 0 and 1"
                },
                "a": {
                  "type": "number",
                  "description": "Alpha value between 0 and 1"
                }
              },
              "required": [
                "r",
                "g",
                "b",
                "a"
              ]
            },
            "description": "Per-point colors, if `type` is `POINTS`, or per-segment stroke colors, if `type` is `LINE_LIST`, `LINE_STRIP` or `LINE_LOOP`."
          },
          "fill_color": {
            "title": "foxglove.Color",
            "description": "Fill color",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "Red value between 0 and 1"
              },
              "g": {
                "type": "number",
                "description": "Green value between 0 and 1"
              },
              "b": {
                "type": "number",
                "description": "Blue value between 0 and 1"
              },
              "a": {
                "type": "number",
                "description": "Alpha value between 0 and 1"
              }
            },
            "required": [
              "r",
              "g",
              "b",
              "a"
            ]
          },
          "thickness": {
            "type": "number",
            "description": "Stroke thickness in pixels"
          },
          "metadata": {
            "type": "array",
            "items": {
              "title": "foxglove.KeyValuePair",
              "description": "A key with its associated value",
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Key"
                },
                "value": {
                  "type": "string",
                  "description": "Value"
                }
              },
              "required": [
                "key",
                "value"
              ]
            },
            "description": "Additional user-provided metadata associated with this annotation. Keys must be unique."
          }
        },
        "required": [
          "timestamp",
          "type",
          "points",
          "outline_color",
          "outline_colors",
          "fill_color",
          "thickness"
        ]
      },
      "description": "Points annotations"
    },
    "texts": {
      "type": "array",
      "items": {
        "title": "foxglove.TextAnnotation",
        "description": "A text label on a 2D image",
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "object",
            "title": "time",
            "properties": {
              "sec": {
                "type": "integer",
                "minimum": 0
              },
              "nsec": {
                "type": "integer",
                "minimum": 0,
                "maximum": 999999999
              }
            },
            "description": "Timestamp of annotation"
          },
          "position": {
            "title": "foxglove.Point2",
            "description": "Bottom-left origin of the text label in 2D image coordinates (pixels).\nThe coordinate uses the top-left corner of the top-left pixel of the image as the origin.",
            "type": "object",
            "properties": {
              "x": {
                "type": "number",
                "description": "x coordinate position"
              },
              "y": {
                "type": "number",
                "description": "y coordinate position"
              }
            },
            "required": [
              "x",
              "y"
            ]
          },
          "text": {
            "type": "string",
            "description": "Text to display"
          },
          "font_size": {
            "type": "number",
            "description": "Font size in pixels"
          },
          "text_color": {
            "title": "foxglove.Color",
            "description": "Text color",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "Red value between 0 and 1"
              },
              "g": {
                "type": "number",
                "description": "Green value between 0 and 1"
              },
              "b": {
                "type": "number",
                "description": "Blue value between 0 and 1"
              },
              "a": {
                "type": "number",
                "description": "Alpha value between 0 and 1"
              }
            },
            "required": [
              "r",
              "g",
              "b",
              "a"
            ]
          },
          "background_color": {
            "title": "foxglove.Color",
            "description": "Background fill color",
            "type": "object",
            "properties": {
              "r": {
                "type": "number",
                "description": "Red value between 0 and 1"
              },
              "g": {
                "type": "number",
                "description": "Green value between 0 and 1"
              },
              "b": {
                "type": "number",
                "description": "Blue value between 0 and 1"
              },
              "a": {
                "type": "number",
                "description": "Alpha value between 0 and 1"
              }
            },
            "required": [
              "r",
              "g",
              "b",
              "a"
            ]
          },
          "metadata": {
            "type": "array",
            "items": {
              "title": "foxglove.KeyValuePair",
              "description": "A key with its associated value",
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Key"
                },
                "value": {
                  "type": "string",
                  "description": "Value"
                }
              },
              "required": [
                "key",
                "value"
              ]
            },
            "description": "Additional user-provided metadata associated with this annotation. Keys must be unique."
          }
        },
        "required": [
          "timestamp",
          "position",
          "text",
          "font_size",
          "text_color",
          "background_color"
        ]
      },
      "description": "Text annotations"
    },
    "metadata": {
      "type": "array",
      "items": {
        "title": "foxglove.KeyValuePair",
        "description": "A key with its associated value",
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "Key"
          },
          "value": {
            "type": "string",
            "description": "Value"
          }
        },
        "required": [
          "key",
          "value"
        ]
      },
      "description": "Additional user-provided metadata associated with the image annotations. Keys must be unique within this object. Per-annotation metadata takes precedence over these values."
    }
  },
  "required": [
    "circles",
    "points",
    "texts"
  ]
}
