https://github.com/esimov/openfaas-coherent-line-drawing
Coherent Line Drawing OpenFaaS function based on https://github.com/esimov/colidr
https://github.com/esimov/openfaas-coherent-line-drawing
coherent-line-drawing golang openfaas openfaas-function serverless serverless-functions
Last synced: about 2 months ago
JSON representation
Coherent Line Drawing OpenFaaS function based on https://github.com/esimov/colidr
- Host: GitHub
- URL: https://github.com/esimov/openfaas-coherent-line-drawing
- Owner: esimov
- License: mit
- Created: 2019-07-16T10:02:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-02T08:56:18.000Z (about 4 years ago)
- Last Synced: 2025-03-27T10:04:32.408Z (2 months ago)
- Topics: coherent-line-drawing, golang, openfaas, openfaas-function, serverless, serverless-functions
- Language: Go
- Homepage:
- Size: 838 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Coherent Line Drawing - OpenFaaS function
OpenFaaS function for generating sketch like artistic image from the provided source image.
For more information about the implementation check the project source code at https://github.com/esimov/colidr.### Local usage
To run the function locally you have to make sure OpenFaaS is up and running. Read the official documentation for help in case is needed: https://docs.openfaas.com/Clone the repository:
```bash
$ git clone https://github.com/esimov/openfaas-coherent-line-drawing
```#### Build
```bash
$ faas-cli template pull https://github.com/alexellis/opencv-openfaas-template
$ faas-cli build -f stack.yml --gateway=http://
```#### Deploy
```bash
$ faas-cli deploy -f stack.yml --gateway=http://
```
You can access the user interface under the url provided for the `--gateway`.**Important notice:** in case of large images you need to increase `write_timeout` in stack.yml.
### Results
After deployment the `coherent-line-drawing` function will show up in the function list. You need to provide an image URL then hit invoke. This will generate a contoured, sketch-liked image as below.
You can also provide different values as query parameters. The follwing parameters are supported:
| Flag | Default value | Description |
| --- | --- | --- |
| `aa` | false | Anti aliasing |
| `bl` | 3 | New height |
| `di` | 1 | Number of FDoG iteration |
| `ei` | 2 | Number of Etf iteration |
| `k` | 2 | Etf kernel |
| `rho` | 0.98 | Rho |
| `sc` | 1 | Sigma C |
| `sm` | 3 | Sigma M |
| `sr` | 2.6 | Sigma R |
| `tau` | 0.98 | Tau |Below is an example with query parameters you can try out:
```bash
https://user-images.githubusercontent.com/883386/61370913-30e21c00-a89c-11e9-8edf-f4b59b59793c.jpg?k=2&sr=2.9&sm=3.5&tau=0.999&aa=1&ei=2&di=1
```| Input | Output
|:--:|:--:|
|  |  |
|  |  |
|  |  |
|  |  |## License
Copyright © 2019 Endre Simo
This project is under the MIT License. See the LICENSE file for the full license text.