필터 지우기
필터 지우기

Data Cursor as an input for a function

조회 수: 3 (최근 30일)
Andreas Passos
Andreas Passos 2016년 3월 28일
댓글: Andreas Passos 2016년 3월 29일
Hi,
I am writing a function that process a certain region (rectangular) of an image and I am trying to make the function show me the image in order to define the processing area by clicking on it the two points (X1,y1 , x2,y2) with data cursor.
an example of the function is:
function [ NormIntensityTime ] = NormIntensityTime( ImName_dir, yPx, xPx )
ImName_dir = 'C:\Users\Lab\...\Preprocessed\Str\020\test020_7\*.tif';
yPx = 40:134
xPx = 600:1100
etc...
Thanks a lot,
Andreas

채택된 답변

Walter Roberson
Walter Roberson 2016년 3월 28일
or perhaps uigetfile() is what you want to select the file.
Once you have imread() the file, then image() or imshow() to get it to display.
However, you should not be using data cursor mode to define regions. You should look at imrect() or ginput()
  댓글 수: 1
Andreas Passos
Andreas Passos 2016년 3월 29일
Thank you very much for the answer! I think the ginput() function is the one I need.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by