Is there a problem if I use DummyImage to call an image in GUI? Because the saved processed image size difference is too big compared to original image. For example,original image is 458 kB but saved image is only 98 kB.
1 view (last 30 days)
Show older comments
%load image
axes(handles.axes1);
handles.DummyImage = uigetfile({'*.jpg';'*.jpeg';'*.png';'*.bmp'});
guidata(hObject,handles);
I=imread(handles.DummyImage);
imshow(I);
%example of processing method
axes(handles.axes2);
L=imread(handles.DummyImage);
J=adapthisteq(L);
imshow(J);
%Save button
axes(handles.axes2);
[FileName, PathName] = uiputfile({'*.jpg';'*.tif';'*.png';'*.gif';'*.jpeg'});
Name = fullfile(PathName,FileName);
hChildAxes2 = get(handles.axes2,'Children');
W = get(hChildAxes2(1),'CData');
imwrite(W, Name,'jpg');
0 Comments
Answers (1)
Image Analyst
on 10 Dec 2014
What format did you read in? The jpg format you saved it in may be much more compressed than the original image. You should virtually never use jpg for imaging applications, certainly not image analysis applications. Use lossless compression format PNG like most everyone else is these days.
2 Comments
Image Analyst
on 11 Dec 2014
There will be no loss of image quality if you use TIFF or PNG . There probably will be if you use jpg, but not if you use the lossless options of JPG2000.
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!