Skip to content

Latest commit

 

History

History
155 lines (151 loc) · 11.4 KB

process.md

File metadata and controls

155 lines (151 loc) · 11.4 KB

Configuration

Properties

  • images (array, required): The images.
    • Items (string)
  • args: Refer to #/definitions/args.
  • progress (boolean): Run in progress mode. Default: false.
  • steps (array): The carried out steps description.
    • Items (object): Cannot contain additional properties.
      • name (string): The step name.
      • sources (array): The images obtain after the current step.
        • Items (string)
      • process_count (integer): The step number.
  • assisted_split (array)
    • Items (object): Assisted split configuration. Cannot contain additional properties.
      • source (string)
      • destinations (array)
        • Items (['integer', 'string'])
      • image (string)
      • limits (array): The (proposed) limits to do the assisted split, You should keep only the right one.
        • Items (object): Cannot contain additional properties.
          • name (string): The name visible on the generated image.
          • type (string): The kind of split.
          • value (integer): The split position.
          • vertical (boolean): Is vertical?
          • margin (integer): The margin around the split, can be used to remove a fold.
  • transformed_images (array): The transformed image, if removed the jobs will rag again from start.
    • Items (string)
  • intermediate_error (array): The ignored errors.
    • Items (object): Cannot contain additional properties.
      • error (string)
      • traceback (array)
        • Items (string)
  • images_config (object): Can contain additional properties.
    • Additional properties (object): Cannot contain additional properties.
      • angle (['number', 'null']): The used angle to deskew, can be change, restart by deleting one of the generated images.
      • status (object): Cannot contain additional properties.
        • angle (number): The measured deskew angle.
        • size (array): The image dimensions.
          • Items (number)

