Trace Image from Intensity

4 views (last 30 days)
Articat
Articat on 25 Jun 2019
Commented: Articat on 27 Jun 2019
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 Comment
Articat
Articat on 25 Jun 2019
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.

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 25 Jun 2019
Try
mask = grayImage > someThreshold
boundaries = bwboundaries(mask)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!