SHARE
TWEET

Untitled

a guest Mar 26th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Created on Wed Mar 13 08:15:16 2019
  5. @author: suakii
  6. """
  7. from __future__ import print_function
  8. import argparse
  9. import cv2
  10. ap = argparse.ArgumentParser()
  11. ap.add_argument("-i", "--image", required=True, help="Path to the image")
  12. args = vars(ap.parse_args())
  13. image = cv2.imread(args["image"], cv2.IMREAD_UNCHANGED)
  14. print(type(image))
  15. print("width: {} pixels".format(image.shape[1]))
  16. print("heigh: {} pixels".format(image.shape[0]))
  17. print("channels: {} pixels".format(image.shape[2]))
  18. cv2.imshow("Image", image)
  19. cv2.waitKey(0)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top