How can I read an image file that is stored in PDF format (much like reading a jpeg file with I = imread('image.jpg')?
92 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Douglas Chai
el 21 de Mayo de 2015
Comentada: Douglas Chai
el 6 de En. de 2021
At the moment, I have to first convert (outside MATLAB) the image from PDF to JPEG format so that I can use imread in MATLAB. Is there a direct way to read in a (single page) PDF file as an image? Many thanks.
2 comentarios
Guillaume
el 21 de Mayo de 2015
I suspect this is not possible because PDF is not an image format but a container format that may contain text, one or more raster images, and one or more vector graphics.
Thomas Koelen
el 21 de Mayo de 2015
Respuesta aceptada
Stephen23
el 21 de Mayo de 2015
Editada: Stephen23
el 21 de Mayo de 2015
The short answer is: no.
The PDF "standard" is not an image file format, although in some ways the entire PDF is a bit like an image, in that it contains information about the locations and presentation of elements on a page. This means that it is extremely versatile, but also very unwieldy and not very friendly for the simple extraction of text or images. If the image that you want is an embedded bitmap image (e.g. JPG, etc), then there may be some tool for extracting this. If it is something like an EPS, then it may be easier to convert this to EPS and import this format into MATLAB.
These might be interesting for you to read:
Más respuestas (1)
Stefanie Schwarz
el 5 de En. de 2021
There is a way to import a PDF as image in MATLAB by making use of the Apache PDFBox library that we ship.
Please see the following post for the code:
Ver también
Categorías
Más información sobre Convert Image Type en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!