gishi523 / semi-global-matching

An implementation of Semi-Global Matching (SGM) on CPU with some optimizations
MIT License
63 stars 20 forks source link

errors in making #2

Open Micalson opened 5 years ago

Micalson commented 5 years ago

Hi, Thank you for your codes about sgm optimization. I got the following errors while making your codes. "MC" : Undeclared identifier "alignas": cannot find identifier My environment is visual studio 2013, opencv3.0.0, and I configured the sse4.1 by including the header "smmintrin.h". In IDE, I could get the location of the error. See below. default ( in file semi_global_matching.cpp)

Regards

gishi523 commented 5 years ago

Hi, @Micalson

Thank you for your information.

The alignas specifier is supported from C++11. Visual Studio 2013 doesn't fully support C++11, so it doesn't work. If you want to use VS2013, try using __declspec(align(16)).

__declspec(align(16)) uchar MC[16];

Regards, Gishi

Micalson commented 5 years ago

Hi, @gishi523 Thank you for your reply. I changed the file according to what you said, but the console showed same errors. So, could you tell me what your testing environment was?

Regards, Micalson

gishi523 commented 5 years ago

Hi, @Micalson My testing environment are VS2015,VS2017, and Xubuntu 16.04.

Micalson commented 5 years ago

Hi, @gishi523 I have tested it successfully in ubuntu 16.04, and it is really fast. But I think you should try MI cost in the matching period, and you may get the better disparity.

Regards

gishi523 commented 5 years ago

Hi, @Micalson

I'm glad that you could test it successfully.

But I think you should try MI cost in the matching period, and you may get the better disparity.

Thank you for your advice. I'm also interested in MI as matching cost. Whereas, in this paper, the author says that

In general, Census is slightly inferior to MI, if there are only global radiometric differences, but it is much better for local radiometric changes, which are present in many real-world applications.

So, census may suffice as matching cost in general case.

Regards