diff --git a/DESCRIPTION b/DESCRIPTION index b06a7b9..696fe40 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: ROpenCVLite Type: Package Title: Helper Package for Installing OpenCV with R -Version: 4.70.0 -Date: 2022-12-28 +Version: 4.80.0 +Date: 2023-07-20 Authors@R: c( person("Simon", "Garnier", email = "garnier@njit.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-3886-3974")), @@ -21,8 +21,7 @@ Imports: pkgbuild, parallel SystemRequirements: - cmake, - C++11 + cmake RoxygenNote: 7.2.3 Biarch: true Encoding: UTF-8 diff --git a/NEWS.md b/NEWS.md index 3d9dc06..f3616ef 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,15 @@ +# ROpenCVLite 4.80.0 + +## New features + +* Upgrade package to OpenCV 4.8.0. + +## Minor improvements and fixes + +* N/A. + +--- + # ROpenCVLite 4.70.0 ## New features diff --git a/R/opencv.R b/R/opencv.R index ea15bd0..324a46c 100644 --- a/R/opencv.R +++ b/R/opencv.R @@ -181,21 +181,21 @@ installOpenCV <- function(path = defaultOpenCVPath(), batch = FALSE) { } } - Sys.setenv(CXX_STD = "CXX11") + # Sys.setenv(CXX_STD = "CXX11") if (.Platform$OS.type == "windows") { dir.create(path, showWarnings = FALSE) tmpDir <- gsub("\\\\", "/", base::tempdir()) dir.create(tmpDir, showWarnings = FALSE) - utils::download.file("https://github.com/opencv/opencv/archive/4.7.0.tar.gz", - paste0(tmpDir, "/opencv-4.7.0.tar.gz")) - utils::untar(paste0(tmpDir, "/opencv-4.7.0.tar.gz"), + utils::download.file("https://github.com/opencv/opencv/archive/4.8.0.tar.gz", + paste0(tmpDir, "/opencv-4.8.0.tar.gz")) + utils::untar(paste0(tmpDir, "/opencv-4.8.0.tar.gz"), exdir = tmpDir) - utils::download.file("https://github.com/opencv/opencv_contrib/archive/4.7.0.tar.gz", - paste0(tmpDir, "/opencv_contrib-4.7.0.tar.gz")) - utils::untar(paste0(tmpDir, "/opencv_contrib-4.7.0.tar.gz"), + utils::download.file("https://github.com/opencv/opencv_contrib/archive/4.8.0.tar.gz", + paste0(tmpDir, "/opencv_contrib-4.8.0.tar.gz")) + utils::untar(paste0(tmpDir, "/opencv_contrib-4.8.0.tar.gz"), exdir = tmpDir) arch <- c("64", "32") @@ -214,8 +214,8 @@ installOpenCV <- function(path = defaultOpenCVPath(), batch = FALSE) { for (i in 1:2) { if (archAvail[i] == TRUE) { - sourceDir <- paste0(tmpDir, "/opencv-4.7.0/") - contribDir <- paste0(tmpDir, "/opencv_contrib-4.7.0/modules") + sourceDir <- paste0(tmpDir, "/opencv-4.8.0/") + contribDir <- paste0(tmpDir, "/opencv_contrib-4.8.0/modules") buildDir <- paste0(sourceDir, "build", arch[i]) dir.create(buildDir, showWarnings = FALSE) openCVArch <- if (arch[i] == 64) "x64" else "x86" @@ -227,7 +227,7 @@ installOpenCV <- function(path = defaultOpenCVPath(), batch = FALSE) { gpp_path <- paste0(rtools4Path, "/x86_64-w64-mingw32.static.posix", "/bin/g++.exe") windres_path <- paste0(rtools4Path, "/x86_64-w64-mingw32.static.posix", "/bin/windres.exe") make_path <- paste0(rtools4Path, "/usr/bin/make.exe") - system(paste0('cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=', gcc_path, ' -DCMAKE_CXX_COMPILER=', gpp_path, ' -DCMAKE_RC_COMPILER=', windres_path, ' -DCMAKE_MAKE_PROGRAM=', make_path, ' -DENABLE_PRECOMPILED_HEADERS=OFF -DOpenCV_ARCH=', openCVArch, ' -DOpenCV_RUNTIME=mingw -DENABLE_CXX11=ON -DBUILD_ZLIB=ON -DOPENCV_EXTRA_MODULES_PATH=', contribDir, ' -DBUILD_LIST=calib3d,core,dnn,features2d,flann,gapi,highgui,imgcodecs,imgproc,ml,objdetect,photo,stitching,video,videoio,ximgproc -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DWITH_OPENMP=ON -DWITH_TBB=ON -DWITH_FFMPEG=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENCLAMDFFT=ON -DWITH_OPENCLAMDBLAS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_DSHOW=ON -DBUILD_PROTOBUF=ON -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=', path, ' -B', buildDir, ' -H', sourceDir)) + system(paste0('cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=', gcc_path, ' -DCMAKE_CXX_COMPILER=', gpp_path, ' -DCMAKE_RC_COMPILER=', windres_path, ' -DCMAKE_MAKE_PROGRAM=', make_path, ' -DENABLE_PRECOMPILED_HEADERS=OFF -DOpenCV_ARCH=', openCVArch, ' -DOpenCV_RUNTIME=mingw -DBUILD_ZLIB=ON -DOPENCV_EXTRA_MODULES_PATH=', contribDir, ' -DBUILD_LIST=calib3d,core,dnn,features2d,flann,gapi,highgui,imgcodecs,imgproc,ml,objdetect,photo,stitching,video,videoio,ximgproc -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DWITH_OPENMP=ON -DWITH_TBB=ON -DWITH_FFMPEG=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENCLAMDFFT=ON -DWITH_OPENCLAMDBLAS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_DSHOW=ON -DBUILD_PROTOBUF=ON -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=', path, ' -B', buildDir, ' -H', sourceDir)) system(paste0(make_path, " -j", parallel::detectCores(), " -C ", buildDir)) system(paste0(make_path, " -C", buildDir, " install")) } else { @@ -238,7 +238,7 @@ installOpenCV <- function(path = defaultOpenCVPath(), batch = FALSE) { gpp_path <- paste0(rtools4Path, "/mingw", arch[i], "/bin/g++.exe") windres_path <- paste0(rtools4Path, "/mingw", arch[i], "/bin/windres.exe") make_path <- paste0(rtools4Path, "/usr/bin/make.exe") - system(paste0('cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=', gcc_path, ' -DCMAKE_CXX_COMPILER=', gpp_path, ' -DCMAKE_RC_COMPILER=', windres_path, ' -DCMAKE_MAKE_PROGRAM=', make_path, ' -DENABLE_PRECOMPILED_HEADERS=OFF -DOpenCV_ARCH=', openCVArch, ' -DOpenCV_RUNTIME=mingw -DENABLE_CXX11=ON -DBUILD_ZLIB=ON -DOPENCV_EXTRA_MODULES_PATH=', contribDir, ' -DBUILD_LIST=calib3d,core,dnn,features2d,flann,gapi,highgui,imgcodecs,imgproc,ml,objdetect,photo,stitching,video,videoio,ximgproc -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DWITH_OPENMP=ON -DWITH_TBB=ON -DWITH_FFMPEG=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENCLAMDFFT=ON -DWITH_OPENCLAMDBLAS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_DSHOW=ON -DBUILD_PROTOBUF=OFF -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=', path, ' -B', buildDir, ' -H', sourceDir)) + system(paste0('cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=', gcc_path, ' -DCMAKE_CXX_COMPILER=', gpp_path, ' -DCMAKE_RC_COMPILER=', windres_path, ' -DCMAKE_MAKE_PROGRAM=', make_path, ' -DENABLE_PRECOMPILED_HEADERS=OFF -DOpenCV_ARCH=', openCVArch, ' -DOpenCV_RUNTIME=mingw -DBUILD_ZLIB=ON -DOPENCV_EXTRA_MODULES_PATH=', contribDir, ' -DBUILD_LIST=calib3d,core,dnn,features2d,flann,gapi,highgui,imgcodecs,imgproc,ml,objdetect,photo,stitching,video,videoio,ximgproc -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DWITH_OPENMP=ON -DWITH_TBB=ON -DWITH_FFMPEG=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENCLAMDFFT=ON -DWITH_OPENCLAMDBLAS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_DSHOW=ON -DBUILD_PROTOBUF=OFF -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=', path, ' -B', buildDir, ' -H', sourceDir)) system(paste0(make_path, " -j", parallel::detectCores(), " -C ", buildDir)) system(paste0(make_path, " -C", buildDir, " install")) } @@ -247,7 +247,7 @@ installOpenCV <- function(path = defaultOpenCVPath(), batch = FALSE) { gpp_path <- paste0(rtoolsPath, "/mingw_", arch[i], "/bin/g++.exe") windres_path <- paste0(rtoolsPath, "/mingw_", arch[i], "/bin/windres.exe") make_path <- paste0(rtoolsPath, "/mingw_", arch[i], "/bin/mingw32-make.exe") - system(paste0('cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=', gcc_path, ' -DCMAKE_CXX_COMPILER=', gpp_path, ' -DCMAKE_RC_COMPILER=', windres_path, ' -DCMAKE_MAKE_PROGRAM=', make_path, ' -DENABLE_PRECOMPILED_HEADERS=OFF -DOpenCV_ARCH=', openCVArch, ' -DOpenCV_RUNTIME=mingw -DENABLE_CXX11=ON -DBUILD_ZLIB=ON -DOPENCV_EXTRA_MODULES_PATH=', contribDir, ' -DBUILD_LIST=calib3d,core,dnn,features2d,flann,highgui,imgcodecs,imgproc,ml,objdetect,photo,stitching,video,videoio,ximgproc -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DWITH_OPENMP=ON -DWITH_TBB=ON -DWITH_FFMPEG=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENCLAMDFFT=ON -DWITH_OPENCLAMDBLAS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_DSHOW=ON -DBUILD_PROTOBUF=OFF -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=', path, ' -B', buildDir, ' -H', sourceDir)) + system(paste0('cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER=', gcc_path, ' -DCMAKE_CXX_COMPILER=', gpp_path, ' -DCMAKE_RC_COMPILER=', windres_path, ' -DCMAKE_MAKE_PROGRAM=', make_path, ' -DENABLE_PRECOMPILED_HEADERS=OFF -DOpenCV_ARCH=', openCVArch, ' -DOpenCV_RUNTIME=mingw -DBUILD_ZLIB=ON -DOPENCV_EXTRA_MODULES_PATH=', contribDir, ' -DBUILD_LIST=calib3d,core,dnn,features2d,flann,highgui,imgcodecs,imgproc,ml,objdetect,photo,stitching,video,videoio,ximgproc -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DWITH_OPENMP=ON -DWITH_TBB=ON -DWITH_FFMPEG=ON -DWITH_OPENCL=ON -DWITH_EIGEN=ON -DWITH_OPENCLAMDFFT=ON -DWITH_OPENCLAMDBLAS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DWITH_DSHOW=ON -DBUILD_PROTOBUF=OFF -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=', path, ' -B', buildDir, ' -H', sourceDir)) system(paste0(make_path, " -j", parallel::detectCores(), " -C ", buildDir)) system(paste0(make_path, " -C", buildDir, " install")) } @@ -259,22 +259,22 @@ installOpenCV <- function(path = defaultOpenCVPath(), batch = FALSE) { tmpDir <- base::tempdir() dir.create(tmpDir, showWarnings = FALSE) - utils::download.file("https://github.com/opencv/opencv/archive/4.7.0.zip", - paste0(tmpDir, "/opencv-4.7.0.zip")) - utils::unzip(paste0(tmpDir, "/opencv-4.7.0.zip"), + utils::download.file("https://github.com/opencv/opencv/archive/4.8.0.zip", + paste0(tmpDir, "/opencv-4.8.0.zip")) + utils::unzip(paste0(tmpDir, "/opencv-4.8.0.zip"), exdir = tmpDir) - utils::download.file("https://github.com/opencv/opencv_contrib/archive/4.7.0.zip", - paste0(tmpDir, "/opencv_contrib-4.7.0.zip")) - utils::unzip(paste0(tmpDir, "/opencv_contrib-4.7.0.zip"), + utils::download.file("https://github.com/opencv/opencv_contrib/archive/4.8.0.zip", + paste0(tmpDir, "/opencv_contrib-4.8.0.zip")) + utils::unzip(paste0(tmpDir, "/opencv_contrib-4.8.0.zip"), exdir = tmpDir) - file.copy(paste0(pkgPath, "/OpenCVModule.4.7.0.cmake"), - paste0(tmpDir, "/opencv-4.7.0/cmake/OpenCVModule.cmake"), + file.copy(paste0(pkgPath, "/OpenCVModule.4.8.0.cmake"), + paste0(tmpDir, "/opencv-4.8.0/cmake/OpenCVModule.cmake"), overwrite = TRUE) - sourceDir <- paste0(tmpDir, "/opencv-4.7.0/") - contribDir <- paste0(tmpDir, "/opencv_contrib-4.7.0/modules") + sourceDir <- paste0(tmpDir, "/opencv-4.8.0/") + contribDir <- paste0(tmpDir, "/opencv_contrib-4.8.0/modules") buildDir <- paste0(sourceDir, "build") dir.create(buildDir, showWarnings = FALSE) diff --git a/cran-comments.md b/cran-comments.md index 7408c68..f3cf578 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,8 +1,8 @@ ## Test environments -* local M1 OS X 13.1, R 4.2.2 -* local Windows 10, R 4.2.2 -* local Ubuntu 22.04, R 4.2.2 +* local M1 OS X 13.4.1, R 4.3.1 +* local Windows 10, R 4.3.1 +* local Ubuntu 22.04, R 4.3.1 * Github Actions "windows-latest (release)" * Github Actions "macOS-latest (release)" * Github Actions "ubuntu-latest (release)" diff --git a/docs/404.html b/docs/404.html index d95841a..93b79ed 100644 --- a/docs/404.html +++ b/docs/404.html @@ -31,7 +31,7 @@ ROpenCVLite - 4.70.0 + 4.80.0