问题

“ connectedPixelCount()”在 GEE 中无法实现和周围的像素进行周边限速的连接,也就是边缘锐化或者后处理的过程中出现了无法实现的过程,这也就表明我们无法进行影像后处理,所以这里我们利用focalmode函数来实现处理。其实这个问题的关键是,因为河流这边是要和周围的像素连接来实现去颗粒化的效果,所注意这里我们发现很多时候只有一个像素,所以无法实现消除影像的颗粒化。

函数

connectedPixelCount(maxSizeeightConnected)

Generate an image where each pixel contains the number of 4- or 8-connected neighbors (including itself).生成一幅图像,其中每个像素包含 4 个或 8 个相邻像素(包括自身)。

Arguments:

this:input (Image):

The input image.

maxSize (Integer, default: 100):

The maximum size of the neighborhood in pixels.

eightConnected (Boolean, default: true):

Whether to use 8-connected

02-22 01:25