imageAnnotation
Respondents place labelled pins, sentiment markers, or rectangle regions on an image. Useful for ad testing, package design, planogram research, UI heatmapping, and concept feedback.
What imageAnnotation is
imageAnnotation shows the respondent an image and lets them mark
spots on it. The mark depends on style:
| Style | UI | Marks stored as |
|---|---|---|
| (default) | Annotation toolbar — pick a mode, click on the image | clicks: [{x, y, value}] — value is +1 / 0 / -1 for sentiment codes (pos / neu / neg), or a slot integer ≥ 2 for custom codes |
emoji | Click on the image, popover offers 😊 😐 😢 | clicks: [{x, y, value, comment?}] with value +1 / 0 / -1 |
rect | Click-and-drag to draw a rectangle, comment textarea appears | rects: [{x, y, w, h, value, comment?}] — separate collection, not clicks. value is +1 for positive or -1 for negative (rect has two draw modes only, no neutral). |
In every shape, x / y (and w / h on rectangles) are
0–1 fractions of the image dimensions, so the data points
correctly regardless of how the image is sized at render time.
The annotation value is always a normalized integer, never
the raw annotation code. Sentiment codes (pos, neu, neg)
collapse to +1 / 0 / -1; custom codes get slot integers
starting at 2 (the same scheme used by
textAnnotation). This keeps
storage compact and consistent across annotation styles.
Click on the parts of this ad that stand out — positive or negative.
The toolbar shows three modes (Like / Confusing / Dislike), Like is active, four pins land on the image — two greens, one grey, one red.
Properties
| Property | Values | Notes |
|---|---|---|
qid | string | Required. Unique within the survey. |
type | imageAnnotation | Required. |
title, text, instruction | renderable | Visible content. |
required | True | False | Default True. |
default.errors | True | False | custom string | Default True. |
validation | code block | Python; call fail() to reject. |
readonly | True | False | Default False. |
visibility | show | hide | Default show. |
image | URL | Required. The image to annotate. |
style | emoji | rect | Omit for the default toolbar style. |
annotations | inline coded list | Required for default style — defines the annotation modes shown in the toolbar. Ignored on emoji / rect. |
comment | optional | required | Controls whether the comment is mandatory before saving. Applies to emoji and rect. Default optional. |
min | integer | Minimum total pins the respondent must place. |
max | integer | Maximum total pins. |
exact | integer | Exact count required. |
if | expression | Visibility / activation condition. |
options, options.from, group, group.order, scale, scale.from, decimal, decimal.places, passage, label.prefix, label.suffix, input.source, input.size.Per-annotation entry properties
annotations: entries carry these per-mode properties (default
style only).
| Property | Notes |
|---|---|
label | Required when expanding the entry to a map. The label shows in the toolbar button. |
data | Optional metadata object — not shown to the respondent, attached to the annotation in storage. |
Examples
Default toolbar — sentiment markers on an ad
- qid: QAdReactions
type: imageAnnotation
text: Click on the parts of this ad that stand out — positive or negative.
image: https://cdn.example.com/ads/concept-a.jpg
annotations:
1: Like
2: Confusing
3: Dislike
min: 3
The respondent picks a mode from the toolbar (Like, Confusing,
Dislike), then clicks on the image to drop a pin. They must
place at least 3 pins before Next is enabled.
Storage:
{
"clicks": [
{ "x": 0.42, "y": 0.18, "value": 1 },
{ "x": 0.31, "y": 0.55, "value": 2 },
{ "x": 0.78, "y": 0.62, "value": 3 }
]
}
The value field is the slot index of the annotation mode
(1 for the first mode in annotations:, 2 for the second, etc.) —
not the authored code itself, and not the label. Use sentiment
codes (pos / neu / neg) instead of arbitrary numeric codes
when you want the analyst-friendly +1 / 0 / -1 storage.
Emoji style — quick sentiment
- qid: QShelfReactions
type: imageAnnotation
style: emoji
text: Tap anywhere on the shelf — pick the emoji that matches your reaction.
image: https://cdn.example.com/shelf.jpg
comment: optional
min: 1
Click anywhere on the image; a small popover with 😊 😐 😢
appears. The respondent picks one and (optionally) types a
comment. Stored values are +1 / 0 / -1 matching the three
emoji.
Tap anywhere on the shelf — pick the emoji that matches your reaction.
Three pins already placed (positive, negative, neutral); the popover hovers near the cursor showing the three sentiment buttons for the next placement.
Rect style — call out regions with comments
- qid: QPackageRegions
type: imageAnnotation
style: rect
text: Draw rectangles around any parts of this package that confuse you. Add a short note for each.
image: https://cdn.example.com/packs/box-a.jpg
comment: required
min: 1
max: 5
The respondent click-drags to draw a rectangle; a comment box
opens for each region. comment: required forces them to add
text before the region is saved. min: 1 and max: 5 bound the
number of regions.
Draw rectangles around any parts of this package that confuse you. Add a short note for each.
Two rectangles drawn: the first is closed and saved, the second has focus and shows the comment textarea attached underneath.
Storage — note rect uses its own collection name, not clicks:
{
"rects": [
{ "x": 0.10, "y": 0.20, "w": 0.28, "h": 0.22, "value": 1 },
{ "x": 0.55, "y": 0.40, "w": 0.32, "h": 0.30, "value": -1, "comment": "Health-claim text is hard to read" }
]
}
Each saved rectangle stores six fields:
x/y— top-left corner, 0–1 fractions of the image dimensions.w/h— width and height, also 0–1 fractions.value— the sentiment captured at draw time. Rect mode currently exposes two draw modes only — positive (+1) and negative (-1); there is no neutral rect mode.comment— the respondent’s free text, when entered.
Methods & accessors
| Expression | Returns | Meaning |
|---|---|---|
Q.answered | bool | True once at least one annotation is placed. |
Q.notAnswered | bool | Inverse. |
Q.reset() | — | Clear all annotations. |
The full storage record is available in scripts via
Q.<storageKey> accessors that aren’t formally part of the
canonical runtime surface yet — for now, route on Q.answered
and read the data downstream from the export.
Export
imageAnnotation exports as a JSON column under the qid. The
shape of that JSON depends on the style:
| Style | Top-level key | Per-record fields |
|---|---|---|
| (default) | clicks | x, y, value |
emoji | clicks | x, y, value, optional comment |
rect | rects | x, y, w, h, value, optional comment |
For analysis, the long-format export emits one row per record — useful for heatmap aggregation in BI tools. The exact column shape is documented under Long format.
See also
- textAnnotation — annotate words in a passage
- videoAnnotation — annotate moments in a video
- Long format — export shape for click-list questions