项目作者: baskeboler

项目描述 :
Simple java library that adds labels and annotations to images.
高级语言: Java
项目地址: git://github.com/baskeboler/imgannotations.git
创建时间: 2018-04-18T01:29:52Z
项目社区:https://github.com/baskeboler/imgannotations

开源协议:

下载


imgannotations

Simple library for painless image labeling. Annotate images with labels, points and rectangles. Used for highlighting image features and visualization of object detection results.

usage

  1. class Example {
  2. public static void main() {
  3. List<Annotation> annotations = Arrays.asList(
  4. Builders.rect().withTop(10).withLeft(10).withWidth(50).withHeight(50).build(),
  5. Builders.point().withX(100).withY(100).build(),
  6. Builders.label().withX(50).withY(50).withText("Hello World").build()
  7. );
  8. Annotator annotator = new Annotator();
  9. try {
  10. annotator.drawAnnotations("input.jpg", "output.jpg", annotations, DEFAULT_IMG_FORMAT);
  11. } catch (IOException e) {
  12. e.printStackTrace();
  13. }
  14. }
  15. }