Guest User

Untitled

a guest
Jan 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. from pathlib import Path
  2. import cv2
  3. 以下の関数を呼び出してくると画像が開けない
  4. #from classfy02 import input_data
  5.  
  6. def main():
  7. parent_path = Path(__file__).parent
  8. path = str(
  9. (parent_path / 'cross.png').resolve()
  10. )
  11.  
  12.  
  13. img = cv2.imread(path)
  14. cv2.namedWindow('screen', cv2.WINDOW_NORMAL)
  15. cv2.setWindowProperty('screen', cv2.WND_PROP_FULLSCREEN,
  16. cv2.WINDOW_FULLSCREEN)
  17. cv2.imshow('screen', img)
  18. cv2.waitKey(1000)
  19.  
  20. if __name__ == '__main__':
  21. main()
Add Comment
Please, Sign In to add comment