필터 지우기
필터 지우기

GUI

조회 수: 2 (최근 30일)
Shree Nath
Shree Nath 2012년 6월 5일
I have to get an image address through the Edit Box in the GUI. then, i want to read the image on that address using the imread function. how to do it?
Address is of the form C:\Users\user\Documents\MATLAB\xyz.png

채택된 답변

Image Analyst
Image Analyst 2012년 6월 5일
Why not use uigetfile() instead - it's much friendlier to the user than having to type in some filename that they can't even see or easily verify that it exists.
  댓글 수: 1
Shree Nath
Shree Nath 2012년 6월 5일
exactly wat i wanted .. thank you :)

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2012년 6월 5일
filename = get(handles.EDITBOXTAG, 'String'); %adjust EDITBOXTAG as needed
theimage = imread(filename);
  댓글 수: 2
Shree Nath
Shree Nath 2012년 6월 5일
had tried it already..
it said -
??? Conversion to logical from cell is not
possible.
Walter Roberson
Walter Roberson 2012년 6월 5일
theimage = imread(filename{1});

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

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by