Definitions

  • contour (object)
    • min_box_size (number): The minimum box size to find the content [mm]. Default: {"crop": 3, "empty": 10, "limit": 10}.
    • min_box_black (number): The minimum black in a box on content find [%]. Default: 2.
    • contour_kernel_size (number): The block size used in a box on content find [mm]. Default: 1.5.
    • threshold_block_size (number): The block size used in a box on threshold for content find [mm]. Default: 1.5.
    • threshold_value_c (number): A variable used on threshold, should be low on low contrast image, used in a box on content find on witch one we will crop. Default: 70.
  • auto_mask (object)
    • enabled (boolean): Enable the auto detection of the mask. Default: true.
    • lower_hsv_color (array): The lower color in HSV representation. Default: [0, 0, 250].
      • Items (integer)
    • upper_hsv_color (array): The upper color in HSV representation. Default: [255, 10, 255].
      • Items (integer)
    • de_noise_morphology (boolean): Apply a morphology operation to remove noise. Default: true.
    • inverse_mask (boolean): Inverse the mask. Default: false.
    • de_noise_size (integer): The size of the artifact that will be de noise. Default: 1000.
    • de_noise_level (integer): The threshold level used in de noise on the blurry image. Default: 220.
    • buffer_size (integer): The size of the buffer add on the mask. Default: 20.
    • buffer_level (integer): The threshold level used in buffer on the blurry image. Default: 20.
  • args (object)
    • level (object): The level configuration.
      • value (['boolean', 'integer']): true: => do level on 15% - 85% (under 15 % will be black above 85% will be white), false: => 0% - 100%, : => (0 + )% - (100 - number)%. Default: false.
      • auto (boolean): If no level specified, do auto level. Default: false.
      • min (number): Min level if no level end no auto-level. Default: 0.
      • max (number): Max level if no level end no auto-level. Default: 100.
    • cut_white (number): Set the near white pixels on the image to white. Default: 255.
    • cut_black (number): Set the near black pixels on the image to black. Default: 0.
    • crop (object): The crop configuration.
      • enabled (boolean): Enable the crop. Default: true.
      • margin_horizontal (number): The horizontal margin used on auto-detect content [mm]. Default: 9.
      • margin_vertical (number): The vertical margin used on auto-detect content [mm]. Default: 6.
      • contour: Refer to #/definitions/contour.
    • dpi (number): The DPI used to convert the mm to pixel. Default: 300.
    • sharpen (object): Sharpen configuration. Default: {"enabled": false}.
      • enabled (boolean): Enable the sharpen. Default: true.
    • dither (object): The dither configuration. Default: {"enabled": false}.
      • enabled (boolean): Enable the dither. Default: true.
    • tesseract (object): The Tesseract configuration.
      • enabled (boolean): Use Tesseract to to an OCR on the document. Default: true.
      • lang (string): The used language for tesseract. Default: "fra+eng".
    • append_credit_card (boolean): Do an assisted split. Default: false.
    • assisted_split (boolean): Do an assisted split. Default: false.
    • empty (object): The empty page detection configuration.
      • enabled (boolean): Enable the empty page detection. Default: true.
      • contour: Refer to #/definitions/contour.
    • limit_detection (object): The limit page detection configuration.
      • contour: Refer to #/definitions/contour.
      • line (object): The line detection used in assisted split.
        • low_threshold (integer): The low threshold used in the Canny edge detector. Default: 0.
        • high_threshold (integer): The high threshold used in the Canny edge detector. Default: 1000.
        • aperture_size (integer): The aperture size used in the Canny edge detector. Default: 3.
        • rho (integer): The rho used in the Hough transform. Default: 1.
        • threshold (integer): The threshold used in the Hough transform. Default: 100.
        • min_line_length (integer): The minimum line length in percentage of the image size used in the Hough transform. Default: 50.
        • max_line_gap (integer): The maximum line gap in percentage of the image size used in the Hough transform. Default: 100.
    • colors (integer): The number of colors in the png. Default: 0.
    • optipng (object): The optipng optimization tool configuration.
      • enabled (boolean): Use the optipng optimizer. Default: true.
    • pngquant (object): The pngquant optimization tool configuration. Default: {"enabled": false}.
      • enabled (boolean): Use the pngquant optimizer. Default: true.
      • options (array): The pngquant options. Default: ["--force", "--speed=1", "--strip", "--quality=0-32"].
        • Items (string)
    • exiftool (object): The exiftool optimization tool configuration. Default: {"enabled": false}.
      • enabled (boolean): Use the exiftool optimizer. Default: true.
    • ps2pdf (object): The ps2pdf optimization tool configuration. Default: {"enabled": false}.
      • enabled (boolean): Use the ps2pdf optimizer (=> JPEG). Default: true.
    • auto_rotate (object): The auto rotate configuration.
      • enabled (boolean): Enable the auto rotate detected by Tesseract. Default: true.
    • jpeg (object): Convert images to JPEG configuration. Default: {"enabled": false}.
      • enabled (boolean): Convert images to JPEG. Default: true.
      • quality (integer): The JPEG quality. Default: 90.
    • background_color (array): The background color. Default: [255, 255, 255].
      • Items (integer)
    • mask (object): The mask configuration, the a is used to mask the image on crop and skew calculation. Default: {"enabled": false}.
      • enabled (boolean): Enable the mask. Default: true.
      • auto_mask: Refer to #/definitions/auto_mask.
      • additional_filename (string): An image file used to add on the mask.
    • cut (object): The cut configuration, a mask is used to definitively mask the source image. Default: {"enabled": false}.
      • enabled (boolean): Enable the cut. Default: true.
      • auto_mask: Refer to #/definitions/auto_mask.
      • additional_filename (string): An image file used to add on the mask.
    • no_remove_to_continue (boolean): Don't wait for the deletion of the REMOVE_TO_CONTINUE file before exporting the PDF. Default: false.
    • deskew (object): The deskew configuration.
      • min_angle (number): The minimum angle to detect the image skew [degree]. Default: -45.
      • max_angle (number): The maximum angle to detect the image skew [degree]. Default: 45.
      • angle_derivation (number): The step of angle to detect the image skew [degree]. Default: 0.1.
      • sigma (number): Used in the canny function. Default: 3.0.
      • num_peaks (integer): number of peaks we ask for. Default: 20.
      • angle_pm_90 (boolean): Detect an angle of +/- 90 degree, also +/- 45 degree. Default: false.
    • rule (object): Configuration of rule displayed in assisted split images.
      • enabled (boolean): Default: true.
      • minor_graduation_space (integer): Default: 10.
      • major_graduation_space (integer): Default: 100.
      • lines_space (integer): Default: 100.
      • minor_graduation_size (integer): Default: 10.
      • major_graduation_size (integer): Default: 30.
      • graduation_color (array): Default: [0, 0, 0].
        • Items (integer)
      • lines_color (array): Default: [0, 0, 0].
        • Items (integer)
      • lines_opacity (number): Default: 0.2.
      • graduation_text_font_filename (string): Default: "/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf".
      • graduation_text_font_size (number): Default: 17.
      • graduation_text_font_color (array): Default: [0, 0, 0].
        • Items (integer)
      • graduation_text_margin (integer): Default: 6.
    • rest_upload (object): Upload the final PDF via Paperless REST API.
      • enabled (boolean): Enable the upload of the PDF via REST API. Default: false.
      • api_url (string, required): The URL address of the REST API, usually http://server.name/api.
      • api_token (string, required): The API token.
    • consume_folder (object): Send the final PDF to Paperless using the consume folder.
      • enabled (boolean): Enable using the consume folder. Default: true.