HsiehYiChia / Scene-text-recognition

Scene text detection and recognition based on Extremal Region(ER)
MIT License
165 stars 55 forks source link

error while making the scene text recognition #10

Closed vigneshgig closed 4 years ago

vigneshgig commented 4 years ago

os system: ubuntu 16.04 cmake version 3.5.1 opencv : 3.4

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609

make -j8 [ 9%] Building CXX object CMakeFiles/svm-train.dir/src/svm-train.cpp.o [ 18%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/adaboost.cpp.o [ 27%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/ER.cpp.o [ 36%] Building CXX object CMakeFiles/svm-train.dir/src/svm.cpp.o [ 54%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/main.cpp.o [ 63%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/SpellingCorrector.cpp.o [ 72%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/svm.cpp.o [ 54%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/OCR.cpp.o [ 81%] Building CXX object CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o [ 90%] Linking CXX executable svm-train [ 90%] Built target svm-train /home/giuser/Scene-text-recognition/src/utils.cpp: In function ‘void get_lbp_data()’: /home/giuser/Scene-text-recognition/src/utils.cpp:1416:24: warning: ISO C++ forbids converting a string constant to ‘char’ [-Wwrite-strings] char data_filename = "training/detection_training_data.txt"; ^ [100%] Linking CXX executable scene_text_recognition CMakeFiles/scene_text_recognition.dir/src/ER.cpp.o: In function ERFilter::er_tree_extract(cv::Mat)': ER.cpp:(.text+0x165d): undefined reference tocv::error(int, cv::String const&, char const, char const, int)' CMakeFiles/scene_text_recognition.dir/src/ER.cpp.o: In function cv::String::String(char const*)': ER.cpp:(.text._ZN2cv6StringC2EPKc[_ZN2cv6StringC5EPKc]+0x54): undefined reference tocv::String::allocate(unsigned long)' CMakeFiles/scene_text_recognition.dir/src/ER.cpp.o: In function cv::String::~String()': ER.cpp:(.text._ZN2cv6StringD2Ev[_ZN2cv6StringD5Ev]+0x14): undefined reference tocv::String::deallocate()' CMakeFiles/scene_text_recognition.dir/src/ER.cpp.o: In function cv::String::operator=(cv::String const&)': ER.cpp:(.text._ZN2cv6StringaSERKS0_[_ZN2cv6StringaSERKS0_]+0x28): undefined reference tocv::String::deallocate()' CMakeFiles/scene_text_recognition.dir/src/OCR.cpp.o: In function OCR::extract_feature(cv::Mat&, svm_node*)': OCR.cpp:(.text+0xce1): undefined reference tocv::findContours(cv::_InputOutputArray const&, cv::OutputArray const&, int, int, cv::Point)' OCR.cpp:(.text+0x10b8): undefined reference to cv::normalize(cv::_InputArray const&, cv::_InputOutputArray const&, double, double, int, int, cv::_InputArray const&)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionimage_mode(ERFilter, char)': utils.cpp:(.text+0x44e): undefined reference to cv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionvideomode(ERFilter, char)': utils.cpp:(.text+0x977): undefined reference to cv::VideoCapture::VideoCapture(cv::String const&)' utils.cpp:(.text+0xa99): undefined reference tocv::VideoWriter::fourcc(char, char, char, char)' utils.cpp:(.text+0xaed): undefined reference to `cv::VideoWriter::open(cv::String const&, int, double, cv::Size, bool)' utils.cpp:(.text+0xb32): undefined reference to cv::VideoWriter::fourcc(char, char, char, char)' utils.cpp:(.text+0xb86): undefined reference tocv::VideoWriter::open(cv::String const&, int, double, cv::Size_, bool)' utils.cpp:(.text+0x1800): undefined reference to cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionload_challenge2_test_file(cv::Mat&, int)': utils.cpp:(.text+0x23f8): undefined reference to cv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionload_challenge2_training_file(cv::Mat&, int)': utils.cpp:(.text+0x274b): undefined reference to cv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionshow_result(cv::Mat&, cv::Mat&, std::vector<Text, std::allocator >&, std::vector<double, std::allocator >, std::vector<ER, std::allocator<ER> >, std::vector<std::vector<ER, std::allocator<ER> >, std::allocator<std::vector<ER, std::allocator<ER> > > >, std::vector<std::vector<ER, std::allocator<ER> >, std::allocator<std::vector<ER, std::allocator<ER> > > >, std::vector<std::vector<ER, std::allocator<ER> >, std::allocator<std::vector<ER, std::allocator<ER> > > >, std::vector<std::vector<ER, std::allocator<ER> >, std::allocator<std::vector<ER, std::allocator<ER> > > >)': utils.cpp:(.text+0x3526): undefined reference to cv::getTextSize(cv::String const&, int, double, int, int*)' utils.cpp:(.text+0x372c): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' utils.cpp:(.text+0x3b2b): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x3ba5): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x3c1f): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x3c99): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x3d13): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o:utils.cpp:(.text+0x3d77): more undefined references tocv::imshow(cv::String const&, cv::_InputArray const&)' follow CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In function draw_FPS(cv::Mat&, double)': utils.cpp:(.text+0x41a1): undefined reference tocv::putText(cv::InputOutputArray const&, cv::String const&, cv::Point, int, double, cv::Scalar_, int, int, bool)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In function draw_linear_time_MSER(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': utils.cpp:(.text+0x425d): undefined reference tocv::imread(cv::String const&, int)' utils.cpp:(.text+0x42c5): undefined reference to cv::VideoWriter::fourcc(char, char, char, char)' utils.cpp:(.text+0x4319): undefined reference tocv::VideoWriter::open(cv::String const&, int, double, cv::Size_, bool)' utils.cpp:(.text+0x4ca3): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functiondraw_multiple_channel(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': utils.cpp:(.text+0x5707): undefined reference to cv::imread(cv::String const&, int)' utils.cpp:(.text+0x5aaf): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x5b23): undefined reference to cv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x5b97): undefined reference tocv::imshow(cv::String const&, cv::_InputArray const&)' utils.cpp:(.text+0x5c21): undefined reference to cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' utils.cpp:(.text+0x5cba): undefined reference tocv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator > const&)' utils.cpp:(.text+0x5d53): undefined reference to cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionoutput_MSER_time(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': utils.cpp:(.text+0x60c9): undefined reference to cv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionoutput_optimal_path(std::cxx11::basic_string<char, std::char_traits, std::allocator >)': utils.cpp:(.text+0x6763): undefined reference to cv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionload_gt(int)': utils.cpp:(.text+0x6cf3): undefined reference to cv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functioncalc_recall_rate()': utils.cpp:(.text+0x7b2e): undefined reference to cv::MSER::create(int, int, int, double, double, int, double, double, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionbootstrap()': utils.cpp:(.text+0xd10f): undefined reference to cv::imread(cv::String const&, int)' utils.cpp:(.text+0xd34d): undefined reference tocv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator > const&)' utils.cpp:(.text+0xd4c2): undefined reference to cv::imwrite(cv::String const&, cv::_InputArray const&, std::vector<int, std::allocator<int> > const&)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In functionget_lbp_data()': utils.cpp:(.text+0xd9df): undefined reference to cv::imread(cv::String const&, int)' utils.cpp:(.text+0xdc31): undefined reference tocv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In function get_ocr_data()': utils.cpp:(.text+0xee47): undefined reference tocv::imread(cv::String const&, int)' CMakeFiles/scene_text_recognition.dir/src/utils.cpp.o: In function `cv::String::String(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)': utils.cpp:(.text._ZN2cv6StringC2ERKNSt7cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN2cv6StringC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x5d): undefined reference to `cv::String::allocate(unsigned long)' collect2: error: ld returned 1 exit status CMakeFiles/scene_text_recognition.dir/build.make:268: recipe for target 'scene_text_recognition' failed make[2]: [scene_text_recognition] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/scene_text_recognition.dir/all' failed make[1]: [CMakeFiles/scene_text_recognition.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

can any help me out Thanks