Regionprops on binary image gives wrong values
显示 更早的评论
I am trying to using region props to detect some blobs in a binary image. There is very little noise in the image but when I run region props and look at the 'stats' output I get a very long array of many small centroids also the first row of the stats output is the only large value for in the array, about 2000 in size when the image is only 2048x2048. Here is the output: https://postimg.org/image/p2shlqn8b/
Is there something I am missing about region props? I thought it should easily return the centroids and axes. Here is the image I am using and I run this line of code on the image BW https://postimg.org/image/sse8sobzp/ stats = regionprops(BW,'Centroid','MajorAxisLength','MinorAxisLength');
Thanks for your input!
3 个评论
Image Analyst
2016-8-13
I'm sure there's something you're missing or not understanding. Please post your images here with the green and brown frame icon (preferred), or the paper clip icon, along with your m-file, rather than on some third party, external site that we'd have to go to. You can do it all here.
Joe Parks
2016-8-13
Joe Parks
2016-8-13
回答(1 个)
Image Analyst
2016-8-13
0 个投票
Yes, the "foreground" is the white blobs and the "background" is the black blobs. bwlabel() labels only the foreground regions and regionprops() measures only the foreground regions.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Arithmetic 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
