`.
### Examples
#### ROI rules
* Create one ROI rule for person
shows the same three frames as the simple frame filter (above).
View a screenshot
![Adding an ROI rule](../../img/hyperdatasets/frame_filtering_03.png)
* In the ROI rule, add a second label. Add `partially_occluded`. Only frames containing at least one ROI labeled as both person
and partially_occluded
match the filter.
View a screenshot
![Add label to ROI rule](../../img/hyperdatasets/frame_filtering_04.png)
By opening a frame in the frame viewer, you can see an ROI labeled with both.
View a screenshot
![Labeled ROIs in frame viewer](../../img/hyperdatasets/frame_filtering_05.png)
#### Frame rules
Filter by metadata using Lucene queries.
* Add a frame rule to filter by the metadata key dangerous
for the value of no
.
View a screenshot
![Filter by metadata ](../../img/hyperdatasets/frame_filtering_08.png)
By opening a frame in the frame viewer, you can see the metadata.
View a screenshot
![Frame metadata in frame viewer](../../img/hyperdatasets/frame_filtering_09.png)
#### Source rules
Filter by sources using Lucene queries.
* Add a source rule to filter for sources URIs with a wildcards.
View a screenshot
![Filter by source](../../img/hyperdatasets/frame_filtering_10.png)
Use Lucene queries in ROI label filters and frame rules.
## Annotations
### Frame objects (Regions of Interest)
You can add annotations by drawing new bounding areas, and copying existing annotations in the same or other frames.
**To draw a bounding area for a new annotation:**
1. Optionally, select a default label in the Default ROI Label(s) list. New annotations are automatically assigned this label.
1. Click one of the following modes and create a bounding area in the frame:
* - Rectangle mode: Drag a
rectangle onto the frame.
* - Ellipse mode: Drag an ellipse
onto the frame.
* - Polygon mode: Click the polygon
vertices onto the frame.
* - Key points mode: Click each
keypoint onto the frame. After the clicking the last keypoint, click the first again to close the bounding area.
A new annotation is created.
1. In the newly created annotation, select or type a label.
1. Optionally, add metadata. This is metadata for the annotation, not the entire frame.
1. Optionally, lock the annotation.
1. If you move to another frame, the frame editor automatically saves changes. Otherwise, if you exit the frame editor,
you are prompted to save.
**To copy an annotation:**
1. Click the annotation or bounded area in the image or video clip.
1. In the annotation, click
(copy annotation)
1. Optionally, navigate to a different frame.
1. Click **PASTE**. The new annotation appears in the same location as the one you copied.
1. Optionally, to paste the same annotation, click **PASTE** again in the desired frame.
**To copy all annotations:**
1. Click **COPY ALL**.
1. Optionally, navigate to a different frame.
1. Click **PASTE**.
### Frame labels
**To add frame labels:**
1. Expand the **FRAME LABELS** area.
1. Click **+ Add new**.
1. Enter a label.
1. Optionally, click .
### Annotation management
**To move annotations:**
* Move a bounded area by clicking on it and dragging.
**To resize annotations:**
* Resize a bounded area by clicking on a vertex and dragging.
**To modify annotation metadata:**
* In the label, click edit and then in the popup modify the metadata dictionary (in JSON format).
**To modify annotation colors:**
* Modify the color of an area by clicking the circle in the label name and select a new color.
**To lock annotations:**
* All annotations - Above the annotations, click the lock / unlock.
* A specific annotation - In an annotation, click the lock / unlock.
**To delete annotations:**
1. Click the annotation or bounded area in the image or video clip.
1. Press the **DELETE** key, or in the annotation, click **X**.
**To add, change, or delete labels to annotations labels:**
* Add - Click in the annotation and choose a label from the label list, or type a new label.
* Change - In the annotation label textbox, choose a label from the list or type a new label.
* Delete - In the annotation, in the label area, click the label's **X**.
## Frame metadata
**To edit frame metadata:**
* Expand the **FRAME METADATA** area, click edit, and then in the popup modify the metadata dictionary (in JSON format).