Connected Neighbourhood / Regional Maxima - Image Processing
4 次查看(过去 30 天)
显示 更早的评论
Hi there,
I am not able to understand how imregionalmax works for finding the regional maxima. Can anybody brief me.!! Mainly not clear about the connected neighbourhood.
Thanks for the time.
0 个评论
回答(5 个)
Harshit
2012-11-7
Hi Sriram, 8-Connected neighborhood means the pixels in left,right,up,down,left up, left down,up right and down right. It works by finding all the connected component of same intensity say the 3x3 matrix of 22. And then checking if these components have a connectivity with intensity value higher. Connectivity now means connectivity by a single element of the components.
0 个评论
Andrei Bobrov
2012-11-7
x=[ 10 10 10 10 10
10 10 10 30 30
10 13 13 10 30
10 13 10 10 10
10 10 10 10 10]
imregionalmax(x,4)
Harshit
2012-11-7
Hi Sriram, It won't be. You have to see the entire connected component. Look at 3rd column and 3rd row 13 it is connected to 2nd row and 4th column 30 in a 8-neighbor way. So 13 is connected to 30 and so it will become zero.
4 个评论
Harshit
2012-11-8
You can look at the source of matlab function itself. It is the most optimized code. Else the logic will be for every pixel check its 8 neighbor. If any of them is bigger store it in a lut such that a(13,10)=1 which means intensity 13 and 10 are connected. In the second iteration just traverse the matrix and delete elements on the basis of lut.
Image Analyst
2012-11-8
In this case, as with most m-files, the m-file for the function in the toolbox is merely a wrapper for a mex file that does the actual heavy lifting. So you can't see what it does internally. And for this case, it doesn't give a citation to a published article.
Image Analyst
2012-11-7
Regarding your example: No, the 13's won't be a local max. There's a trail of pixels (equal or higher in values) that connect the 13's to a higher number (30), so none of the 13's will be a regional max. With 8 connected the trail can go up, down, left, right, or diagonally.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!