From 4e78fcabe911b42211dd3aff0a64365c2f96ad21 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 27 Apr 2019 03:42:44 +0200 Subject: params --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index e95635f..f4a9103 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,22 @@ DB_PASS=some_new_password #### POST /v1/match -Check if an image is in the database. If no images are found within the similarity threshold, add this image to the database. +Check if an image is in the database. If no images are found within the threshold, this image will be added to the database. -Options: +Form parameters: - `threshold` (default: 6) - Minimum similarity threshold. This is the Hamming distance used for phash comparisons. -- `add` (default: true) - Pass `false` if you do not want the image added to the database. - `limit` (default: 1) - Number of results to return. - `url` - Image URL to fetch and test (will be stored if `add` is true) -- `q` (file) - Uploaded file to test (will not be stored) \ No newline at end of file +- `q` (file) - Uploaded file to test (will not be stored) + +#### POST /v1/similar + +Find similar images to a query image. + +Form parameters: + +- `threshold` (default: 20) - Minimum similarity threshold. +- `limit` (default: 10) - Number of results to return. +- `url` - Image URL to fetch and test (will be stored if `add` is true) +- `q` (file) - Uploaded file to test (will not be stored) -- cgit v1.2.3-70-g09d2