License plate recognition using OpenCV

前端 未结 4 1947
暗喜
暗喜 2021-02-08 18:47

I have a project where I need to identify the license plate of a car using OpenCV.

I want to load an image of a number or a letter and let OpenCV identify it and print i

相关标签:
4条回答
  • 2021-02-08 19:08

    if you are looking to learn more about OpenCV generally, you a good place to start is with this book: Learning OpenCV by Bradksi et al.

    0 讨论(0)
  • 2021-02-08 19:14

    dunno what implementations are available in opencv, but a couple other libraries are:

    • JavaANPR

    • DTK ANPR

    0 讨论(0)
  • 2021-02-08 19:19

    I have recently been working on a simple implementation of ANPR in OpenCV python. You can check it out here

    It is written with the help of Shogun Machine Learning toolbox with the Image processing part in OpenCV. Do play with the variables as they need some tweaking for cars from different regions.

    0 讨论(0)
  • 2021-02-08 19:28

    You can use the color of the ROI to create the filter. This will work until the plate region and the vehicle has the same color.

    import cv2
    import numpy as np
    
    cap = cv2.VideoCapture(0)
    
    while(1):
        _, frame = cap.read()
        hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
    
        lower_red = np.array([30,150,50])
        upper_red = np.array([255,255,180])
    
        mask = cv2.inRange(hsv, lower_red, upper_red)
        res = cv2.bitwise_and(frame,frame, mask= mask)
    
        cv2.imshow('frame',frame)
        cv2.imshow('mask',mask)
        cv2.imshow('res',res)
    
        k = cv2.waitKey(5) & 0xFF
        if k == 27:
            break
    
    cv2.destroyAllWindows()
    cap.release()
    
    0 讨论(0)
提交回复
热议问题