\name{rip.conv}
\alias{rip.conv}
\alias{rip.filter}
\title{2-D convolution and filtering}
\usage{
rip.conv(x, k, type = c("full", "valid", "same"), flip = TRUE)
rip.filter(x, k, flip = FALSE, anchor = c(-1L, -1L), delta = 0,
           borderType = c("replicate", "constant", "reflect", "wrap", "reflect_101"))
}
\arguments{
  \item{x}{A \code{"rip"} object (or an object that can be coerced
    to one), giving the image to be convolved.}

  \item{k}{A \code{"rip"} object (or an object that can be coerced
    to one), giving the colvolution kernel.}

  \item{type}{Character string that determines the part of the
    2-dimensional convolution to be returned. If \code{"full"},
    the full convolution is returned. For \code{"same"}, a 'rip'
    object of same size as 'x' is returned. For \code{"valid"},
    only the part of the result that did not use and pixels
    outside the boundary of \code{x} are returned.
  }
  \item{flip}{Logical flag indicating whether the kernel is to be
    flipped.  This is the difference between convolution and
    filtering, that is, whether the index along the rows and
    columns of the kernel combine with the index along the rows
    and columns of \code{x} in increasing or decreasing order.
  }
  \item{anchor}{
    Determines the position of the kernel with reference
    to location in the output image. The default is to center the
    kernel.
  }
  \item{delta}{
    Value added to the return value after filtering.
  }
  \item{borderType}{
    Character string determining how the value of \sQuote{missing}
    pixels outside the image boundary are computed. The names are
    suggestive; see OpenCV documentation for details.
  }
}
\value{
  Convolution of 'x' and 'k'
}
\description{
  Apply a convolution filter to an image.
}
\details{
  These functions are wrappers for the OpenCV function
  \code{filter2D}. \code{rip.filter} is a minimal
  wrapper. \code{rip.conv} is a more user-friendly interface that
  allows finer control over the size of the resulting image.
}
\author{
  Kaustav Nandy
}
