Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lifeart/sm-annotate

Vector Annotation tool for Video & Image files
https://github.com/lifeart/sm-annotate

annotate-images annotation-tool canvas cgi image-annotation-tool typescript vector video-annotator

Last synced: 22 days ago
JSON representation

Vector Annotation tool for Video & Image files

Awesome Lists containing this project

README

        

# Video and Image Annotation Tool

This project provides an annotation tool for HTML video and image elements. The tool allows users to draw and annotate over video and images using various drawing tools, including curves, rectangles, ellipses, and texts. Users can also customize the color and stroke size of their annotations.

Demo: [lifeart.github.io/sm-annotate](https://lifeart.github.io/sm-annotate/)

## Features
* ✍ī¸ Drawing and annotating over video and image elements.
* 🛠ī¸ Multiple drawing tools (curve, rectangle, ellipse, and text).
* 🎨 Customizable color and stroke size for the annotations.
* ↩ī¸ Undo functionality.
* 🔗 Serialization and deserialization of drawn shapes.
* 📏 Scaling shapes to the current canvas size.
* ⌨ī¸ Keyboard shortcuts for undo (Ctrl/Cmd + Z).
* 🖱ī¸ Event handling for pointer events (mouse and touch).
* 🎞ī¸ Playback of annotated frames as video.
* 💾 Saving the current frame or all frames with annotations.
* 🎞ī¸ Video Overlay comparsion

## Additional Benefits

* 🚀 Zero dependencies.
* 📱 Support for mobile devices.
* 🔌 Powerful plugin system.
* 📘 Written in TypeScript.

## Getting Started

Add the package to your project using yarn:

```bash
yarn add https://github.com/lifeart/sm-annotate.git
```

## Usage

```javascript
import { SmAnnotate } from '@lifeart/sm-annotate';
const video = document.getElementById('video');
const annotationTool = new AnnotationTool(video);
```

Users can draw and annotate using the available tools (curve, rectangle, ellipse, and text) and customize the color and stroke size of the annotations. The tool also supports undo functionality and event handling for pointer events (mouse and touch).

To save the current frame or all frames with annotations, use the `saveCurrentFrame` or `saveAllFrames` methods, respectively.

## Hotkeys

### Curve tool

| KeyCode | Result |
| - | - |
| `Shift` | Magnifier x2 |
| `r` | Red color |
| `g` | Green color |
| `b` | Blue color |
| `y` | Yellow color |
| `1` - `9` | Tool size |

## Contributing

We welcome contributions to improve the project. Please feel free to submit issues or pull requests for consideration.

## License

This code is allowed for non-commercial use. For commercial use, users must contact the author.