Skip to content

Provides a REST interface for performing operations on images from S3

License

Notifications You must be signed in to change notification settings

tomnlittle/gocv-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

Docker

AWS_REGION=us-east-1 AWS_PROFILE=personal docker-compose up --remove-orphans --build

Interface

Simple

The simple interface will fetch the image from S3 and can convert it to either a PNG or JPEG at any compression or quality level - expressed as the optional query parameters shown below

Example Request with format and quality parameters

GET localhost:8000/v1/s3/:bucket/:key?format=jpeg&quality=100

Complex

The 'complex' interface takes a PUT request and a JSON encoded body.

There are three main components of the json body.

Key Required Example Value
encoding ✔️ png
quality 50
functions []

Example Request

PUT localhost:8000/v1/s3/:bucket/:key

With JSON Body

{
    "encoding": "jpeg",
    "quality": 100,
    "functions": [
        {
            "functionID": "resize",
            "parameters": [
                {
                    "key": "width",
                    "value": "1000"
                },
                {
                    "key": "height",
                    "value": "1200"
                }
            ]
        }
    ]
}

Implemented Functions

OpenCV Function Implemented
Resize ✔️
Rotate
Perspective Transform

About

Provides a REST interface for performing operations on images from S3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published