From 187f3eeee18a5aba1da2c2cb49a0ad09f2f59c0e Mon Sep 17 00:00:00 2001 From: David Hirvonen Date: Sat, 27 Jan 2018 18:51:00 -0500 Subject: [PATCH] add mini cvsteer package A concise implementation of separable steerable filters via Freeman and Adelson, including second derivative of Gaussian and its Hilbert transform, implemented with the OpenCV C++ API --- cmake/configs/default.cmake | 1 + cmake/projects/cvsteer/hunter.cmake | 26 ++++++++++++++++++++++++++ docs/packages/pkg/cvsteer.rst | 18 ++++++++++++++++++ examples/cvsteer/CMakeLists.txt | 17 +++++++++++++++++ examples/cvsteer/foo.cpp | 6 ++++++ 5 files changed, 68 insertions(+) create mode 100644 cmake/projects/cvsteer/hunter.cmake create mode 100644 docs/packages/pkg/cvsteer.rst create mode 100644 examples/cvsteer/CMakeLists.txt create mode 100644 examples/cvsteer/foo.cpp diff --git a/cmake/configs/default.cmake b/cmake/configs/default.cmake index 3897af958f..9532a6d407 100644 --- a/cmake/configs/default.cmake +++ b/cmake/configs/default.cmake @@ -170,6 +170,7 @@ hunter_config(crashup VERSION 0.0.2) hunter_config(cryptopp VERSION 5.6.5-p0) hunter_config(cub VERSION 1.7.4-p0) hunter_config(cvmatio VERSION 1.0.28) +hunter_config(cvsteer VERSION 0.1.1) hunter_config(cxxopts VERSION 1.0.0-p0) hunter_config(czmq VERSION 4.0.2-p1) hunter_config(damageproto VERSION 1.2.1) diff --git a/cmake/projects/cvsteer/hunter.cmake b/cmake/projects/cvsteer/hunter.cmake new file mode 100644 index 0000000000..f10009d563 --- /dev/null +++ b/cmake/projects/cvsteer/hunter.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2016-2018, Ruslan Baratov +# Copyright (c) 2018, David Hirvonen +# All rights reserved. + +# !!! DO NOT PLACE HEADER GUARDS HERE !!! + +include(hunter_add_version) +include(hunter_cacheable) +include(hunter_cmake_args) +include(hunter_download) +include(hunter_pick_scheme) + +hunter_add_version( + PACKAGE_NAME + cvsteer + VERSION + 0.1.1 + URL + "https://github.com/headupinclouds/cvsteer/archive/v0.1.1.tar.gz" + SHA1 + b54b096910c0947e1af125e134b2511b25dc847d + ) + +hunter_pick_scheme(DEFAULT url_sha1_cmake) +hunter_cacheable(cvsteer) +hunter_download(PACKAGE_NAME cvsteer) diff --git a/docs/packages/pkg/cvsteer.rst b/docs/packages/pkg/cvsteer.rst new file mode 100644 index 0000000000..71c7eaa117 --- /dev/null +++ b/docs/packages/pkg/cvsteer.rst @@ -0,0 +1,18 @@ +.. spelling:: + + cvsteer + +.. index:: computer-vision ; cvsteer + +.. _pkg.cvsteer: + +cvsteer +======= + +- `Official `__ +- `Example `__ + +.. literalinclude:: /../examples/cvsteer/CMakeLists.txt + :language: cmake + :start-after: # DOCUMENTATION_START { + :end-before: # DOCUMENTATION_END } diff --git a/examples/cvsteer/CMakeLists.txt b/examples/cvsteer/CMakeLists.txt new file mode 100644 index 0000000000..8b518ba128 --- /dev/null +++ b/examples/cvsteer/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright (c) 2016-2018, Ruslan Baratov +# Copyright (c) 2018, David Hirvonen +# All rights reserved. + +cmake_minimum_required(VERSION 3.0) + +# Emulate HunterGate: +# * https://github.com/hunter-packages/gate +include("../common.cmake") + +project(download-cvsteer) + +hunter_add_package(cvsteer) +find_package(cvsteer CONFIG REQUIRED) + +add_executable(foo foo.cpp) +target_link_libraries(foo cvsteer::cvsteer) diff --git a/examples/cvsteer/foo.cpp b/examples/cvsteer/foo.cpp new file mode 100644 index 0000000000..ca34cb6680 --- /dev/null +++ b/examples/cvsteer/foo.cpp @@ -0,0 +1,6 @@ +#include + +int main() { + cv::Mat1f image = cv::Mat1f::zeros(128, 128); + fa::SteerableFiltersG2 filters(image, 4, 0.67f); +}