How to detect & localize a text in pdf using OCR in MATLAB

Using Python package - pdf2image convert the the pdf to image Using OCR in MATLAB to detect & localize the text


Updated 16 Jul 2019

View License

Using OCR to detect and localize text is simple in MATLAB. However, it is only workable if your input is image format (jpg,png) but not pdf. Hence, we are going to convert the pdf to image. However, up to MATLAB version R2019a, It don't have any built-in function to convert pdf to image. For this example, i am going to use a python package pdf2image help us to convert pdf to image. There are no conflicts using MATLAB or Python. If there is something working better in Python, we can collaborate both platform (MATLAB and Python) through MATLAB Api to complete our objective.

Highlights :
Execute python user-defined function from MATLAB
Detect and Localize a text in pdf

Product Focus :
Computer Vision Toolbox

Written at 16 July 2019

Cite As

Kevin Chng (2023). How to detect & localize a text in pdf using OCR in MATLAB (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Call Python from MATLAB in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!


Version Published Release Notes

modify description


Change description


*change description