Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

px.flood

Select a region of homogeneous colour


Description

Select pixels that are similar to a seed pixel. The underlying algorithm is the same as the bucket fill (AKA flood fill). Unlike with the bucket fill, the image isn't changed, the function simply returns a pixel set containing the selected pixels.

Usage

px.flood(im, x, y, z = 1, sigma = 0, high_connexity = FALSE)

Arguments

im

an image

x

X-coordinate of the starting point of the region to flood

y

Y-coordinate of the starting point of the region to flood

z

Z-coordinate of the starting point of the region to flood

sigma

Tolerance concerning neighborhood values.

high_connexity

Use 8-connexity (only for 2d images, default FALSE).

Details

Old name: selectSimilar (deprecated)

See Also

bucketfill

Examples

#Select part of a sail 
px <- px.flood(boats,x=169,y=179,sigma=.2) 
plot(boats)
highlight(px)

imager

Image Processing Library Based on 'CImg'

v0.42.10
LGPL-3
Authors
Simon Barthelme [aut], David Tschumperle [ctb], Jan Wijffels [ctb], Haz Edine Assemlal [ctb], Shota Ochi [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.