import type {EnumGrayscaleEnhancementMode, EnumGrayscaleTransformationMode} from "../core";
import type {EnumImageColourMode} from "./EnumImageColourMode";
import type {SimplifiedCaptureVisionSettings} from "../cvr";

/**
 * This interface defines simplified settings for document normalizer tasks.
 * @see {@link SimplifiedCaptureVisionSettings.documentSettings}
 * */
export interface SimplifiedDocumentNormalizerSettings {
    /**
     * Sets the grayscale transformation modes with an array of enumeration GrayscaleTransformationMode.
     * View the reference page of GrayscaleTransformationModes for more detail about grayscale transformation modes.
     * @see {@link EnumGrayscaleTransformationMode}
     * */
    grayscaleTransformationModes?: Int32Array | Array<EnumGrayscaleTransformationMode>

    /**
     * Sets the grayscale enhancement modes with an array of enumeration GrayscaleEnhancementMode.
     * View the reference page of GrayscaleEnhancementModes for more detail about grayscale enhancement modes.
     * @see {@link EnumGrayscaleEnhancementMode}
     * */
    grayscaleEnhancementModes?: Int32Array | Array<EnumGrayscaleEnhancementMode>

    /**Sets the page size (width and height in pixels) of the normalized image.*/
    pageSize?: [number, number]

    /**
     * Sets the colour mode of the normalized image with enumeration ImageColourMode. View the reference page of ImageColourMode for more detail about colour mode.
     * @see {@link EnumImageColourMode}
     * */
    colourMode?: number | EnumImageColourMode

    /**
     * Sets the brightness of the normalized image. The value range is [-100,100].
     * */
    brightness?: number

    /**
     * Sets the contrast of the normalized image. The value range is [-100,100].
     * */
    contrast?: number

    /**
     * Sets the maximum number of threads in one task.
     * */
    maxThreadsInOneTask?: number

    /**
     * Sets the threshold for scaling down the input image during document detection.
     * If the shorter edge size of the image is larger than this threshold,the original may be scaled down to reduce processing time.
     * The default value is 2300.
     * */
    scaleDownThreshold?: number


    /**
     * Sets the minimum ratio between the target document area and the total image area. Only those exceeding this value will be output (measured in percentages).
     * */
    minQuadrilateralAreaRatio?: number

    /**
     * Sets the number of documents expected to be detected.
     * */
    expectedDocumentsCount?: number
}
