local_adaptive_binarization icon indicating copy to clipboard operation
local_adaptive_binarization copied to clipboard

Working with opencv4

Open brossaip opened this issue 4 years ago • 1 comments

Hi!

I'm using your binarization implementation and it has worked well for me. Thanks a lot for your implementation. Unfortunately, it has stopped to work when I have updated opencv to release 4.

I have modified the makefile replacing the compiling command by: g++ binarizewolfjolion.cpp -o binarizewolfjolion 'pkg-config --libs --cflags opencv4' -lstdc++

In the code I have had to add #include <opencv2/imgcodecs.hpp> and to replaceMat input = imread(inputname,CV_LOAD_IMAGE_GRAYSCALE); by Mat input = imread(inputname,cv::ImreadModes::IMREAD_GRAYSCALE);

That's all.

I hope is useful for someone.

brossaip avatar Sep 28 '20 11:09 brossaip

very useful: I would like to add: you need some libraries installed (opencv and vtk, I think) or you get a ton of linker errors

nowakf avatar Jul 19 '21 10:07 nowakf