Trace Image from Intensity

조회 수: 3 (최근 30일)
Articat
Articat 2019년 6월 25일
댓글: Articat 2019년 6월 27일
I have the following image and want to plot a line that follows the outline of the image based on the intensity. I considered using "bwtraceboundary" but I I want to be able to set the region in which it traces. For example, if the pixel is greater than 25% of the max pixel in that row, I want to save that point. After the code has spanned over all rows, all of the saved points will be a trace of the high intensity region of the image.
  댓글 수: 1
Articat
Articat 2019년 6월 25일
I tried this:
flamefront = [];
for c = 1:size(mean_max_upper)
r = 1;
indicator = 0;
while indicator == 0;
if mean_max_upper(r,c) >= .25*max(mean_max_upper(r,c));
indicator = 1;
flamefront = [flamefront; r,c];
end
r = r+1;
end
end
where mean_max_upper is the image and flamefront is the array I would like to fill. However it's just running from 1 to the amount of rows and not saving anything.

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

채택된 답변

Image Analyst
Image Analyst 2019년 6월 25일
Try
mask = grayImage > someThreshold
boundaries = bwboundaries(mask)

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by