\name{rip.opencv}
\alias{rip.opencv}
\alias{rip.cv}
\alias{rip.opencv-package}
\title{R Interface to OpenCV}
\description{

  The \pkg{rip.opencv} add-on package provides an R interface for tools
  in the popular OpenCV library. It is not an exhaustive wrapper;
  instead it exposes selected OpenCV functions, using standard R objects
  to represent corresponding OpenCV objects, and explicitly converting
  between the two forms as necessary. The idea behind this design is to
  facilitate a primarily R-based workflow, with OpenCV providing access
  an additional suite of operations.

}
\details{

  The package defines a \code{\link{rip}} class in R that parallels the
  \code{cv::Mat} class in OpenCV, which is essentially an analogue of
  three-dimensional arrays in R. Conversion functions written in C++ map
  \code{"rip"} objects to and from \code{cv::Mat} objects as necessary.

  Wrappers to OpenCV functions are exposed as Rcpp modules, collected
  together in the environment object \code{rip.cv}. See the vignette and
  examples. More functions may be exposed in future.

  In addition to these modules, user-friendly high-level functions are
  provided for certain common operations. See the other help pages in
  this package for details.

}

\examples{

ls(rip.cv)
(imreadModes <- rip.cv$enums$ImreadModes)

f <- system.file("sample/color.jpg", package = "rip.opencv", mustWork = TRUE)
(x <- rip.cv$IO$imread(f, imreadModes["IMREAD_COLOR"]))
(gx <- rip.cv$photo$decolor(x))
opar <- par(mfrow = c(1, 2))
image(x, rescale = FALSE, main = "original")
image(gx, rescale = FALSE, main = "decolored")
par(opar)

}

\author{Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}}


