Image Color Separation API Documentation

API Summery:

This service can identify the colors of uploaded pictures, then extract and separate 10 main colors, and output pictures with different colors according to the color output.10 main colors include: "black/黑", "gray/灰", "white/白", "red/红", "orange/橙", "yellow/黄", "green/绿", "lightBlue/淡蓝", "blue/蓝", "purple/紫”. The background of the output images of various colors of this service can be white or black.

Application scene :

eCommerce website or platform, picture trading platform, picture material website.



API end point :http://www.visulsearchapi.com:7080/wztimgsvr/imgcolorsep/extract
Image Format Requirement: JPG format, image width and length each for 300 – 1200 pix

Request Method :POST

Request Parameters(body) :

Parameter Name Type Required Parameter Location Description Default Value
apikey string Yes body API Key None
fmt string No body Response format: json or xml json
background string No body The image background alternates white or black.
white
black
white
lang string No body Response format: json or xml zh - Chinese

Parameter Name Type Required Parameter Location Description Default Value
photo file yes body Image for uploading No


Detailed use of tutorials



API end point : :http://www.tudatech.com:7080/wztimgsvr/imgcolorsep/extract

Image Format Requirement: JPG format, image width and length each for 300 – 1200 pix

Request Method : POST

Request Parameters(body) :

Parameter Name Type Required Parameter Location Description Default Value
apikey string Yes body API Key None
fmt string No body Response format: json or xml json
imgurl string Yes body Image URL None
background string No body The image background alternates white or black.
white
black
white
lang string No body Response format: json or xml zh


JSON Response Example::

{"黑":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV0-black.jpg","灰":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV1-gray.jpg","白":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV2-white.jpg","红":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV-Red12.jpg","橙":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV5-orange.jpg","黄":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV6-yellow.jpg","绿":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV7-green.jpg","淡蓝":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV8-lightBlue.jpg","蓝":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV9-blue.jpg","紫":"http://tudatech.com:7080/wztimgsvr/uploads/2021-03-24/2015/31-1616560910541/31-1616560910541-outHSV10-purple.jpg"}



Download Java resources
Download Python resources
Download Php resources

Error Code Reference:


Error Codes Related to Access Control:
API_CODE_ERROR_exceeded_access_total Exceeded API access limit in total
API_CODE_ERROR_exceeded_access_frequency Exceeded API access frequency limit
API_CODE_ERROR_exceeded_access_frequency_min Exceeded API access limit per minute
API_CODE_ERROR_exceeded_access_frequency_hr Exceeded API access limit per hour
API_CODE_ERROR_exceeded_access_frequency_day Exceeded API access limit per day
API_CODE_ERROR_exceeded_access_frequency_month xceeded API access limit per month
API_CODE_ERROR_two_API_calls_time_too_close Two API calls are too close in time
IMAGE_INDEX_CODE_ERROR_IMAGE_EXCEED_MAX_DOCS_PER_UID Exceeded max number of images in index per user
API_CODE_ERROR_not_allow_write_index Pause in adding image to index (server might be in maintain service, please wait )

Error Codes Related to Wrong Parameters:
API_CODE_ERROR_invalid_apikey Invalid apikey
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_imgName Invalid image name
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_imgUrl Invalid image URL
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_catid_must_be_1_to_3000 Invalid image category (Must be 1-3000 Integer)
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_labels_must_be_positive_integer Invalid label(Must be positive integer)
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_FIELDS_any_field_must_not_have_double_quote Invalid image data, must not have double quote
IMAGE_INDEX_ITEM_CODE_ERROR_INVALID_LANG Invalid language parameter(must be zh for Chinese or en for English)
IMAGE_INDEX_CODE_ERROR_DOWNLOAD_IMAGE Error in downloading image, please check provided image URL
IMAGE_INDEX_CODE_ERROR_IMAGE_SIZE_TOO_BIG Image size is too big(image must be 400 – 800PIX JPG format)
IMAGE_INDEX_DELETE_IMG_CODE_ERROR_NOT_FOUND_ITEM Error in deleting, image not found