A rectangle-ROI annotator using matplotlib
Project description
Roimarker
Annotates region of interest (ROI) using matplotlib and Python.
- Draw rectangular ROIs with your mouse
- Quickly change to the next image by pressing N
- Adjust brightness/contrast with keys Z,X,C,V
- Undo with Ctrl+Z
Installing
pip install roimarker
Usage
A) Standalone tool
python -m roimarker DIRECTORY
Here, replace DIRECTORY with the folder containing all the image files to be annotated.
When finished, a markings.json file is created to the current working directory with the following structure:
{fn1: [ROI_1, ROI_2, ROI_3, ..], fn2: [ROI_1, ...], ...}
where
ROI_i = [x,y,w,h]
B) In your programs
import matplotlib.pyplot as plt
from roimarker import Marker
# Create matplotlib figure and ax
fig, ax = plt.subplots()
# List of images to annotate
image_fns = ['image1.tif', 'image2.tif', 'image3.tif']
marker = Marker(fig, ax, image_fns, 'markings.json')
marker.run()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
roimarker-0.2.1.tar.gz
(19.2 kB
view hashes)
Built Distribution
roimarker-0.2.1-py3-none-any.whl
(19.0 kB
view hashes)
Close
Hashes for roimarker-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec196a3d94504fdad9d600addbf700a97b6e4408cabae1c8db044f493c51d651 |
|
MD5 | d4db8ef9c5a106736d8b0fe424ed9c2c |
|
BLAKE2b-256 | 695898c232c8593ff7e1d99dd71c4ee318692bce887d9b17050eb6719c869f56 |