undefined reference to `guidedFilter(cv::Mat const&, cv::Mat >>const&, int, double, int)'
opened this issue · comments
Hello,
I am interested in testing your code given the speed you claim. However, I get an error.
i run your code this way:
g++ globalmatting.cpp -o globalmatting
pkg-config --cflags --libs opencv`
But I get this error:
/tmp/ccsQc2Bz.o: In function
main': globalmatting.cpp:(.text+0x4010): undefined reference to
guidedFilter(cv::Mat const&, cv::Mat >>const&, int, double, int)'
collect2: error: ld returned 1 exit status
How to fix this ?
Thank you in advance.
Begueradj.
You can get the guidedFilter implementation from https://github.com/atilimcetin/guided-filter
@atilimcetin Thank you for your answer, but I really downloaded guidefilter.h and included it in the main program as you showed on the example.
I just noticed you definied guidedFilter(cv::Mat const&, cv::Mat >>const&, int, double, int)
with 5 parameters whereas you called it with 4 parameters only in your example. I added -1 in your example (as a parameter to that function) but still getting the same error
Did you also download guidedfilter.cpp and include in your project?
@atilimcetin No, I did not. I thought only guiderfiler.h is needed. I will do what you ask me here and let you know. Thank you very much (In reality I want to study your code carefully and translate it to Python)
@atilimcetin Yes, you are totally right, I included the guidedfilter.cpp file and everything is ok. It is amazing how you precisely segmented the picture !!!! Thank you very much for your great project, without it I could not fully and really understand the original paper. Great job you did, Sir. Million thanks.
I'm very glad :)