Skip to content

Quality improvement

PhotoCorrectionProcessor

It is Used to change the geometry and color of a photo.

Parameters
  • x - Value from -1 to 1. Indicate the position the image. A value of -1 indicates is placed on the left side a value of 1 on the right side. The position is counted relative to the center, by default 0.0,
  • y - Value from -1 to 1. Indicate the position the image. A value of -1 indicates is placed on the top a value of 1 on the bottom. The position is counted relative to the center, by default 0.0,
  • scaleX - Value from 0 to 5. Change of scale in the X axis, by default 1.0,
  • scaleY - Value from 0 to 5. Change of scale in the Y axis, by default 1.0,
  • rotation - Value from -180 to 180. Change the rotation of the photo, by default 0.0,
  • red - Value from -1 to 1. Adjusts the overall red of the image, by default 0.0,
  • green - Value from -1 to 1. Adjusts the overall green of the image, by default 0.0,
  • blue - Value from -1 to 1. Adjusts the overall blue of the image, by default 0.0,
  • brightness - Value from -1 to 1. Adjusts the overall brightness of the image, by default 0.0,
  • contrast - Value from -1 to 1. Adjusts the overall contrast of the image, by default 0.0,
  • hsValue - Value from -1 to 1. Indicates color brightness, also measured as a percentage from 0% (black) to 100% (maximum color brightness), by default 0.0,
  • luminance - Value from -1 to 1. Adjusts the overall luminance of the image, by default 0.0,
  • saturation - Value from -1 to 1. Indicates color intensity, measured in percentages from 0% (gray) to 100% (full saturation), by default 0.0,
  • hue - Value from -1 to 1. Determines the color in the color spectrum, measuring it in degrees from 0 to 360, where each angle corresponds to a different color, by default 0.0,
  • temperature - Value from -1 to 1. Adjusts the overall temperature of the image, by default 0.0,
  • exposure -Value from -1 to 1. Adjusts the overall exposure of an image, by default 0.0,
  • cyanHue - Value from -1 to 1. Color change for cyan tint, by default 0.0,
  • cyanSaturation - Value from -1 to 1. Change the saturation of the cyan color, by default 0.0,
  • blueHue - Value from -1 to 1. Color change for blue tint, by default 0.0,
  • blueSaturation - Value from -1 to 1. Change the saturation of the blue color, by default 0.0,
  • purpleHue - Value from -1 to 1. Color change for purple tint, by default 0.0,
  • purpleSaturation - Value from -1 to 1. Change the saturation of the purple color, by default 0.0,
  • pinkHue - Value from -1 to 1. Color change for pink tint, by default 0.0,
  • pinkSaturation - Value from -1 to 1. Change the saturation of the pink color, by default 0.0,
  • redHue - Value from -1 to 1. Color change for red tint, by default 0.0,
  • redSaturation - Value from -1 to 1. Change the saturation of the red color, by default 0.0,
  • orangeHue - Value from -1 to 1. Color change for orange tint, by default 0.0,
  • orangeSaturation - Value from -1 to 1. Change the saturation of the orange color, by default 0.0,
  • yellowHue - Value from -1 to 1. Color change for yellow tint, by default 0.0,
  • yellowSaturation - Value from -1 to 1. Change the saturation of the yellow color, by default 0.0,
  • greenHue - Value from -1 to 1. Color change for green tint, by default 0.0,
  • greenSaturation - Value from -1 to 1. Change the saturation of the green color, by default 0.0.
Example of usage

[
    {
        "processorName": "PhotoCorrectionProcessor",
        "photoCorrection": {
            "x": 0.0,
            "y": 0.0,
            "scaleX": 1.0,
            "scaleY": 1.0,
            "rotation": 0.0,
            "red": 0.0,
            "green": 0.0,
            "blue": 0.0,
            "brightness": 0.2,
            "contrast": 0.0,
            "hsValue": 0.0,
            "hue": 0.0,
            "saturation": 0.0,
            "global": {
                "luminance": 0.3,
                "saturation": 0.0,
                "hue": 0.5,
                "temperature": 0.0,
                "exposure": 0.0
            },
            "selectiveColor": {
                "cyan": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "blue": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "purple": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "pink": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "red": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "orange": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "yellow": {
                    "hue": 0.0,
                    "saturation": 0.0
                },
                "green": {
                    "hue": 0.0,
                    "saturation": 0.0
                }
            }
        },
        "x": 0.0,
        "y": 0.0,
        "scaleX": 1.0,
        "scaleY": 1.0,
        "rotation": 0.0,
        "red": 0.0,
        "green": 0.0,
        "blue": 0.0,
        "brightness": 0.0,
        "contrast": 0.0,
        "hsValue": 0.0,
        "luminance": 0.0,
        "saturation": 0.0,
        "hue": 0.0,
        "temperature": 0.0,
        "exposure": 0.0,
        "cyanHue": 0.0,
        "cyanSaturation": 0.0,
        "blueHue": 0.0,
        "blueSaturation": 0.0,
        "purpleHue": 0.0,
        "purpleSaturation": 0.0,
        "pinkHue": 0.0,
        "pinkSaturation": 0.0,
        "redHue": 0.0,
        "redSaturation": 0.0,
        "orangeHue": 0.0,
        "orangeSaturation": 0.0,
        "yellowHue": 0.0,
        "yellowSaturation": 0.0,
        "greenHue": 0.0,
        "greenSaturation": 0.0
    }
]

Example result

DehazeProcessor

It is used to photo haze removal.

Parameters
  • strength - Value from 0 to 1, haze grounding force, by default 0.5.
Example of usage

[
    {
        "processorName": "DehazeProcessor",
        "strength": 0.5
    }
]

Example result

CropProcessor

It is used to crop the input image to the car with given offsets.

Parameters
  • marginLeft - Value from 0 to 1. It specifies the minimum left margin as % of the car width, by default 0.01,
  • marginRight - Value from 0 to 1. It specifies the minimum right margin as % of the car width, by default 0.01,
  • marginUp - Value from 0 to 1. It specifies the minimum upper margin as % of the car height, by default 0.01,
  • marginDown - Value from 0 to 1. It specifies the minimum down margin as % of the car height, by default 0.01,
  • aspectRatio - the aspect ratio of the output image in N:M format, e.g. 16:9. (should be in range [4/9, 5/1]). For original, the server will return an image with the exact resolution as the original car image, by default original.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "CropProcessor",
        "marginLeft": 0.05,
        "marginRight": 0.05,
        "marginUp": 0.01,
        "marginDown": 0.01,
        "aspectRatio": "original"
    }
]

Example result

CarEnhancementProcessor

A processor to improve the quality of car photos.

Parameters
  • No parameters required.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "CarEnhancementProcessor"
    }
]

Example result

SuperResolutionProcessor

It is used to increase the resolution of the photo. The maximum possible output resolution is 8192 px. The maximum resolution of the input image is 2600*2600. If the image is larger, the processor will not change the photo.

Parameters
  • width - The width of the output image (with aspect ratio keeping). Not taken into account when scale is specified,
  • height- The height of the output image - used when scale and width is not set,
  • scale - Value from 1 to 4. Specifies how many times the resolution of the output image should be increased, by default 2.0.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "SuperResolutionProcessor",
        "scale": 4
    }      
]

Example result