aggregating NDVI values within segements
Hi eCog Community,
I'm interested in quantifying NDVI values within some classified segments of vegetated areas and producing a histogram summarizing the mean NDVI values with the segments across a region.
Does anyone have suggestions on a workflow to aggregate NDVI pixel values within each segment into a single value (e.g. mean) , assign the statistic to the segment, and produce a histogram of the mean NDVI values for all the segments of a particular class in a region?
Was this article helpful?
3 comments
Hi Jon,
You will find the mean value of an object as a pre-defined feature already available if you have created an NDVI layer here:
Then you can export your statistics using "export object statistics". The object statistics (mean NDVI) can be simply exported as a CSV file. You also can set the domain to only export statistics of certain classified objects or limit it by region (subset).
This will create a CSV file looking like this:
I suggest the following workflow:
You then can create a histogram based on the CSV file:
Please also have a look at this tool in eCognition --> TOOLS --> 2D FEATURE SPACE PLOT. It allows you to plot different features of objects against each other.
Hope this helps?
Cheers,
Matthias
Fantastic! This is very helpful and I was able to replicate within my project.
On a related thread. Is there a way to get the proportion of pixels below a particular threshold?
Ex. proportion of pixels in each patch that have NDVI <= 0.
Hi Jon,
Perfect!
"Is there a way to get the proportion of pixels below a particular threshold? " --> YES! My approach would be establishing two Image Object Levels eg.:
Then you can simply use the feature "Sub-objects --> rel. area of". This feature will return the relative area of a sub-object class (you can define the distance in "how many levels below").
This will return the relative area of sub-objects classified as X for each object of the super-level. In the GIF below you see Class A in green representing vegetation on the Sub-Level and a simple chessboard on the Super-Level. In the top-right view and in the Image Object Information Window you see the feature value of "Rel. area of sub-object Class-A".