I'm currently looking at overflows of rainwater in a region and I want to find all the puddles, which have a restricted size and a minimum number of pixels in them and create a vector layer where each puddle has its own polygon.
I want to define the size of puddles from the raster layer and have determined that the minimum size of each polygon should be fx. 160 pixels.
My issue is that I can't just create a vector layer based on my raster layer for rainwater, since this results in one big polygon, due to roads cutting through the area, and I'm not interested in these.
I thought about creating a grid layer and count number of rasters within each grid, but this could potentially result in a number of puddles being undetected since the grid could cut through a puddle.
Is there another way to define a polygon size based on a clustering of raster data?