How do i find the local maximums of a 2D matrix in a specified neighborhood?

50 ビュー (過去 30 日間)
Pedro Ribeiro
Pedro Ribeiro 2020 年 3 月 3 日
回答済み: Urmila Rajpurohith 2020 年 3 月 6 日
Hi,
I've been using the function Localmax = imregionalmax(MyMatrix).
The problem is that this function only gives me the local maximums on a neighborhood of 1 pixel, and i need my maximums spaced by 8 pixel horizontally, vertically and diagonally.
Can somebody help me? Thanks in advance.

回答 (1 件)

Urmila Rajpurohith
Urmila Rajpurohith 2020 年 3 月 6 日
you can use below command
Localmax = imregionalmax(MyMatrix,conn)
Where "conn" specifies the pixel connectivity.
you can refer to the below documentation link for more information on how to use "conn" property

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by