Sending image for binarization

Using the recognition setting

The makeBinarization recognition setting is available for all image recognition methods. To automatically binarize the image during the recognition, simply set this option to true.

While this greatly simplifies the code, you have no control over the intermediate results or the order in which the preprocessing filters are applied to the image.

Using the dedicated endpoint

Posting an image to the Aspose.OCR Cloud endpoint https://api.aspose.cloud/v5.0/ocr/binarizeimage allows you to fetch a black-and-white image that can be handled by other processing filters or recognized. To authorize the request, pass the access token in Authorization header (Bearer authentication).

The image is provided in a value of image property as a Base64 encoded string.

Return value

If successful, the endpoint returns a string with a unique identifier (GUID) of the binarization request in the queue.

Otherwise, it returns a HTTP status code corresponding to the error.

What’s next

Binarization will take a few seconds, depending on the image size and the current Aspose.Cloud load. See the article Fetching binarized image for information on how to get back the black-and-white image.

cURL example