Giter Site home page Giter Site logo

vipsts's Introduction

VipsTS

A TypeScript (transpilable to JavaScript) port of Tomáš Popela's vips_java.

Differences / Drawbacks

  • does not support graphical output
  • does not reproduce most unused fields and methods
  • does not support setting custom size thresholds (VipsParser.ts)

Usage

Transpile the code to JavaScript (e.g. using IntelliJ IDEA), then run it in a browser / engine of your choice. An example is provided in VipsTester.ts. So far, this project has only been tested with Chromium.

Output

The output is provided in JSON format, containing:

  • "id": an identifier for the segmented web page, provided in the Vips constructor
  • "width" and "height": dimensions of the segmented web page
  • "segmentations": an object holding polygon (bounding box) coordinates for the detected segments in the following format:
           |-segment array
           ||-multipolygon set
           |||-multipolygon
           ||||-polygon 
           |||||-x,y
    "vips":[[[[[201,23],[1142,23],[1142,0],[201,0],[201,23]]]],...]
    
    The polygon is always closed, i.e. it ends with the same coordinates it starts with.

vipsts's People

Stargazers

HolenZhang avatar Alex Kreidler avatar

Watchers

Lars Meyer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.