% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{eliminate_small_areas}
\alias{eliminate_small_areas}
\title{Eliminating Noise and Small Foreign Object Masks from Cell Mask Matrix}
\usage{
eliminate_small_areas(
  GP_masks,
  middle_threshold = 0.15,
  boundary_threshold = 0.05
)
}
\arguments{
\item{GP_masks}{Cell mask matrix}

\item{middle_threshold}{Size threshold for filtering objects not touching the image boundary (removes anything smaller than threshold * mean mask size); default is 0.15}

\item{boundary_threshold}{Size threshold for filtering objects touching the image boundary (removes anything smaller than threshold * mean mask size); default is 0.05}
}
\value{
Returns a cell mask matrix with masks from small foreign objects or noise removed
}
\description{
Filters object masks from from noise or foreign objects that are significantly
smaller than the estimated cell size. All objects smaller than a certain
threshold based on the mean mask size are removed.
}
