Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
In most cases, color is not needed for recognition and can even mislead OCR algorithms. Grayscale allows images to be processed more efficiently, resulting in less specks, cleaner backgrounds, and crisper text than color images. Converting to grayscale can also improve the results of other preprocessing filters, such as automatic deskewing.
Aspose.OCR provides a function for converting an image to grayscale before proceeding with preprocessing or OCR.
To convert the image to grayscale, run the image through OCR_IMG_PREPROCESS_GRAYSCALE
preprocessing filter.
std::string image_path = "source.png";
custom_preprocessing_filters filters_;
filters_.filter_1 = OCR_IMG_PREPROCESS_GRAYSCALE;
asposeocr_preprocess_page_and_save(image_path.c_str(), "result.png", filters_);
Grayscale conversion is recommended for the following images:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.