Introducing Know Your HealthDocs: Learn more

onymos-logo

/ies/api/enhance

POST

Upload an image to enhance asynchronously.

HEADER

Key

Type

Description

Content-Type

String

“application/json”

clientImageID

String

Optional ID that can be supplied to identify the returned image (e.g, “IMG_4075611370134”).

onymosIesAuthToken

String

An Onymos API authorization token is required to perform any requests.

BODY

Key

Type

Description

bas64

String

The image to be uploaded and enhanced. It must be converted to a base64 string and have a minimum resolution of 200×200.

preset

String

Specifying a preset will automatically configure the type of enhancements to be applied to an image. The default preset is “document.”

  • “document”: Automatically crop out the image’s background, remove image noise, increase contrast, perform skew correction, and convert the image to black and white as though it were scanned.
  • “photo”: Automatically adjust the color balance and contrast of the photo.
  • “watermark”: Automatically removes non-solid watermarks, speckle-noise, and enhances text to make it more readable.
  • “lowres”: Automatically improves jagged text and low-resolution scanner aliasing.
  • compression_level

    Integer

    Determines how much the enhanced image should be compressed. More compression will result in a smaller file size and faster network transfer speeds, but may reduce the image’s clarity. Low numbers give less of an effect. The default value is 2. A value of 0 applies no effect.

    edge_threshold

    Integer

    Sets the edge quality thresholding values for edge detection when automatically cropping documents. Low numbers give less of an effect. The default value is 2. A value of 0 applies no effect.

    enhance_level

    Integer

    Increases the overall intensity of the enhancements. Low numbers give less of an effect. The default value is 2. A value of 0 applies no effect.

    final_height

    Integer

    The final height in pixels of the image.

    min_doc_size_in_image_percentage

    Float

    The percentage threshold used to determine if auto-cropping should be applied when enhancing a document (e.g., “0.7”).

    min_usable_resolution

    Array

    The minimum resolution of an image required to perform any enhancements (e.g., “[50, 50]”)

    no_crop

    Boolean

    If “true” DocEnhance will not auto-crop the final result.

    output_color

    String

    Determines the color format of the enhanced image (e.g., “blackwhite” or “red”).

    smoothing_level

    Integer

    Applies a smoothing algorithm to make edge detection easier. Low numbers give less of an effect. The default value is 2. A value of 0 applies no effect.

    Think differently about app development

    Download our free white paper today to learn how Onymos Features can maximize the value of your developer resources — and shave days or weeks off your development timeline.

    Get your free white paper