How to import ".heic" image file of Apple phone by matlab?

84 views (last 30 days)
I have a lot of ".heic" image files taken by Apple phones, and I want to read them into matlab to analyze them, but it seems that the imread function does not support this kind of format. Is there any way to do this in matlab? thanks in advance!
os: win10
DGM on 1 Oct 2021
Afaik, HEIC is normally lossy (with a lossless option), so that bridge has probably already been burned. Of course, I'm not saying that compounding the damage by using JPG would be good (hence my comment on conversion), but I just thought it's worth noting that (some) damage has (probably) already been done.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 22 Mar 2022
I've also used ImageMagick, at the suggestion of people on the Mathworks Image Processing toolbox team. I got the images from someone with a iPhone who didn't know she had options for how to format the image for sending. She could have used a different format but HEIC was the default. She didn't need to resnap, just needed to adjust some settings before transmitting, like this:
It’s easy on the Mac. For interactive use, use the Preview app to export any image to another format. For command-line scripting, use /usr/bin/sips.
For iPhone users, change a setting in order to share photos as JPEG rather than HEIC:
Settings -> Photos -> Transfer to Mac or PC -> Automatic
The IPT team knows about the issue (for a long time now) and it's on their to-do list. In fact many of them use Apple products. They said that requests sent in to influence their priority list, so let's have everyone send in their request to have read (especially) and write capability for HEIC format image files.

More Answers (0)


Find more on Convert Image Type in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!