GetPlateTest.py 553 B

12345678910111213141516171819
  1. from GetPlate import getPlateAt
  2. from GrayscaleImage import GrayscaleImage
  3. from Point import Point
  4. # Define the corners of the licenseplate
  5. points = [Point(None, (310, 383)), \
  6. Point(None, (382, 381)), \
  7. Point(None, (382, 396)), \
  8. Point(None, (310, 398))]
  9. # Get the image
  10. image = GrayscaleImage('../images/test_plate.png')
  11. # Let the code get the licenseplate
  12. output_image = getPlateAt(image, points, 100, 20)
  13. # Show the licenseplate
  14. output_image = GrayscaleImage(None, output_image)
  15. output_image.show()