px.flood: Select a region of homogeneous colour

px.floodR Documentation

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 documentation built on May 29, 2024, 1:38 a.m.