0

Hi I am trying to setup OpenCV Licence Plate Detection System on Ubuntu 16.

I used this for OpenCV installation sudo apt-get install libopencv-dev python-opencv

When I am trying to run the script with python I am getting this

libdc1394 error: Failed to initialize libdc1394
Traceback (most recent call last):
  File "Main.py", line 7, in <module>
    import DetectChars
  File "/home/tushar/OpenCV_3_License_Plate_Recognition_Python-master/DetectChars.py", line 14, in <module>
    kNearest = cv2.ml.KNearest_create()
AttributeError: 'module' object has no attribute 'ml'

The same Script is working fine on windows installation of OpenCV and Python2.

I am using This Repository

Please Help me with this Thanks in Advance.

2 Answers 2

1

I suggest you to install Anaconda: https://www.continuum.io/downloads And install opencv3: conda install scikit-image opencv

Sign up to request clarification or add additional context in comments.

1 Comment

Hi Thanks for your reply. I am going to try this i will reach out to you if anything needed.
0

I guess you have installed OpenCV 2 instead of OpenCV 3 (ml does not exist in OpenCV version 2)

According to http://milq.github.io/install-opencv-ubuntu-debian/

sudo apt-get install libopencv-dev python-opencv

installs openCV from Ubuntu repository and may not install the latest openCV.

You can check you OpenCV version with

In [1]: import cv2

In [2]: cv2.__version__

4 Comments

Hi Thanks for your reply OpenCV Version: $Rev: 4557 $
You should then follow OPTION 2 from the above tutorial because you seem to have a subversion of opencv 2.
Hi actually i have already tried option 2 but the result is still the same.
Did you remove correctly the previous installation ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.