openalpr / openalpr

Automatic License Plate Recognition library
http://www.openalpr.com
GNU Affero General Public License v3.0
11.05k stars 2.5k forks source link

Installation Error on Ubuntu #765

Open m22rdy opened 5 years ago

m22rdy commented 5 years ago

When installing on Ubuntu I get the following message and cannot get it to compile:

In member function ‘alpr::AlprFullDetails alpr::AlprImpl::recognizeFullDetails(cv::Mat, std::vector<cv::Rect_ >)’: /home/exell/openalpr/src/openalpr/alpr_impl.cpp:118:31: error: ‘CV_BGR2GRAY’ was not declared in this scope cvtColor( img, grayImg, CV_BGR2GRAY ); ^~~ openalpr/CMakeFiles/openalpr.dir/build.make:86: recipe for target 'openalpr/CMakeFiles/openalpr.dir/alpr_impl.cpp.o' failed make[2]: [openalpr/CMakeFiles/openalpr.dir/alpr_impl.cpp.o] Error 1 CMakeFiles/Makefile2:623: recipe for target 'openalpr/CMakeFiles/openalpr.dir/all' failed make[1]: [openalpr/CMakeFiles/openalpr.dir/all] Error 2 Makefile:151: recipe for target 'all' failed make: *** [all] Error 2

PetarMG-BG commented 5 years ago

You are using OpenCV version 4. ALPR works only on versions before 4 :) Remove this, and install version 3.5

dhcmega commented 2 years ago

hi, any hint on how to install opencv 3 on ubuntu 20? thanks!