How to save images when it requires the following when showing it through figures: imshow(I, [ ])
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
When processing the image, it is needed to include the square brackets in IMSHOW() command, for example: figure(1); imshow(A,[ ])
When not including the square brackets: figure(2); imshow(A) the image seems incomplete.
I need to save the image that is seen also on the 1st figure. However, i don't know how. using imwrite(A,filename,'jpg'); shows a similar image when using imshow(A)
here is a snippet of my code:
irisImage = imread('C:\test.bmp'); irisImageGrayScale = rgb2gray(irisImage);
irisImageGrayScale = double(irisImageGrayScale);
irisImageGrayScale(irisImageGrayScale>170) = nan;
irisImageGrayScale2 = inpaint_nans(irisImageGrayScale);
irisImageGrayScale2(irisImageGrayScale2<0)=0;
irisImageGrayScale2(irisImageGrayScale2>255)=255;
figure;imshow(irisImageGrayScale2,[])
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 24 Okt. 2011
Make sure irisImageGrayScale2 is uint8 if you want to save it, not double.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!