Giter Site home page Giter Site logo

image-align's Issues

Compilation error please help me

error: call of overloaded ‘goodFeaturesToTrack(cv::Mat&, std::vector<cv::Point >&, const int&, double, int, cv::Mat, int, int, double)’ is ambiguous_
205 | cv::goodFeaturesToTrack(gray, points[1], MAX_FEATURES, 0.01, 10, cv::Mat(), 3, 0, 0.04);
| ^
In file included from /data/notebook/ZZR/lib/opencv/include/opencv2/imgproc/imgproc.hpp:48,
from /data/notebook/ZZR/code/image-align/inc/imagealign/image_pyramid.h:29,
from /data/notebook/ZZR/code/image-align/inc/imagealign/align_base.h:25,
from /data/notebook/ZZR/code/image-align/inc/imagealign/forward_additive.h:23,
from /data/notebook/ZZR/code/image-align/inc/imagealign/imagealign.h:24,
from /data/notebook/ZZR/code/image-align/examples/optical_flow.cpp:20:
/data/notebook/ZZR/lib/opencv/include/opencv2/imgproc.hpp:1959:19: note: candidate: ‘void cv::goodFeaturesToTrack(cv::InputArray, cv::OutputArray, int, double, double, cv::InputArray, int, bool, double)’
1959 | CV_EXPORTS_W void goodFeaturesToTrack( InputArray image, OutputArray corners,
| ^~~~~~~~~~~~~~~~~~~
/data/notebook/ZZR/lib/opencv/include/opencv2/imgproc.hpp:1964:19: note: candidate: ‘void cv::goodFeaturesToTrack(cv::InputArray, cv::OutputArray, int, double, double, cv::InputArray, int, int, bool, double)’
1964 | CV_EXPORTS_W void goodFeaturesToTrack( InputArray image, OutputArray corners,
| ^~~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/example_optflow.dir/build.make:76: CMakeFiles/example_optflow.dir/examples/optical_flow.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/example_optflow.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

build fails on ubuntu 16.04

Thank you for the library, it looks fine.

Build with gcc fails on Ubuntu 16.04. Namely, this is the error:

/home/alexander/soft/image-align/image-align/tests/algorithms.cpp:217:12: error: specialization of ‘template<int W, class Scalar> struct imagealign::WarpTraits’ in different namespace [-fpermissive]
struct ia::WarpTraits<WARP_TRANSLATION_DYAMIC, Scalar> : ia::WarpTraitsForRunTimeKnownParameterCount<WARP_TRANSLATION_DYAMIC, Scalar> {};
^
In file included from /home/alexander/soft/image-align/image-align/inc/imagealign/align_base.h:23:0,
from /home/alexander/soft/image-align/image-align/inc/imagealign/forward_additive.h:23,
from /home/alexander/soft/image-align/image-align/tests/algorithms.cpp:22:
/home/alexander/soft/image-align/image-align/inc/imagealign/warp.h:74:12: error: from definition of ‘template<int W, class Scalar> struct imagealign::WarpTraits’ [-fpermissive]
struct WarpTraits {
^
/home/alexander/soft/image-align/image-align/tests/algorithms.cpp:220:11: error: specialization of ‘template<int WarpMode, class Scalar> class imagealign::Warp’ in different namespace [-fpermissive]
class ia::Warp<WARP_TRANSLATION_DYAMIC, Scalar> {
^
In file included from /home/alexander/soft/image-align/image-align/inc/imagealign/align_base.h:23:0,
from /home/alexander/soft/image-align/image-align/inc/imagealign/forward_additive.h:23,
from /home/alexander/soft/image-align/image-align/tests/algorithms.cpp:22:
/home/alexander/soft/image-align/image-align/inc/imagealign/warp.h:232:11: error: from definition of ‘template<int WarpMode, class Scalar> class imagealign::Warp’ [-fpermissive]
class Warp {
^
CMakeFiles/tests.dir/build.make:110: recipe for target 'CMakeFiles/tests.dir/tests/algorithms.cpp.o' failed
make[2]: *** [CMakeFiles/tests.dir/tests/algorithms.cpp.o] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/tests.dir/all' failed
make[1]: *** [CMakeFiles/tests.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Inclusion of the lines 214-357 of algorithms.cpp into namespace imagealign solves the issue.

Build Error By CMake

I have a problem when I build this project using cmake. It shows that I need to have a OpenCVConfig.cmake file to point. But where is the suitable OpenCVConfig.cmake file? Could anyone help me? thanks!

How to use affine warp?

Hello,

Thank you for making your implementation available. The code is very well-written!

In the Readme it is stated that the library supports 2D Affine Warp. Could you please provide a usage example for that? It seems that this warp cannot be used in the same way as the other ones.

Thank you very much in advance for your response!

Best regards.

Documents/L-K/image-align/tests/catch.hpp:875:17: error: ‘nullptr_t’ in namespace ‘std’ does not name a type

hello,my environment is:
(1)ubuntu 16.04
(2)gcc 5.4
(3)opencv3.4
when i input the command "make",the output is as follows:
In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:875:17: error: ‘nullptr_t’ in namespace ‘std’ does not name a type inline std::nullptr_t opCast(std::nullptr_t) { return nullptr; } ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:58: error: ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare’ conflicts with a previous declaration template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:990:44: note: previous declaration ‘namespace Catch::Internal { }::compare’ template<Operator Op, typename T> bool compare( T* lhs, int rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:53: error: ‘nullptr_t’ is not a member of ‘std’ template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:70: error: expected primary-expression before ‘*’ token template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:72: error: ‘rhs’ was not declared in this scope template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:76: error: expression list treated as compound expression in initializer [-fpermissive] template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:996:78: error: expected ‘;’ before ‘{’ token template<Operator Op, typename T> bool compare( std::nullptr_t, T* rhs ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:999:66: error: ‘std::nullptr_t’ has not been declared template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:999:44: error: redefinition of ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare(T*, int)’ template<Operator Op, typename T> bool compare( T* lhs, std::nullptr_t ) { ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:990:44: note: ‘template<Catch::Internal::Operator Op, class T> bool Catch::Internal::compare(T*, int)’ previously declared here template<Operator Op, typename T> bool compare( T* lhs, int rhs ) { ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1099:38: error: ‘std::__cxx11::string Catch::toString’ redeclared as different kind of symbol std::string toString( std::nullptr_t ); ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1096:13: note: previous declaration ‘std::__cxx11::string Catch::toString(unsigned char)’ std::string toString( unsigned char value ); ^ /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1099:23: error: ‘nullptr_t’ is not a member of ‘std’ std::string toString( std::nullptr_t ); ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:7351:38: error: ‘std::__cxx11::string Catch::toString’ redeclared as different kind of symbol std::string toString( std::nullptr_t ) { ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:1222:13: note: previous declaration ‘template<class T, class Allocator> std::__cxx11::string Catch::toString(const std::vector<_Tp, _Alloc>&)’ std::string toString( std::vector<T,Allocator> const& v ) { ^ In file included from /home/moonx/Documents/L-K/image-align/tests/warp.cpp:21:0: /home/moonx/Documents/L-K/image-align/tests/catch.hpp:7351:23: error: ‘nullptr_t’ is not a member of ‘std’ std::string toString( std::nullptr_t ) { ^ CMakeFiles/tests.dir/build.make:62: recipe for target 'CMakeFiles/tests.dir/tests/warp.cpp.o' failed make[2]: *** [CMakeFiles/tests.dir/tests/warp.cpp.o] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/tests.dir/all' failed make[1]: *** [CMakeFiles/tests.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
can you give me a hand about this problem?thank you very much!

How to align this two image

I have dig your project some times. I can use your code by Cmake method and no building method both. But it give a bad result for me. Maybe this is a disturb issues but I hope to get you help still if you are available. And it very very similar your this project

If I have a such empty paper, then I write some text on it,then I deform it in Photoshop. So I get such result. Now hope this result image align that empty paper. I mean this is my expected. Actually I can do it almost by other language. I just not very familiar the OpenCV. This is my try by Mathematica

Before Align

After Align

But I have to implement it by c++ and OpenCV now. Could you give me a hand?

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.