Effacer les filtres
Effacer les filtres

how to fix the size of imshow image: the result image is too small

66 vues (au cours des 30 derniers jours)
Edgaris Rhomer
Edgaris Rhomer le 23 Avr 2013
Hi all,
I have a code where at the end I have a 100x100 matrix of integers in between 111 and 666. Then I determine the second most frequent entry, and set that as 0 and else as 1 and convert it into an image using imshow.
However, the problem is that the result is too small that I have to zoom in every time.
I'll write the image processing part and attach the result image.
idx_tab = maxidx(almos) ; % maxidx gives an array of most frequent and
second most frequent entry of a given matrix
french = idx_tab(2) ; % identifying the second most frequent entry
for nn=1:mat_size % For a matrix of size mat_size x mat_size
for kk=1:mat_size
if almos(nn,kk) == french
almos(nn,kk) = 0 ;
else
almos(nn,kk) = 1 ;
end
end
end
last = imshow(almos) ;
Then when the code is done I get something like this in the link:
Way too small. Any suggestions? Thank you.

Réponse acceptée

Image Analyst
Image Analyst le 23 Avr 2013
Try changing the InitialMagnification.
imshow(almos, 'InitialMagnification', 800);

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox 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