Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #98

Merged
merged 8 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
Expand All @@ -29,14 +31,14 @@ jobs:
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
rtools-version: '42'
# rtools-version: '44'
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

Expand Down
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: Rvision
Type: Package
Title: Computer Vision Library for R
Version: 0.8.0
Date: 2024-01-31
Version: 0.8.1
Date: 2024-08-01
Authors@R: c(
person("Simon", "Garnier", email = "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-3886-3974")),
Expand All @@ -18,7 +18,8 @@ Depends:
R (>= 4.0.0)
Imports:
Rcpp (>= 1.0.1),
ROpenCVLite (>= 4.70.0),
RcppArmadillo,
ROpenCVLite (>= 4.90.2),
methods,
pbapply,
stats,
Expand All @@ -29,7 +30,7 @@ RcppModules: class_Image, class_Capture, class_VideoWriter,
methods_OpticalFlow, methods_Blob, methods_Morphology, methods_Filters,
methods_Display, methods_Draw, methods_Geometry, methods_Shape, methods_Transform,
methods_Feature, methods_Autothresh, methods_Ximgproc, methods_Calib3d
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Biarch: false
StagedInstall: false
Encoding: UTF-8
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export(image)
export(imhist)
export(improfile)
export(inRange)
export(initUndistortRectifyMap)
export(inpaint)
export(insertChannel)
export(invert)
Expand Down Expand Up @@ -219,6 +220,7 @@ export(readMulti)
export(readNext)
export(reduce)
export(release)
export(remap)
export(reset)
export(resize)
export(rotate)
Expand Down Expand Up @@ -258,6 +260,7 @@ export(zeros)
exportClasses(VideoStack)
import(ROpenCVLite)
import(Rcpp)
import(RcppArmadillo)
import(methods)
import(pbapply)
importFrom(grDevices,col2rgb)
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Add goodFeaturesToTrack function (finds the most prominent corners in an image).
* Add pyramid resampling functions (up- and down-).
* Add ORB keypoint detection and matching.
* Add approxPolyDP (Douglas-Peucker algorithm for approximates a polygon with another polygon with less vertices).
* Add approxPolyDP (Douglas-Peucker algorithm for approximating a polygon with another polygon with fewer vertices).
* Add affine transform matrix computation.
* Add string argument for streams (users can now pass the URL of a video stream or a GStreamer pipeline string).
+ Add invertFourcc function to recover a codec's name from its fourcc code.
Expand Down
30 changes: 15 additions & 15 deletions R/ImageClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ nchan <- function(x) {
#'
#' @return A character string indicating the bit depth of the image. For now, it
#' can only be one of the following:
#' \itemize{
#' \item 8U: an image with a bit depth of 8 unsigned bits.
#' \item 16U: an image with a bit depth of 16 unsigned bits.
#' \describe{
#' \item{8U:}{an image with a bit depth of 8 unsigned bits.}
#' \item{16U:}{an image with a bit depth of 16 unsigned bits.}
#' }
#'
#' @author Simon Garnier, \email{garnier@@njit.edu}
Expand Down Expand Up @@ -315,11 +315,11 @@ bitdepth <- function(x) {
#'
#' @return A character string indicating the color space of the image. For now,
#' it can only be one of the following:
#' \itemize{
#' \item BGR: an image with 3 channels, Blue, Green, and Red.
#' \item BGRA: an image with 3 channels, Blue, Green, Red, and Alpha
#' (transparency).
#' \item GRAY: a grayscale image (1 channel only).
#' \describe{
#' \item{BGR:}{an image with 3 channels, Blue, Green, and Red.}
#' \item{BGRA:}{an image with 3 channels, Blue, Green, Red, and Alpha
#' (transparency).}
#' \item{GRAY:}{a grayscale image (1 channel only).}
#' }
#'
#' @author Simon Garnier, \email{garnier@@njit.edu}
Expand Down Expand Up @@ -386,7 +386,7 @@ as.matrix.Rcpp_Image <- function(x, ...) {
#'
#' @param target The location where the results should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down Expand Up @@ -468,7 +468,7 @@ split <- function(x) {
#'
#' @param target The location where the results should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down Expand Up @@ -528,7 +528,7 @@ merge <- function(x, target = "new") {
#'
#' @param target The location where the results should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down Expand Up @@ -896,7 +896,7 @@ pset <- function(image, x, y, color) {
#' @param border_type A character string indicating the extrapolation method to
#' use when filling empty pixels created during the transformation. It can be
#' any of the following:
#' \itemize{
#' \describe{
#' \item{"constant" (the default):}{\code{iiiiii|abcdefgh|iiiiii} with \code{i}
#' specified by \code{border_value}.}
#' \item{"replicate":}{\code{aaaaaa|abcdefgh|hhhhhh}.}
Expand All @@ -912,7 +912,7 @@ pset <- function(image, x, y, color) {
#'
#' @param target The location where the results should be stored. It can take 3
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{"self":}{the results are stored back into \code{image} (faster but
Expand Down Expand Up @@ -989,7 +989,7 @@ border <- function(image, top, bottom = top, left = top, right = top,
#'
#' @param target The location where the results should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down Expand Up @@ -1118,7 +1118,7 @@ ones <- function(nrow, ncol, nchan = 3, bitdepth = "8U", colorspace = "BGR") {
#'
#' @param target The location where the results should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down
2 changes: 1 addition & 1 deletion R/QueueClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#'
#' @param overflow A character string indicating what the \code{\link{Queue}}
#' object should do when it is full. Three methods are available:
#' \itemize{
#' \describe{
#' \item{"pause": }{the queue will stop retrieving and storing new frames
#' until a frame is read by the user.}
#' \item{"replace": }{the oldest frame in the queue is discarded to make space
Expand Down
4 changes: 2 additions & 2 deletions R/Rvision-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#' \tabular{ll}{
#' Package: \tab Rvision\cr
#' Type: \tab Package\cr
#' Version: \tab 0.1.0\cr
#' Date: \tab 2016-07-06\cr
#' Version: \tab 0.8.0\cr
#' Date: \tab 2024-01-31\cr
#' License: \tab GPL-3\cr
#' }
#'
Expand Down
4 changes: 2 additions & 2 deletions R/StreamClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' streams.
#'
#' @param ... Either:
#' \itemize{
#' \describe{
#' \item{index: }{An integer value corresponding to the index of the camera
#' to read a stream from (default: 0; 0 is usually the default webcam on
#' most computers). Or...}
Expand All @@ -49,7 +49,7 @@
#'
#' @note Hereafter is a list of all supported APIs. Note that not all APIs will
#' be available on your computer (actually most of them will not be).
#' \itemize{
#' \describe{
#' \item{"ANY": }{automatically select an API.}
#' \item{"VFW": }{Video For Windows.}
#' \item{"V4L", "V4L2": }{Video For Linux.}
Expand Down
2 changes: 1 addition & 1 deletion R/VideoClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#'
#' @note Hereafter is a list of all supported APIs. Note that not all APIs will
#' be available on your computer (actually most of them will not be).
#' \itemize{
#' \describe{
#' \item{"ANY": }{automatically select an API.}
#' \item{"VFW": }{Video For Windows.}
#' \item{"V4L", "V4L2": }{Video For Linux.}
Expand Down
2 changes: 1 addition & 1 deletion R/VideoStackClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ setClass("VideoStack",
#'
#' @note Hereafter is a list of all supported APIs. Note that not all APIs will
#' be available on your computer (actually most of them will not be).
#' \itemize{
#' \describe{
#' \item{"ANY": }{automatically select an API.}
#' \item{"VFW": }{Video For Windows.}
#' \item{"V4L", "V4L2": }{Video For Linux.}
Expand Down
2 changes: 1 addition & 1 deletion R/VideoWriterClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#'
#' @note Hereafter is a list of all supported APIs. Note that not all APIs will
#' be available on your computer (actually most of them will not be).
#' \itemize{
#' \describe{
#' \item{"ANY": }{automatically select an API.}
#' \item{"VFW": }{Video For Windows.}
#' \item{"V4L", "V4L2": }{Video For Linux.}
Expand Down
14 changes: 7 additions & 7 deletions R/arithmetic.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#'
#' @param target The location where the results should be stored. It can take 3
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{"self":}{the results are stored back into \code{e1} if it is an
Expand Down Expand Up @@ -122,7 +122,7 @@ setGeneric("%i^%", function(e1, e2) { standardGeneric("%i^%") })
#'
#' @param target The location where the results should be stored. It can take 3
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{"self":}{the results are stored back into \code{e1} (faster but
Expand Down Expand Up @@ -185,7 +185,7 @@ addWeighted <- function(e1, e2, weight = c(0.5, 0.5), target = "new") {
#'
#' @param magnitude The location where the magnitude should be stored. It can
#' take 2 values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand All @@ -196,7 +196,7 @@ addWeighted <- function(e1, e2, weight = c(0.5, 0.5), target = "new") {
#'
#' @param angle The location where the angle should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down Expand Up @@ -281,7 +281,7 @@ cartToPolar <- function(x, y, magnitude = "new", angle = "new", degree = FALSE)
#'
#' @param x The location where the x coordinates should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand All @@ -292,7 +292,7 @@ cartToPolar <- function(x, y, magnitude = "new", angle = "new", degree = FALSE)
#'
#' @param y The location where the y coordinates should be stored. It can take 2
#' values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{An \code{\link{Image}} object:}{the results are stored in another
Expand Down Expand Up @@ -378,7 +378,7 @@ polarToCart <- function(magnitude, angle, x = "new", y = "new", degree = FALSE)
#'
#' @param target The location where the results should be stored when passing a
#' sum of images to the function. It can take 3 values:
#' \itemize{
#' \describe{
#' \item{"new":}{a new \code{\link{Image}} object is created and the results
#' are stored inside (the default).}
#' \item{"self":}{the results are stored back into \code{x} (faster but
Expand Down
2 changes: 1 addition & 1 deletion R/blob.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
#' discarded. (default: Inf).
#'
#' @return A data frame of class \code{blob} with the following columns:
#' \itemize{
#' \describe{
#' \item{"id":}{a unique identifier for each blob in the image.}
#' \item{"x":}{the x coordinate of each blob in the image.}
#' \item{"y":}{the y coordinate of each blob in the image.}
Expand Down
Loading
Loading