% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{criterion_1}
\alias{criterion_1}
\title{Determining optimal threshold by criterion 1}
\usage{
criterion_1(predmean_mat, delta = 0.01, nugget = TRUE)
}
\arguments{
\item{predmean_mat}{Predictive mean matrix of image}

\item{delta}{Step size for percentages to be tested for criterion 1; default is 0.01}

\item{nugget}{boolean to estimate nugget in robust GaSP model; default is TRUE}
}
\value{
Returns a list containing:
\item{thresholded_image}{Binary matrix after applying optimal threshold}
\item{pixel_counts}{Sum of foreground pixels detected for each percentage threshold}
\item{diff_pixel_counts}{Absolute difference in binary matrix between consecutive percentage thresholds}
\item{grad_mag}{Gradient magnitude.}
\item{estimated_percentage}{Estimated optimal threshold by criterion 1}
}
\description{
Estimates the optimal threshold using criterion 1.
}
