How to convert .mat file to png format?

Answers (1)

Sindar
Sindar on 24 Feb 2020
This is not generally possible. mat files store variables, not images. This is like asking "how do I convert a flashdrive into a png?" It is not sensible. If you have more information about a specific problem, we might be able to help

4 Comments

Hello,
I have a .mat file that I want to convert to .png so that I can apply a threshold method to divert the parts that interest me.
Do you know how to do that? Or is it possible to make a threshold directly on the .mat file? If yes how?
Thank you a lot
To be clearer than I was:
You cannot convert a .mat to a .png
There is a decent chance that you have a mat-file with data in it that could be plotted, or that corresponds to an image, but that is entirely dependent on the particular file. Where did you get the mat-file? When you select it in the "Current Folder" tab, what displays in the preview tab below?
There are the .mat file I'm talking about and my draft code
My goal is to be able to remove the skull (colored orange/yellow)
This sounds like a completely separate question. When you Ask it, include your code in a code block and attach the mat-file. Also, specify what is and is not working

Sign in to comment.

Categories

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

Asked:

on 22 Feb 2020

Commented:

on 8 Jan 2024

Community Treasure Hunt

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

Start Hunting!