element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Path II Programmable
  • Challenges & Projects
  • Design Challenges
  • Path II Programmable
  • More
  • Cancel
Path II Programmable
Blog Path II Programmable Project Report ( License Plate Recognition ): Finished
  • Blog
  • Forum
  • Documents
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: buffteethr
  • Date Created: 16 Jan 2020 9:29 PM Date Created
  • Views 256 views
  • Likes 4 likes
  • Comments 2 comments
  • winners
Related
Recommended

Path II Programmable Project Report ( License Plate Recognition ): Finished

buffteethr
buffteethr
16 Jan 2020

I would like to say I thoroughly enjoyed working on the Path II Programming training project. As someone who does FPGA design for a living with a different manufacturer it was refreshing learning the Ultrascale FPGA and Vivado tools from Xilinx. Initially, my project entailed entailed  developing a video streaming solution. I planed to use Petalinux for the development until I cam across a post from another participant post about PYNQ ( PYNQ - Python productivity for Zynq - Home ).

 

PYNQ is an open-source project from XilinxRegistered that makes it easy to design embedded systems with Xilinx ZynqRegistered Systems on Chips (SoCs).

Using the Python language and libraries, designers can exploit the benefits of programmable logic and microprocessors in Zynq to build more capable and exciting embedded systems.

PYNQ users can now create high performance embedded applications with

  • parallel hardware execution
  • high frame-rate video processing
  • hardware accelerated algorithms
  • real-time signal processing
  • high bandwidth IO
  • low latency control

 

I used the latest PYNQ image release for the Ultra96V2 (Avnet Ultra96-V2: v2.5 PYNQ image). In my investigation of PYNQ I came across the community projects and noticed that OpenCV has been implement in PYNQ. I used OpenCV several years ago in the the design of a License Plate Recognition product thought hmmm that would be a great idea. Therefore, I pivoted my project to creating a License Plate Recognition Device (LPR) platform using a webcam..

There are a few LPR algorithms available out there and most are open source. One of the most popular ones is OpenALPR. However I found that during a Xilinx PYNQ Hackaton in 2017 an LPR algorithm was created for PYNQ ( https://github.com/Xilinx/PYNQ_Hackathon/tree/master/teams/team_lynx/OpenCV/License%20Plate%20Recognition ). There was no need to re-invent the wheel. I purchased a Logitech HD C525 webcam.

 

The Xilinx PYNQ Hackaton project does LPR on static image files (the image below is the one used in their project):

 

I needed to input video from a webcam so that plates are actively captured in real time.

 

 

 

 

Therefore, I modified some exiting jupyter notebook code used for webcam capture to capture images and save to a location for analysis by the LPR algorithm.

 

from PIL import Image as PIL_Image

orig_img_path = '/home/xilinx/jupyter_notebooks/common/cary_webcam.jpg'

!fswebcam  --no-banner -r 1000x600 --jpeg 95 --save {orig_img_path} -d /dev/video0 2> /dev/null

 

img = PIL_Image.open(orig_img_path)

img

 

I set the resolution to 1000x600 and the image quality because the C525 image quality was less than expected.

 

 

 

The jupyter code takes about a minute to run but works like a charm. I used an old Florida License plate I have and it was able to decipher the plate number: LTB E29

Anonymous
  • buffteethr
    buffteethr over 2 years ago in reply to clem57

    Yes, LPR has been around for awhile and I worked at a company about 8 years ago that design cameras with built in LPR. However, back then we used a DSP and custom IP. Now, with OpenCV so well developed there are some great opensource IP that used OpenCV and with the implementation of OpenCV in FPGAs the systems have gotten even better. You would be shocked yo know that the technology is a main stay of the Car Repo industry and has been so for awhile.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
  • clem57
    clem57 over 2 years ago

    This looks like what police are doing to spot trouble like bad plates etc.

    • Cancel
    • Up 0 Down
    • Reply
    • More
    • Cancel
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube