Change the resolution of an image created/opened with imshow
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I'm making a random-black&white-dot background (random-dot stereogram). For that purpose I create a matrix composed by zeros and ones with the function I downloaded from a website (http://www.cns.atr.jp/~kmtn/imageMatlab/index.html). The function is called "randDot" and looks like:
function im = randDot(vhSize, dotSize, dotCol, backCol, density)
Then I establish the size of the image, dot color (black), background color (white) and density (0.5) and generate the image using IMSHOW as:
figure(1); imshow(im);
My problem comes when I want to visualize the image. When I choose a image size bigger than 1000x1000 (pixels?? Is it not defined in code) the function IMSHOW scales the entire image to fit in the window. How can I get an image as big as I want? Another option could be creating a picture with high resolution and scale it with another program, but, which is the resolution of the image generated by IMSHOW? Is it fixed or can I change it. Is there any better function to make it?
Thanks.
0 commentaires
Réponses (1)
Sarah Wait Zaranek
le 3 Mar 2011
I think you can solve this by changing the 'InitialMagnification' property to change the magnification used to display the image.
You can get your default settings by:
iptgetpref('ImshowInitialMagnification')
There is more about this property in the documentation here: http://www.mathworks.com/help/toolbox/images/ref/imshow.html
Here is a small code example to show using the property:
>> I = imread('cameraman.tif');
>> imshow(I,'InitialMagnification',100) % 100 percent
>> imshow(I,'InitialMagnification',20) % 20 percent
0 commentaires
Voir également
Catégories
En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!