We need to determine which white blobs are license plate characters. There are many white “blobs” in the binary image. Thresh = cv2.adaptiveThreshold(blurred, 255,Ĭv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY_INV, 45, 15)įigure 2. # to reveal the characters on the license plateīlurred = cv2.GaussianBlur(gray, (5, 5), 0) Then we apply Gaussian blurring and thresholding to reveal the characters on the license plate: # Apply Gaussian blurring and thresholding Gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Read the image and convert to grayscale # Construct the argument parser and parse the argumentsĪp.add_argument("-i", "-image", required=True, help="Path to the image")Īp.add_argument("-m", "-model", required=True, help="Path to the pre-trained model") Characters Segmentationįirst we read the image and convert it into grayscale: # Import the necessary packagesįrom import img_to_array The following code will use Python, OpenCV (a powerful library for image processing and computer vision), and Tensorflow. Let’s get started by doing characters segmentation for the license plate in Fig. The first stage is to segment the characters, and the second stage is to recognise those characters. In order to read the license plate it will take two stages. However in this post we will use a simpler approach. There are many methods for characters segmentation and recognition, including advanced and complex deep learning algorithms.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |