"bwtraceboundary" help in matlab
4 views (last 30 days)
Show older comments
Hi, I am having trouble using the built-in function. Previously, I was able to use bwboundary for other images to get boundaries. However somehow, for certain image I am currently analyzing, I am not able to get the boundary array. I get empty array. Below is the code
cropi = i(start_row:264, start_col:626, :);
boundary_left = bwtraceboundary(cropi, [85, 33], 'W', 8, 10, 'clockwise');
boundary_top = bwtraceboundary(cropi, [16, 3], 'S', 8, 10, 'counterclockwise');
[85, 33] and [16,3] are strating points and I specified the directions as above. Although the image is similar to others I analyzed previoulsy, I get empty array. I wasn't able to upload image but if needed I will send in email.
Thank you very much :)
0 Comments
Answers (1)
Image Analyst
on 31 Jul 2012
You have a 3D image. You're getting rows start_row to 264, and columns from start_col to 626, and all slices (or all color channels) from the (very badly-named) i. Exactly how do you intend it to trace a boundary in 3D?
2 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!