unknown image format on axes in MATLAB
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I'm working on CBIR, in my GUI I've 6 axes one for query image 5 for resulted images. For displaying images on axes my code is
function displayResults(filename,hObject, eventdata, handles)
% Open 'filename' file... for reading...
fid = fopen(filename);
for N=6:1:10
imagename = fgetl(fid);
if ~ischar(imagename), break, end % Meaning: End of File...
x=imread(imagename);
axes(handles.(sprintf('axes%d', N)));
imshow(x)
xlabel(imagename);
end
fclose(fid);
and calling function is in pushbutton function Texture_Callback(hObject, eventdata, handles). calling function is
displayResults('textureResults.txt',hObject, eventdata, handles);
before pressing pushbutton http://s1273.photobucket.com/user/Chethan_tv/media/fig5_zps64ca6452.jpg.html?sort=3&o=1
after pressing pushbutton http://s1273.photobucket.com/user/Chethan_tv/media/fig5_zps98c96f8f.jpg.html?sort=3&o=0
What just happened to image quality?
Before using above code i was getting clear images, but that was not a GUI window, instead just a figure window. any thing wrong in called function?
5 Commenti
Image Analyst
il 4 Mag 2013
Not sure what "map values(x and y axis values)" are - I didn't see any axis values or tick marks, but if you have some there now, just say "axis off" to get rid of them. If you have a colorbar, you can say
colormap(gray(256));
colorbar off;
to get rid of the colorbar and go back to a normal display.
Risposte (1)
Image Analyst
il 4 Mag 2013
Can you plot the histogram in one of those axes so I can look at it. Here's a snippet of code:
% Let's compute and display the histogram.
[pixelCount, grayLevels] = imhist(grayImage);
bar(pixelCount);
grid on;
title('Histogram of original image', 'FontSize', fontSize);
xlim([0 grayLevels(end)]); % Scale x axis manually.
Then see if the histogram (pixelCount) ends around mid-100s and then is all zeros until there is a big spike at element #256.
13 Commenti
Image Analyst
il 5 Mag 2013
Why did you do that? Why did you not use grayscale? (They were saved as PNG, which is good though, better than BMP, so at least you did something right.)
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!