Giter Club home page Giter Club logo

steatite's Introduction

Steatite – Pictures archive for qualitative analysis

Contact: [email protected]

Home page: https://github.com/Hypertopic/Steatite

Requirements

Installation procedure

docker-compose up -d steatite

Steatite (API endpoint and user interface) is now available at http://localhost/.

Functional features

The name of "Steatite" once was a french acronym for "Serveur de traitement, d'émission et d'archivage de textes, images et épures". Steatite is now an image processing service. It also complies with the Hypertopic protocol and hence is compatible with Porphyry.

Get the picture (in its original format)

API: /picture/{hash}

Example: https://steatite.utt.fr/picture/c4ced98095164137e2df8ab7aa6e9e3740b12a96

Get an optimized picture

API: /optimized/{hash}

Example: https://steatite.utt.fr/optimized/c4ced98095164137e2df8ab7aa6e9e3740b12a96

thumbnail-example

Get an optimized picture of a fragment

API: /optimized/{hash}/{x1}+{y1}+{x2}+{y2}

You can display only a fragment of a picture by adding four coordinates, each separated with a + at the end of your request. The four digits (\d+) are coordinates - in pixels - that represents two points in the original image and create a rectangle that will be the displayed fragment. The two first digits are the coordinates of the first point, respectively the abscissa and ordinate. The third and fourth digits are respectively the abscissa and ordinate of the second point.

For example if you want to display only the face of the character at the left of the picture, you can type this: https://steatite.utt.fr/optimized/c4ced98095164137e2df8ab7aa6e9e3740b12a96/300+450+850+1000

And you will get this:

fragment-example

Get a JPEG thumbnail (efficiently)

API: /thumbnail/{hash}

Example: https://steatite.utt.fr/thumbnail/c4ced98095164137e2df8ab7aa6e9e3740b12a96

thumbnail-example

Get a JPEG thumbnail of a fragment (efficiently)

API: /thumbnail/{hash}/{x1}+{y1}+{x2}+{y2}

You can display only a fragment of a picture by adding four coordinates, each separated with a + at the end of your request. The four digits (\d+) are coordinates - in pixels - that represents two points in the original image and create a rectangle that will be the displayed fragment. The two first digits are the coordinates of the first point, respectively the abscissa and ordinate. The third and fourth digits are respectively the abscissa and ordinate of the second point.

For example if you want to display only the face of the character at the left of the picture, you can type this: https://steatite.utt.fr/thumbnail/c4ced98095164137e2df8ab7aa6e9e3740b12a96/300+450+850+1000

And you will get this:

fragment-example

Get attributes related to a picture in JSON (Hypertopic v2)

URI: /item/{corpus}/{hash}

In addition to the name of the item, and its related URIs, you will get the shooting date and the geolocation if they are present in the EXIF metadata of the picture file. Please note that the name is the original filename but it can be changed through the user interface.

For example, if you request the following URI: https://steatite.utt.fr/item/Vitraux+-+Bénel/1f3fe412f1042cbb6d42841123cf6c7e7fac309f

The response will be:

{"rows":[
  {"key":["Vitraux - Bénel", "1f3fe412f1042cbb6d42841123cf6c7e7fac309f"], "value":{"name":"GRD 002"}},
  {"key":["Vitraux - Bénel", "1f3fe412f1042cbb6d42841123cf6c7e7fac309f"], "value":{"resource":"https://steatite.utt.fr/picture/1f3fe412f1042cbb6d42841123cf6c7e7fac309f"}},
  {"key":["Vitraux - Bénel", "1f3fe412f1042cbb6d42841123cf6c7e7fac309f"], "value":{"thumbnail":"https://steatite.utt.fr/thumbnail/1f3fe412f1042cbb6d42841123cf6c7e7fac309f"}},
  {"key":["Vitraux - Bénel", "1f3fe412f1042cbb6d42841123cf6c7e7fac309f"], "value":{"created":"2019-02-24"}},
  {"key":["Vitraux - Bénel", "1f3fe412f1042cbb6d42841123cf6c7e7fac309f"], "value":{"spatial":"48 deg 18' 26.88\" N, 4 deg 19' 18.32\" E"}}
]}

Get attributes related to a picture in XML (Hypertopic v1)

URI: /entity/{hash}

For example, if you request the following URI: https://steatite.utt.fr/entity/1f3fe412f1042cbb6d42841123cf6c7e7fac309f

The response will be:

<entity>
  <attribute name="type" value="source"/>
  <attribute name="name" value="GRD 002"/>
  <resource name="thumbnail" href="https://steatite.utt.fr/thumbnail/1f3fe412f1042cbb6d42841123cf6c7e7fac309f"/>
  <resource name="source" href="https://steatite.utt.fr/picture/1f3fe412f1042cbb6d42841123cf6c7e7fac309f"/>
</entity>

Get attributes related to all pictures in a given corpus (Hypertopic v2)

URI: /corpus/{corpus}

For example, if you request the following URI: https://steatite.utt.fr/corpus/Vitraux+-+Bénel

The response will be:

{"rows":[
  {
    "key":["Vitraux - Bénel"],
    "value":{"name":"Vitraux - Bénel"}
  }, {
    "key":["Vitraux - Bénel", "e40b04e31b74f8ebb32a63525cc0efe7e7278193"],
    "value":{
      "name":"SNC",
      "resource":"https://steatite.utt.fr/picture/e40b04e31b74f8ebb32a63525cc0efe7e7278193",
      "thumbnail":"https://steatite.utt.fr/thumbnail/e40b04e31b74f8ebb32a63525cc0efe7e7278193"
    }
  }, {
    "key":["Vitraux - Bénel", "7b0006e98ec564021778cf585cae3adec07f4389"],
    "value":{
      "name":"SJ",
      "resource":"https://steatite.utt.fr/picture/7b0006e98ec564021778cf585cae3adec07f4389",
      "thumbnail":"https://steatite.utt.fr/thumbnail/7b0006e98ec564021778cf585cae3adec07f4389"
    }
  }
  ...
}

Technical features

  • Compatible with Hypertopic v1 and v2 protocols.
  • Compatible with about 100 raster image formats.

steatite's People

Contributors

antoine-guyot avatar benel avatar paooooo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

steatite's Issues

TCP ports exhaustion

This bug was reported four times on our current demonstration server. We are still not sure why the ports do not get closed or reused properly.

This might be caused by our new proxy server (Cherokee), and should be tested with Apache instead.

Corpus management

So far, there is only one fake corpus.

On our server, with more than 4000 thumbnails in a page, it gets hardly usable.

EXIF metadata extraction for `corpus` and `attribute` API

Whereas EXIF metadata extraction is already implemented for item API (see #8 and #1),
doing it the same way (on-the-fly) would not be efficient enough to be used in the corpus and attribute API.

Extracting EXIF metadata from large number of pictures at the same time requires probably to use a cache.

Creation date extraction

In items and attributes API, Dublin Core creation date (created) could be extracted on the fly from picture metadata.

As in feature #1, exiftool could be used for that.

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.