Getcolors endpoint (https://regim3.p.rapidapi.com/colors/1.1/) able to determine dominant (main) colors on image.
Options can be used for optimizing expected result:
alg - select fast or fine algorithm. Fast doesn’t mean bad 😃 but is some cases you can get better results with slower option.
closestColor - allow to map detected colors to palette (find most similar color from given list) and organize your images with colors gpoups, sort or search gallery.
Parameter palette is optional and you can provide your oun colors set except default palette.
For testing Colors api you can use Colab
https://colab.research.google.com/drive/1SE26l6aVgbazUeNGpY5huNXhB0hOsc7A?usp=sharing
Regim API (https://regim3.p.rapidapi.com/1.1/) recognize object and segments on image.
Additionally it returns some extra data like EXIF, geodecoding. Result image with object labels can be prepeared with ‘resimg’ option.
Use our API to label your images, fulfill your gallery with searchable data (labels, geodata, shot info from EXIF and other).
As example: this api is a part of our photo gallery with search, persons catalogue and slide show. Most common usage:
Please fill free to contact with any questions.
Image file and options:
Possible options (put them with comma delimeter):
based on options:
Objects, segments, exif data, geo data, faces.
curl --request POST --url 'https://regim3.p.rapidapi.com/1.1/?opts=facerecognition,exif' --header 'content-type: multipart/form-data' --header 'x-rapidapi-host: regim3.p.rapidapi.com' --header 'x-rapidapi-key: yourKey' --form file=@img.jpg
import requests
url = "https://regim3.p.rapidapi.com/1.1/"
querystring = {"opts":"segmentation,facerecognition"}
payload = {"file": open('img.jpg', 'rb')}
headers = {
'x-rapidapi-host': "regim3.p.rapidapi.com",
'x-rapidapi-key': "yourKey",
'accept' : "application/json"
}
response = requests.post(url, files=payload, headers=headers, params=querystring)
print(response.text)