필터 지우기
필터 지우기

actual size of axes GUI change after uploading IMAGE ASPECT RATIO CHANGE

조회 수: 1 (최근 30일)
praveen chandaliya
praveen chandaliya 2017년 9월 21일
댓글: praveen chandaliya 2017년 9월 21일
IMAGE ASPECT RATIO CHANGE IMAGE SIZE 1024*768 BUT AFTER UPLOAD SIZE CHANGE ON AXES GUI I HAVE ENCLOSED ERROR SCREEN SHOT.
[image_file_name,image_file_path ] = uigetfile({'*.jpg';'*.avi'},'Please select Frozen Image or Video'); %;*.png;*.yuv;*.bmp;*.tif'},'Pick a file');
handles.image_file_name = image_file_name;
handles.image_file_path = image_file_path;
[pathstr,name,ext] = fileparts(image_file_name)
if(strcmp(ext,'.jpg')||strcmp(ext,'.png'))
if(isequal(image_file_path,0))
msgbox('Please select file');
return;
end
input_image_file = [image_file_path,image_file_name];
handles.temp_image_file = input_image_file;
handles.input_image_file =input_image_file;
% Acquiring Image
img = imread(input_image_file);
[width,height] = size(rgb2gray(img));
handles.img = img;
axes(handles.axes2);
imshow(img);
drawnow;

답변 (1개)

Walter Roberson
Walter Roberson 2017년 9월 21일
imshow() tends to resize axes in order to match the image aspect ratio.
If you have an axes whose aspect ratio does not happen to match the image, and you want to force the image to fill the entire axes, then you can do that -- but the result will not have square pixels.
  댓글 수: 1
praveen chandaliya
praveen chandaliya 2017년 9월 21일
can you more detail way explain. suppose initial axes size 400*300 after before uploading image (size of image 600*400) after upload image size convert into (300*250 ). i am getting actual axes size . in scree shot you see that the size of axes in white. after upload size go 20 to 30 % reduce .

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by