Giter VIP home page Giter VIP logo

Comments (1)

Rookfighter avatar Rookfighter commented on June 12, 2024

Hi @yochju,
thanks for your feedback. I'll get to the points individually

Regarding point 1.:
Thanks, I just fixed the examples in the README.md. As you already guessed those examples were outdated relicts. I still have not found a way to link code from the actual example source files (in examples/) into the README.md (so that they stay up to date). The examples in the examples/ directory should all work if your build system is correctly configured (they are built by the CI).

Regarding point 2.:
Your build system should pass the <path-to-repo>/include/ directory as include directory to the compiler, then all paths should be resolved automatically. In terms of CMake you would do something like

include_directories("<path-to-nvision-repo>/include/")

In any case regardless of your build system, there should be no need to adjust any include paths in the source code.
If you need any more assistance on this topic let me know.

Regarding point 3:
Not on on the short term, sorry. I actually wanted to implement some more advanced optical flow algorithms, but I just did not get the time and motivation to do so.
If you feel like, you can implement your linked one and file a Pull Request. Contributions are welcome, just stick to the code style and optionally (in the best case) provide some unit tests and / or examples.

Regarding point 4:
If you want something simple, you can do what all the filter implementations basically do (e.g. when you have a look at the central differences filter class):

  • you create the kernel you need (using Eigen), you can set the size (compile time) and coefficients to what you need
  • call nvision::image::correlate on your image with that kernel (see here)
  • pass a specific BorderHandling functor to correlate if you want something else than "reflect" (see here)

Example (no guarantee that it compiles):

// create kernel with custom size and coefficients
auto kernel = Eigen::Matrix<float, 5, 1>{};
kernel << -1, -1, 0, 1, 1;
// use constant border values with value 1
auto borderHandling = nvision::BorderConstant<float>{1};
// important image type should be explicit otherwise you will store a expression
nvision::Image<nvision::Grayf> resultImage =  nvision::image::correlate(image, kernel, borderHandling);

from nvision-cpp.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.