chriswolfvision / local_adaptive_binarization

Local adaptive image binarization
125 stars 25 forks source link

Compiling #1

Closed jmokoistinen closed 5 years ago

jmokoistinen commented 6 years ago

Seems I cannot compile it on Ubuntu 16.04 linux, which Opencv version did you use?

make g++ -I/usr/include/opencv binarizewolfjolion.cpp -o binarizewolfjolion pkg-config opencv --libs-lstdc++ binarizewolfjolion.cpp:1:24: error: ‘Mat’ was not declared in this scope double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:29: error: ‘im’ was not declared in this scope double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:33: error: ‘Mat’ was not declared in this scope double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:38: error: ‘map_m’ was not declared in this scope double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:45: error: ‘Mat’ was not declared in this scope double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:50: error: ‘map_s’ was not declared in this scope double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:57: error: expected primary-expression before ‘int’ double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:67: error: expected primary-expression before ‘int’ double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:75: error: expression list treated as compound expression in initializer [-fpermissive] double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ binarizewolfjolion.cpp:1:77: error: expected ‘,’ or ‘;’ before ‘{’ token double calcLocalStats (Mat &im, Mat &map_m, Mat &map_s, int winx, int winy) {
^ Makefile:4: recipe for target 'all' failed make: *** [all] Error 1

beardeer commented 6 years ago

Same problem here, I have OpenCV 2.4.9, should we use OpenCV 3? Please help, thanks!

beardeer commented 6 years ago

Fixed, version 4bd25b106c87b6b1a449127873c568c50e691887 works.

ceztko commented 5 years ago

@beardeer It's not fixed at all! 4bd25b1 is a previous commit, meaning the most recent version, which should include improvements, was left broken.

chriswolfvision commented 5 years ago

Hi guys,

I am sorry, I didn't have time to maintain this for a long time, and apparently some commit terribly broke things. Actually, all functions where there, but the main() test function and some declarations were missing.

I added the files, updated the Makefile for ubuntu 18 and tested it. It works.

Christian

beardeer commented 5 years ago

Hi @chriswolfvision, thanks for your work! This project is awesome!!