HD Colour migration

FREEMIUM
By AILabTools | Updated 18 days ago | Video, Images
Health Check

100%

README

Interface Description

The color of the reference picture can be transferred to the original image, and the color transfer of high-definition images can be supported, which can ensure that the color of the portrait part does not change. This interface is compared to Colour migration:

  • Support high-definition pictures.

  • Support custom color extension.

  • Support portrait color preservation.

Mode Description

  • Automatic color extension

    Enter the number of results to be expanded, that is, the number of expanded color systems. The algorithm calculates the uniform sampling method according to the color space, and gives the results that meet the requirements of the number of expanded colors. Simply put, the number of color systems is how many, and a few pictures are output.

    For example, ใ€Before processingใ€‘ใ€color_count=1ใ€‘ใ€color_count=4ใ€‘. The result is as follows:

    Image

  • Color palette extension

    Input a set of color lists (color swatches), and the algorithm uses the swatches as the main color to expand the original image. This mode provides greater color control. The length of the color list must not exceed the specified value.

    For example, ใ€color_template="#DB0D0D,#0E0CBB,#FF0000"ใ€‘. The color extension result is as follows:

Before processing After processing
Before processing After processing
  • Reference picture extension color

    You provide a reference image, and the algorithm will colorize the original image based on the reference image.

Before processing Reference map After processing
Before processing Reference map After processing

HD Colour migration (Async)

Request Description

This API is asynchronous. Please save the task_id or request_id and then use 'Retrieve Task Results by task_idโ€™ or 'Retrieve Task Results by request_idโ€™ to obtain the task results.

  • Image requirements

    • Image formats: PNG, JPG, JPEG.

    • Image size: no more than 3 MB.

    • Image resolution: greater than 64x64 pixels and less than 10000x10000 pixels.

    • All images must be RGB 3-channel.

  • Request Parameters

Field Required Type Scope Example Defaults Description
image YES file - - - The original image.
degree YES string 0~1 0.4 - Degree of extension.
mode NO string AUTO TEMPLATE REF_PIC AUTO AUTO Color extension mode. AUTO: Automatic color extension. TEMPLATE: Color palette extension. REF_PIC: Reference picture extension color.
color_count NO integer 1 2 3 4 5 6 7 8 1 1 Automatic color extension. Expand the number of shades. This parameter is valid when mode: AUTO.
color_template NO string - 056A6B,0A0B0C - Color palette extension. Top main color list, color value definition ARGB. When there are multiple colors, use , to separate. Length: [1, 7]. When mode: TEMPLATE, this parameter is required and valid.
ref NO file - - - Refer to the picture for color extension. When mode: REF_PIC, this parameter is required and valid.

Response Description

  • Response Parameters
Field Type Description
error_code integer Error Code.
error_msg string Error Message.
request_id string Request ID.
task_id string Task ID.

Retrieve Task Results by task_id

Request Description

Retrieve asynchronous task results by task_id. An API more efficient than 'Retrieve Task Results by request_id'.

  • Request Parameters
Field Required Type Description
task_id YES string Task id๏ผštask_id

Response Description

  • Response Parameters
Field Type Description
error_code integer Error Code.
error_msg string Error Message.
request_id string Request ID.
task_status integer Asynchronous task status. 0: The task is queued. 1: Asynchronous processing. 2: Processing was successful.
data object The content of the result data returned.
+status string Asynchronous task status. QUEUING: The task is queued. PROCESSING: Asynchronous processing. PROCESS_SUCCESS: Processing was successful. PROCESS_FAILED: Processing failed. TIMEOUT_FAILED: The task timeout did not complete. LIMIT_RETRY_FAILED: Exceeded maximum number of retries for processing failures.
+image_list array The real request result returned by HD color migration asynchronous task. Note: The URL address is a temporary address, valid for 24 hours, and will not be accessible after the expiration date.

Retrieve Task Results by request_id

Request Description

Retrieve asynchronous task results by request_id.

  • Request Parameters
Field Required Type Scope Example Description
job_id YES string - 3A9BFC5E-3F7C-4D9A-9445-908C6D14AB5B Task id๏ผšrequest_id
type YES string HD_COLOUR_MIGRATION HD_COLOUR_MIGRATION Asynchronous task type. HD_COLOUR_MIGRATION: HD Colour migration

Response Description

  • Response Parameters
Field Type Description
error_code integer Error Code.
error_msg string Error Message.
request_id string Request ID.
data object The content of the result data returned.
+status string Asynchronous task status. QUEUING: The task is queued. PROCESSING: Asynchronous processing. PROCESS_SUCCESS: Processing was successful. PROCESS_FAILED: Processing failed. TIMEOUT_FAILED: The task timeout did not complete. LIMIT_RETRY_FAILED: Exceeded maximum number of retries for processing failures.
+image_list array The real request result returned by HD color migration asynchronous task. Note: The URL address is a temporary address, valid for 24 hours, and will not be accessible after the expiration date.
Followers: 0
Resources:
Product Website Terms of use
API Creator:
Rapid account: AI Lab Tools
AILabTools
ailabapi
Log In to Rate API
Rating: 5 - Votes: 1