Effacer les filtres
Effacer les filtres

I want to get result image and set to variable from output figure matlab

2 vues (au cours des 30 derniers jours)
Faris Ali
Faris Ali le 10 Juil 2022
Modifié(e) : DGM le 10 Juil 2022
I want to get result image and set to variable from output figure matlab

Réponses (1)

DGM
DGM le 10 Juil 2022
Modifié(e) : DGM le 10 Juil 2022
That depends on what exactly you mean by "image".
If you want to capture the axes and its contents (plots, images, annotations), you might use getframe and frame2im
If the only thing in the axes is an image as displayed using imshow()/imagesc()/image(), then saving the axes is equivalent to taking a screenshot. Use imwrite to save the image directly instead of saving an adulterated screenshot of it.

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by