How to Convert an Image of Text into a Binarized (Light & Dark) View using Go

The Cloudmersive Optical Character Recognition (OCR) endpoint offers a variety of direct image-to-text conversion services for your personal & professional projects. While many essential OCR preprocessing features are built into these API services, you can also access & utilize those same preprocessing features through independent API calls for your own applications as well.

Binarization (converting images to light and dark view) is one such critical step in OCR preprocessing, and using the complementary code examples below, you can call our independent Binarization preprocessing API with ease. This API will perform an adaptive binarization algorithm on your input image, converting it to light & dark view, ensuring it is well-prepared for future OCR operations.

To call this API for free, you’ll first need to get a free-tier Cloudmersive API key by registering a free account on our website (this will provide a limit of 800 API calls per month). After that, simply copy & paste the complementary code examples provided below into your file and include your file path in the appropriate field (labeled in the code comments). That’s all there is to it!



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.