Description Usage Arguments Value See Also Examples
This function finds blobs in binary images. A blob is defined as a group of 8-connected white pixels on a black background.
1 |
image |
A binary vpImage object, for instance one obtained from the
|
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:
"id": identity of the blob.
"x": x coordinate of the center of the ellipse approximating the shape of the blob.
"y": y coordinate of the center of the ellipse approximating the shape of the blob.
"alpha": orientation in degrees of the major axis of the ellipse.
"major": length of the major axis of the ellipse.
"minor": length of the minor axis of the ellipse.
"area": area of the polygon containing the blob.
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.