stackObjects2: Place Detected Objects with Bounding Box in an Image Stack

View source: R/stackObjects2.R

stackObjects2R Documentation

Place Detected Objects with Bounding Box in an Image Stack

Description

Place objects in an image stack with the same logic as stackObjects except the entire bounding box is included for each object in the image stack.

Usage

stackObjects2(mask, ref, combine = TRUE, bg.col = "black", ext)

Arguments

mask

An Image object or an array containing object masks. Object masks are sets of pixels with the same unique integer value.

combine

If mask contains multiple images, should the resulting list of image stacks be combined using combine into a single image stack.

bg.col

Background pixel color.

ext

A numeric controlling the size of the output image. If missing, ext is estimated from data as described in stackObjects.

Details

Like stackObjects, stackObjects2 creates a set of n images of size c(2*ext+1,2*ext+1), where n is the number of objects in mask, and places each object of mask in this set.

If ext is missing, it is estimated with the 98% quantile of the m.majoraxis/2 extracted from computeFeatures.moment.

Value

An Image object containing the stacked objects contained in mask. If mask contains multiple images and if combine is TRUE, stackObjects2 returns a single combined image otherwise a list of Image objects is returned.


ornelles/EBImageExtra documentation built on Aug. 10, 2022, 11:44 p.m.