blobDetector: Find blobs in binary image

Description Usage Arguments Value See Also Examples

Description

This function finds blobs in binary images. A blob is defined as a group of 8-connected white pixels on a black background.

Usage

1

Arguments

image

A binary vpImage object, for instance one obtained from the thresholding function.

Value

This function returns a data frame with one row per blob detected in the image and seven columns corresponding to the seven following properties of each blob:

See Also

thresholding

Examples

1
2
3
4
5
6
7
8
9
require(plotrix)
filename <- system.file("sample_img/dots.jpg", package = "videoplayR")
img <- readImg(filename)
bw <- thresholding(img, 200, "inverted")
blobs <- blobDetector(bw)

imshow(img)
points(y ~ x, data = blob, col = "red", pch = 20)
draw.ellipse(blob$x, blob$y, blob$major / 2, blob$minor / 2, blob$alpha, border = "red")

swarm-lab/videoplayR documentation built on May 30, 2019, 9:36 p.m.