필터 지우기
필터 지우기

My improfile results get shorter

조회 수: 1 (최근 30일)
Hoyong Yie
Hoyong Yie 2020년 2월 5일
편집: Walter Roberson 2020년 2월 6일
This might be a simple or dumb question but please help
I'm brand new to MATLAB and am trying to get intensity data out of images using improfile.
This image 'A' is a 422 X 85 image (gray scale) and I'm using the function as I1=improfile(A,[1 1],[1 422]), I2=improfile(A,[2 1],[2 422]) ...
The first I1 result gives me '422 X 1' size, but then it keeps getting shorter afterwords. (I2 - 421X1, I3 - 420X1, ...)
Am I doing something wrong?
Thanks in advance for your help.

채택된 답변

Walter Roberson
Walter Roberson 2020년 2월 5일
This is expected. The number of pixels used is probably max() of delta x and delta y, with it producing one result for each integer offset in that space
  댓글 수: 4
Walter Roberson
Walter Roberson 2020년 2월 6일
편집: Walter Roberson 2020년 2월 6일
N = 256;
start_at = [17 1];
end_at = [17 242];
x_path = linspace(start_at(1), end_at(1), N);
y_path = linspace(start_at(2), end_at(2), N);
I17 = interp2(double(A), x_path, y_path);
For this purpose remember that y corresponds to height, which is rows, the first index of A, and x corresponds to width, which is columns, the second index of A.
Image Analyst
Image Analyst 2020년 2월 6일
Here is how they define the number of pixels: "improfile chooses a value for n, roughly equal to the number of pixels the path traverses."

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

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by