フィルターのクリア

How I get image from axis for checkbox and get processed

1 回表示 (過去 30 日間)
abhijeet kadam
abhijeet kadam 2014 年 3 月 6 日
回答済み: Image Analyst 2014 年 3 月 6 日
Hello! I have created a simple GUI containing axes,and two edit texts and a browse button. The purpose is when i click on browse button i get the image on axes and filename and pathname are displayed in two edit texts. Code:
[filename pathname ]= uigetfile({'*.jpg';'*.bmp'},'select jpg file'); image = fullfile(pathname,filename ); D=imread(image);
axes(handles.axes1)
imshow(image)
set(handles.edit1,'string',filename);
set(handles.edit2,'string',pathname);
Code is executed successfully. I create two checkboxes containing threshold and equalization and a process button. What i want to do is after displaying the image on the axes I want to get that image for threshold and equalization and when i click on process button the processed images are shown. I tried to do it but i stuck at the point when it comes to getting that image from another object. How should I do it?

回答 (2 件)

Iain
Iain 2014 年 3 月 6 日
The easiest way, is to use the "userdata" of one of your GUI objects, using get & set:
set(handles.somerandombit,'Userdata',image);
image = get(handles.somerandombit,'Userdata');
  2 件のコメント
abhijeet kadam
abhijeet kadam 2014 年 3 月 6 日
I put it in the threshold checkbox function with but it won't help. Can you tell me what changes I should do?
Image Analyst
Image Analyst 2014 年 3 月 6 日
Do not use image as the name of the variable! You will destroy the built in image() function.

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


Image Analyst
Image Analyst 2014 年 3 月 6 日

カテゴリ

Help Center および File ExchangeGet Started with Image Processing Toolbox についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by