how can I write and reads an image from a folder?

I want a code solve this
  1. read an image from a folder
  2. select image and show it into axes
  3. write into the image by making some filters

4 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 6 月 25 日
Can you show us your code? Have you found any particular problems?
yasser
yasser 2015 年 7 月 1 日
編集済み: Walter Roberson 2015 年 7 月 2 日
%Here there are a problem the code reads just the first image and give an error if i select any image from the same folder.
% --- Executes on button press in Browse.
function Browse_Callback(hObject, eventdata, handles)
% hObject handle to Browse (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[filename, pathname] = uigetfile('*.tif', 'Pick an image');
if isequal(filename,0) || isequal(pathname,0)
disp('User pressed cancel')
else
a=imread(filename);
axes(handles.axes1);
imshow(a);
end
Image Analyst
Image Analyst 2015 年 7 月 2 日
Make it a full file name - folder plus base file name:
filename = fullfile(pathname, filename);
yasser
yasser 2015 年 7 月 2 日
thanks Image Analyst I appreciate your help

サインインしてコメントする。

 採用された回答

Image Analyst
Image Analyst 2015 年 6 月 26 日

0 投票

Start with my Image Segmentation Tutorial. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It does all of the things you requested.

その他の回答 (1 件)

Rushikesh Tade
Rushikesh Tade 2015 年 6 月 26 日

0 投票

  • read an image from a folder
variable_name=imread('image_name.ext')
  • select image and show it into axes
imshow(variable_name)
  • write into the image by making some filters
imwrite(Variable_consisting_processed_image,'output_filename')

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2015 年 6 月 25 日

編集済み:

2015 年 7 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by