unknown image format on axes in MATLAB
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
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
  Image Analyst
      
      
 2013년 5월 4일
				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.
답변 (1개)
  Image Analyst
      
      
 2013년 5월 4일
        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
  Image Analyst
      
      
 2013년 5월 5일
				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.)
참고 항목
카테고리
				Help Center 및 File Exchange에서 White에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


