polar_qtree | R Documentation |

The quad-tree segmentation algorithm is a top-down process that makes recursive divisions in four equal parts until a condition is satisfied and stops locally. The usual implementation of the quad-tree algorithm is based on the raster structure and this is why the result are squares of different sizes. This method implements the quad-tree segmentation in a polar space, so the segments are shaped like windshields, though some of them will look elongated in height. The pattern is two opposite and converging straight sides and two opposite and parallel curvy sides.

polar_qtree(r, z, a, scale_parameter = 0.2)

`r` |
SpatRaster. |

`z` |
SpatRaster built with |

`a` |
SpatRaster built with |

`scale_parameter` |
Numeric vector of length one. Quad-tree is a top-down
method. This parameter controls the stopping condition. Therefore, it
allows controlling the size of the resulting segments. Ultimately, segments
sizes will depend on both this parameter and the heterogeneity of |

The algorithm splits segments of 30 degrees resolution into four sub-segments
and calculates the standard deviation of the pixels from `r`

delimited
by each of those segments. The splitting process stops locally if the sum of
the standard deviation of the sub-segments minus the standard deviation of
the parent segment (named *delta*) is less or equal than the
`scale_parameter`

. If `r`

has more than one layer, *delta* is
calculated separately and *delta* mean is used to evaluate the stopping
condition.

A single layer image of the class SpatRaster with integer values.

Other Segmentation Functions:
`chessboard()`

,
`mask_hs()`

,
`mask_sunlit_canopy()`

,
`qtree()`

,
`rings_segmentation()`

,
`sectors_segmentation()`

,
`sky_grid_segmentation()`

## Not run: caim <- read_caim() plot(caim) caim <- normalize(caim, 0, 255) z <- zenith_image(ncol(caim), lens("Nikon_FCE9")) a <- azimuth_image(z) seg <- polar_qtree(caim, z, a) plot(seg) plot(extract_feature(caim$Blue, seg)) ## End(Not run)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.