The working of the local Maximum Filter #712
Closed
nealresearch
started this conversation in
General
Replies: 1 comment 3 replies
-
Think about it in 2D and in a continuous curve if it is easier. In the figure below, none of the red points are local maxima for the windows size drawn. In this example, no mater the windows size, if the windows is smaller than the distance between the two maxima you will find two maxima, not one maxima every windows size. But for super large windows that encompasses the two maxima, you will find only one maxima. The small one being hidden by the higher one. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling to understand how the Local Maximum Filter (LMF) operates, particularly in relation to detecting treetops in a Canopy Height Model (CHM). The paper that introduces this method describes it as flagging a pixel as a treetop if it represents a local maximum within a defined search window. However, my practical experience with implementing the LMF doesn't align with this explanation.
For instance, I have a CHM with a resolution of 0.5m and I've applied a 1m window size for the LMF. Logically, I'd expect to identify a treetop at every 2-pixel interval, but that's not happening. Instead, it seems to be taking the maximum height value in the vicinity of a tree as the treetop. This is inconsistent with a 1m window size. The issue is even more pronounced with larger trees, where multiple points are flagged as treetops, which is what i expect however medium size trees get flagged with only one treetop.
Can someone clarify whether the LMF uses the pixel at the center of the window and then expands equally on either side? For example, if the window size is 1m, is 0.5m to the right and 0.5m to the left of the central pixel included in the window?
I would greatly appreciate a more detailed explanation of how the LMF works.
Here is the link for the CHM
https://drive.google.com/file/d/1rqyyAlm8zCIgGA_Cl5mJ4Z-UJ0b8xl_o/view?usp=sharing
Here is the code
Beta Was this translation helpful? Give feedback.
All reactions